[0.0.6] update error 68/90068/1 accepted/tizen/3.0/ivi/20161011.044411 accepted/tizen/3.0/mobile/20161015.033506 accepted/tizen/3.0/tv/20161016.004938 accepted/tizen/3.0/wearable/20161015.083307 accepted/tizen/common/20160929.162938 accepted/tizen/ivi/20160930.040751 accepted/tizen/mobile/20160930.040429 accepted/tizen/tv/20160930.040601 accepted/tizen/wearable/20160930.040658 submit/tizen/20160928.043825 submit/tizen_3.0_ivi/20161010.000003 submit/tizen_3.0_mobile/20161015.000003 submit/tizen_3.0_tv/20161015.000003 submit/tizen_3.0_wearable/20161015.000003
authorNAMJEONGYOON <just.nam@samsung.com>
Wed, 28 Sep 2016 07:30:42 +0000 (16:30 +0900)
committerNAMJEONGYOON <just.nam@samsung.com>
Wed, 28 Sep 2016 07:30:42 +0000 (16:30 +0900)
Change-Id: Ie9ad0db116c1d758433cbe1123d6b2bcac2257df

packaging/libmm-evas-renderer.spec
src/mm_evas_renderer.c [changed mode: 0644->0755]

index 6d3f4b2..fb00a53 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-evas-renderer
 Summary:    Multimedia Framework Evas Renderer Library
-Version:    0.0.5
+Version:    0.0.6
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
old mode 100644 (file)
new mode 100755 (executable)
index dacc006..1e65684
@@ -47,7 +47,7 @@
 #define MM_CHECK_NULL(x_var) \
        if (!x_var) { \
                LOGE("[%s] is NULL\n", #x_var); \
-               return MM_ERROR_INVALID_ARGUMENT; \
+               return MM_ERROR_EVASRENDER_INVALID_ARGUMENT; \
        }
 
 #define SET_EVAS_OBJECT_EVENT_CALLBACK(x_evas_image_object, x_usr_data) \
@@ -382,7 +382,7 @@ static int __dump_pkt(media_packet_h pkt, int width, int height)
        media_packet_get_video_plane_data_ptr(pkt, 1, &data);
        media_packet_get_video_stride_width(pkt, 1, &stride_width);
        for (i = 0; i < height/2; i++) {
-               ret = fwrite(data, width, 1, fp);
+               fwrite(data, width, 1, fp);
                data += stride_width;
        }
 #else
@@ -515,7 +515,7 @@ static int _flush_packets(mm_evas_info *evas_info)
 
        if (!evas_info) {
                LOGW("there is no esink info");
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
        }
 
        /* update the screen only if visible is true */
@@ -526,12 +526,12 @@ static int _flush_packets(mm_evas_info *evas_info)
                evas_object_geometry_get(evas_info->eo, &evas_info->eo_size.x, &evas_info->eo_size.y, &evas_info->eo_size.w, &evas_info->eo_size.h);
                if (!evas_info->eo_size.w || !evas_info->eo_size.h) {
                        LOGE("there is no information for evas object size");
-                       return MM_ERROR_INVALID_ARGUMENT;
+                       return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
                }
                _mm_evas_renderer_update_geometry(evas_info, &result);
                if (!result.w || !result.h) {
                        LOGE("no information about geometry (%d, %d)", result.w, result.h);
-                       return MM_ERROR_INVALID_ARGUMENT;
+                       return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
                }
 
                if (evas_info->use_ratio) {
@@ -575,7 +575,7 @@ static int _flush_packets(mm_evas_info *evas_info)
                                ret_mp = media_packet_destroy(evas_info->pkt_info[i].packet);
                                if (ret_mp != MEDIA_PACKET_ERROR_NONE) {
                                        LOGW("media_packet_destroy failed %p", evas_info->pkt_info[i].packet);
-                                       ret = MM_ERROR_UNKNOWN;
+                                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                                }
                        }
                        evas_info->sent_buffer_cnt--;
@@ -623,7 +623,7 @@ int _reset_pipe(mm_evas_info *evas_info)
                                ret_mp = media_packet_destroy(evas_info->pkt_info[i].packet);
                                if (ret_mp != MEDIA_PACKET_ERROR_NONE) {
                                        LOGW("media_packet_destroy failed %p", evas_info->pkt_info[i].packet);
-                                       ret = MM_ERROR_UNKNOWN;
+                                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                                }
                        }
                        evas_info->sent_buffer_cnt--;
@@ -643,7 +643,7 @@ int _reset_pipe(mm_evas_info *evas_info)
                evas_info->epipe = ecore_pipe_add((Ecore_Pipe_Cb) _evas_pipe_cb, evas_info);
                if (!evas_info->epipe) {
                        LOGE("pipe is not created");
-                       ret = MM_ERROR_UNKNOWN;
+                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                }
                LOGD("created pipe %p", evas_info->epipe);
        }
@@ -695,7 +695,7 @@ static int _mm_evas_renderer_create(mm_evas_info **evas_info)
 
  ERROR:
        *evas_info = NULL;
-       return MM_ERROR_OUT_OF_STORAGE;
+       return MM_ERROR_EVASRENDER_NO_FREE_SPACE;
 }
 
 static int _mm_evas_renderer_destroy(mm_evas_info **evas_info)
@@ -741,7 +741,7 @@ static int _mm_evas_renderer_set_info(mm_evas_info *evas_info, Evas_Object *eo)
        if (!evas_info->epipe) {
                LOGE("pipe is not created");
                g_mutex_unlock(&evas_info->idx_lock);
-               return MM_ERROR_UNKNOWN;
+               return MM_ERROR_EVASRENDER_INTERNAL;
        }
        LOGD("created pipe %p", evas_info->epipe);
        _mm_evas_renderer_set_callback(evas_info);
@@ -795,7 +795,7 @@ static int _mm_evas_renderer_reset(mm_evas_info *evas_info)
                                ret_mp = media_packet_destroy(evas_info->pkt_info[i].packet);
                                if (ret_mp != MEDIA_PACKET_ERROR_NONE) {
                                        LOGW("media_packet_destroy failed %p", evas_info->pkt_info[i].packet);
-                                       ret = MM_ERROR_UNKNOWN;
+                                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                                }
                        }
                        evas_info->sent_buffer_cnt--;
@@ -967,7 +967,7 @@ static int _mm_evas_renderer_retrieve_all_packets(mm_evas_info *evas_info, bool
                /* in this case, we deem it is main thread */
                if (_flush_packets(evas_info) != MM_ERROR_NONE) {
                        LOGE("flushing packets are failed");
-                       ret = MM_ERROR_UNKNOWN;
+                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                }
        } else {
                /* it will be executed to write flush buffer and destroy media packets in pre_cb */
@@ -987,7 +987,7 @@ static int _mm_evas_renderer_make_flush_buffer(mm_evas_info *evas_info)
 
        if (evas_info->cur_idx == -1) {
                LOGW("there is no remained buffer");
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
        }
        media_packet_h packet = evas_info->pkt_info[evas_info->cur_idx].packet;
        MM_CHECK_NULL(packet);
@@ -1091,7 +1091,7 @@ ERROR:
                free(flush_buffer);
                flush_buffer = NULL;
        }
-       return MM_ERROR_UNKNOWN;
+       return MM_ERROR_EVASRENDER_INTERNAL;
 }
 
 /* release flush buffer */
@@ -1254,7 +1254,7 @@ int mm_evas_renderer_update_param(MMHandleType handle)
                        ret = ecore_pipe_write(evas_info->epipe, &evas_info->visible, UPDATE_VISIBILITY);
                        if (!ret) {
                                LOGW("fail to ecore_pipe_write() for updating visibility\n");
-                               return MM_ERROR_UNKNOWN;
+                               return MM_ERROR_EVASRENDER_INTERNAL;
                        }
                        evas_info->update_needed = TRUE;
                        /* FIXME: pause state only */
@@ -1262,7 +1262,7 @@ int mm_evas_renderer_update_param(MMHandleType handle)
                        ret = ecore_pipe_write(evas_info->epipe, evas_info, UPDATE_TBM_SURF);
                        if (!ret) {
                                LOGW("fail to ecore_pipe_write() for updating visibility\n");
-                               ret = MM_ERROR_UNKNOWN;
+                               ret = MM_ERROR_EVASRENDER_INTERNAL;
                        } else {
                                ret = MM_ERROR_NONE;
                        }
@@ -1311,7 +1311,7 @@ int mm_evas_renderer_destroy(MMHandleType *handle)
 
        if (!evas_info) {
                LOGD("skip it. it is not evas surface type.");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
 
        ret = _mm_evas_renderer_destroy(&evas_info);
@@ -1335,7 +1335,7 @@ int mm_evas_renderer_set_visible(MMHandleType handle, bool visible)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
 
        if (visible)
@@ -1347,7 +1347,7 @@ int mm_evas_renderer_set_visible(MMHandleType handle, bool visible)
                ret = ecore_pipe_write(evas_info->epipe, &visible, UPDATE_VISIBILITY);
                if (!ret) {
                        LOGW("fail to ecore_pipe_write() for updating visibility\n");
-                       ret = MM_ERROR_UNKNOWN;
+                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                } else {
                        ret = MM_ERROR_NONE;
                }
@@ -1368,7 +1368,7 @@ int mm_evas_renderer_get_visible(MMHandleType handle, bool *visible)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
 
        if (evas_info->visible == VISIBLE_FALSE)
@@ -1391,7 +1391,7 @@ int mm_evas_renderer_set_rotation(MMHandleType handle, int rotate)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
 
        switch (rotate) {
@@ -1408,7 +1408,7 @@ int mm_evas_renderer_set_rotation(MMHandleType handle, int rotate)
                value = EVAS_IMAGE_ORIENT_270;
                break;
        default:
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
        }
        if (evas_info->rotate_angle != value) {
                evas_info->update_needed = TRUE;
@@ -1421,7 +1421,7 @@ int mm_evas_renderer_set_rotation(MMHandleType handle, int rotate)
                ret = ecore_pipe_write(evas_info->epipe, evas_info, UPDATE_TBM_SURF);
                if (!ret) {
                        LOGW("fail to ecore_pipe_write() for updating visibility\n");
-                       ret = MM_ERROR_UNKNOWN;
+                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                } else {
                        ret = MM_ERROR_NONE;
                }
@@ -1440,7 +1440,7 @@ int mm_evas_renderer_get_rotation(MMHandleType handle, int *rotate)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
 
        switch (evas_info->rotate_angle) {
@@ -1457,7 +1457,7 @@ int mm_evas_renderer_get_rotation(MMHandleType handle, int *rotate)
                *rotate = DEGREE_270;
                break;
        default:
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
        }
 
        MMER_FLEAVE();
@@ -1474,7 +1474,7 @@ int mm_evas_renderer_set_geometry(MMHandleType handle, int mode)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
        if (evas_info->display_geometry_method != mode) {
                evas_info->update_needed = TRUE;
@@ -1488,7 +1488,7 @@ int mm_evas_renderer_set_geometry(MMHandleType handle, int mode)
                ret = ecore_pipe_write(evas_info->epipe, evas_info, UPDATE_TBM_SURF);
                if (!ret) {
                        LOGW("fail to ecore_pipe_write() for updating visibility\n");
-                       ret = MM_ERROR_UNKNOWN;
+                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                } else {
                        ret = MM_ERROR_NONE;
                }
@@ -1507,7 +1507,7 @@ int mm_evas_renderer_get_geometry(MMHandleType handle, int *mode)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
        *mode = evas_info->display_geometry_method;
 
@@ -1525,15 +1525,15 @@ int mm_evas_renderer_set_roi_area(MMHandleType handle, int x, int y, int w, int
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
        if (!w || !h) {
                LOGE("invalid resolution");
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
        }
        if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI) {
                LOGE("invalid mode");
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_OPERATION;
        }
 
        if (evas_info->dst_roi.x != x || evas_info->dst_roi.y != y
@@ -1551,7 +1551,7 @@ int mm_evas_renderer_set_roi_area(MMHandleType handle, int x, int y, int w, int
                ret = ecore_pipe_write(evas_info->epipe, evas_info, UPDATE_TBM_SURF);
                if (!ret) {
                        LOGW("fail to ecore_pipe_write() for updating visibility\n");
-                       ret = MM_ERROR_UNKNOWN;
+                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                } else {
                        ret = MM_ERROR_NONE;
                }
@@ -1571,11 +1571,11 @@ int mm_evas_renderer_get_roi_area(MMHandleType handle, int *x, int *y, int *w, i
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
        if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI) {
                LOGE("invalid mode");
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_OPERATION;
        }
 
        *x = evas_info->dst_roi.x;
@@ -1598,7 +1598,7 @@ int mm_evas_renderer_set_flip(MMHandleType handle, int flip)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
 
        switch (flip) {
@@ -1615,7 +1615,7 @@ int mm_evas_renderer_set_flip(MMHandleType handle, int flip)
                value = EVAS_IMAGE_ORIENT_180;
                break;
        default:
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
        }
        if (evas_info->flip != value) {
                evas_info->update_needed = TRUE;
@@ -1628,7 +1628,7 @@ int mm_evas_renderer_set_flip(MMHandleType handle, int flip)
                ret = ecore_pipe_write(evas_info->epipe, evas_info, UPDATE_TBM_SURF);
                if (!ret) {
                        LOGW("fail to ecore_pipe_write() for updating visibility\n");
-                       ret = MM_ERROR_UNKNOWN;
+                       ret = MM_ERROR_EVASRENDER_INTERNAL;
                } else {
                        ret = MM_ERROR_NONE;
                }
@@ -1648,7 +1648,7 @@ int mm_evas_renderer_get_flip(MMHandleType handle, int *flip)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or handle is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
 
        switch (evas_info->flip) {
@@ -1665,7 +1665,7 @@ int mm_evas_renderer_get_flip(MMHandleType handle, int *flip)
                *flip = FLIP_BOTH;
                break;
        default:
-               return MM_ERROR_INVALID_ARGUMENT;
+               return MM_ERROR_EVASRENDER_INVALID_ARGUMENT;
        }
 
        MMER_FLEAVE();
@@ -1682,7 +1682,7 @@ int mm_evas_renderer_retrieve_all_packets(MMHandleType handle, bool keep_screen)
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or player is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
        ret = _mm_evas_renderer_retrieve_all_packets(evas_info, keep_screen);
 
@@ -1699,7 +1699,7 @@ int mm_evas_renderer_set_packet_rendered_callback(MMHandleType handle, mm_evas_r
 
        if (!evas_info) {
                LOGW("skip it. it is not evas surface type or player is not prepared");
-               return MM_ERROR_RESOURCE_NOT_INITIALIZED;
+               return MM_ERROR_EVASRENDER_NOT_INITIALIZED;
        }
        evas_info->packet_rendered_cb = callback;
        evas_info->packet_rendered_cb_user = user_data;