Add exception code: The callback function registered by camera or player has not... 73/141873/2 accepted/tizen_4.0_unified accepted/tizen/4.0/unified/20170816.012903 accepted/tizen/4.0/unified/20170816.015147 accepted/tizen/4.0/unified/20170829.015855 accepted/tizen/unified/20170803.075431 submit/tizen/20170802.101838 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100004 submit/tizen_4.0/20170828.110004 submit/tizen_4.0_unified/20170814.115522 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release
authorHyunil <hyunil46.park@samsung.com>
Wed, 2 Aug 2017 01:18:51 +0000 (10:18 +0900)
committerHyunil <hyunil46.park@samsung.com>
Wed, 2 Aug 2017 01:31:18 +0000 (10:31 +0900)
Change-Id: I1dfd036c23db053a4435ed8cce5ce2f772bc1ce3
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
src/mm_evas_renderer.c

index f221d359135351db14b0750dbaf633771a55079e..d7b690c455954af62781576b7c114ccb12171c28 100755 (executable)
@@ -38,7 +38,7 @@
 #define SWAP(a, b)  ({int t; t = a; a = b; b = t; })
 #define INIT_IDX -1
 #define SIGNAL_TIMEOUT 1
-#if 0
+#if 1
 #define MMER_FENTER();                                 LOGD("<ENTER>");
 #define MMER_FLEAVE();                                 LOGD("<LEAVE>");
 #else
@@ -139,6 +139,10 @@ static int _mm_evas_renderer_update_rendering_info(mm_evas_info *evas_info)
                LOGE("there is no information for evas object size");
                return MM_ERROR_EVASRENDER_INTERNAL;
        }
+       if (!evas_info->w || !evas_info->h) {
+               LOGE("there is no video size from mm_evas_renderer_write() which is callback_func of player or camera");
+               return MM_ERROR_EVASRENDER_INTERNAL;
+       }
 
        _mm_evas_renderer_update_geometry(evas_info);
        if (!evas_info->result.w || !evas_info->result.h) {
@@ -759,7 +763,7 @@ static int _mm_evas_renderer_destroy(mm_evas_info **evas_info)
        } else {
                g_mutex_lock(&ptr->evas_lock);
                ret = _mm_evas_pipe_write(ptr, UPDATE_DESTROY);
-               if ( ret == MM_ERROR_NONE) {
+               if (ret == MM_ERROR_NONE) {
                        LOGD("Wait for g_cond_signal...");
                        g_cond_wait(&ptr->evas_cond[COND_DESTROY], &ptr->evas_lock);
                        LOGD("get g_cond_signal");
@@ -902,7 +906,8 @@ static void _mm_evas_renderer_update_geometry(mm_evas_info *evas_info)
                LOGD("swapped width %d, height %d", video_width, video_height);
 #endif
        }
-
+       LOGD("eo size (x:%d,y:%d,w:%d,h:%d)", evas_info->eo_size.x, evas_info->eo_size.y, evas_info->eo_size.w, evas_info->eo_size.h);
+       LOGD("video size (w:%d,h:%d)", video_width, video_height);
        switch (evas_info->display_geometry_method) {
        case DISP_GEO_METHOD_LETTER_BOX:
                /* set black padding for letter box mode */
@@ -1016,7 +1021,7 @@ static int _mm_evas_renderer_retrieve_all_packets(mm_evas_info *evas_info, bool
                /* flush all packet */
                g_mutex_lock(&evas_info->evas_lock);
                ret = _mm_evas_pipe_write(evas_info, UPDATE_FLUSH_BUFFER);
-               if ( ret == MM_ERROR_NONE) {
+               if (ret == MM_ERROR_NONE) {
                        if (!g_cond_wait_until(&evas_info->evas_cond[COND_RETRIEVE], &evas_info->evas_lock, end_time)) {
                                //timeout
                                LOGW("timeout: main thread is busy, App need to handle main thread well.");