Merge branch 'tizen_line_coverage' into tizen 93/228993/1
authorJeongmo Yang <jm80.yang@samsung.com>
Fri, 27 Mar 2020 03:19:09 +0000 (12:19 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Fri, 27 Mar 2020 03:22:47 +0000 (12:22 +0900)
Change-Id: I8c1650e5c788fce1860d6101affa159d634f51ab
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
src/media_codec.c
src/media_codec_queue.c

index be2435e..cff7fc1 100644 (file)
@@ -155,13 +155,13 @@ int mediacodec_create(mediacodec_h *mediacodec)
        if (handle != NULL) {
                memset(handle, 0 , sizeof(mediacodec_s));
        } else {
-               LOGE("MEDIACODEC_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIACODEC_ERROR_OUT_OF_MEMORY);
+               LOGE("MEDIACODEC_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIACODEC_ERROR_OUT_OF_MEMORY); //LCOV_EXCL_LINE
                return MEDIACODEC_ERROR_OUT_OF_MEMORY;
        }
 
        ret = mc_create(&handle->mc_handle);
        if (ret != MEDIACODEC_ERROR_NONE) {
-               LOGE("MEDIACODEC_ERROR_INVALID_OPERATION(0x%08x)", MEDIACODEC_ERROR_INVALID_OPERATION);
+               LOGE("MEDIACODEC_ERROR_INVALID_OPERATION(0x%08x)", MEDIACODEC_ERROR_INVALID_OPERATION); //LCOV_EXCL_LINE
                handle->state = MEDIACODEC_STATE_NONE;
                g_free(handle->mc_handle);
                g_free(handle);
@@ -199,7 +199,7 @@ int mediacodec_destroy(mediacodec_h mediacodec)
 
        int ret = mc_destroy(handle->mc_handle);
        if (ret != MEDIACODEC_ERROR_NONE) {
-               LOGD("MEDIACODEC_ERROR_INVALID_OPERATION(0x%08x)", MEDIACODEC_ERROR_INVALID_OPERATION);
+               LOGD("MEDIACODEC_ERROR_INVALID_OPERATION(0x%08x)", MEDIACODEC_ERROR_INVALID_OPERATION); //LCOV_EXCL_LINE
                return MEDIACODEC_ERROR_INVALID_OPERATION;
        } else {
 #ifdef USE_MM_RESOURCE_MANAGER
@@ -326,7 +326,7 @@ int mediacodec_prepare(mediacodec_h mediacodec)
        if (mc_handle->is_hw && mc_handle->is_video) {
 
                if (handle->codec_resource) {
-                       LOGE("Codec resource is tried to be acquired twice\n");
+                       LOGE("Codec resource is tried to be acquired twice\n"); //LCOV_EXCL_LINE
                        return MC_INTERNAL_ERROR;
                }
 
@@ -344,6 +344,7 @@ int mediacodec_prepare(mediacodec_h mediacodec)
                 * mm_resource_manager_get_res_type_volume() can be used.
                 * Additional info can be found in doxygen comments of mm_resource_manager.h
                 */
+//LCOV_EXCL_START
                rm_ret = mm_resource_manager_mark_for_acquire(g_mc_resource_manager,
                                mc_handle->is_encoder ?
                                MM_RESOURCE_MANAGER_RES_TYPE_VIDEO_ENCODER :
@@ -367,8 +368,8 @@ int mediacodec_prepare(mediacodec_h mediacodec)
                        LOGE("Failed to commit resource manager : %x", rm_ret);
                        return MEDIACODEC_ERROR_INTERNAL;
                }
-
                handle->codec_resource = resource;
+//LCOV_EXCL_STOP
        }
 #endif
 
@@ -397,6 +398,7 @@ int mediacodec_unprepare(mediacodec_h mediacodec)
        } else {
 #ifdef USE_MM_RESOURCE_MANAGER
                if (handle->codec_resource != NULL) {
+//LCOV_EXCL_START
                        mm_resource_manager_mark_for_release(g_mc_resource_manager,
                                        handle->codec_resource);
                        handle->codec_resource = NULL;
@@ -410,6 +412,7 @@ int mediacodec_unprepare(mediacodec_h mediacodec)
                                        return MEDIACODEC_ERROR_INTERNAL;
                                }
                        }
+//LCOV_EXCL_STOP
                } else {
                        LOGD("No codec resource to release. Probably resource release cb called\n");
                }
@@ -718,8 +721,8 @@ static gboolean __mediacodec_buffer_status_cb(mediacodec_status_e status, void *
        return 1;
 }
 
-
 #ifdef USE_MM_RESOURCE_MANAGER
+//LCOV_EXCL_START
 static int __mediacodec_resource_release_cb(mm_resource_manager_h rm,
                mm_resource_manager_res_h resource_h, void *user_data)
 {
@@ -747,6 +750,7 @@ static int __mediacodec_resource_release_cb(mm_resource_manager_h rm,
 
        return FALSE;
 }
+//LCOV_EXCL_STOP
 
 
 static void __mediacodec_init_lib()
@@ -772,3 +776,4 @@ static void __mediacodec_deinit_lib()
        LOGD("DONE");
 }
 #endif
+
index 492823b..d8568d1 100644 (file)
@@ -80,6 +80,7 @@ leave:
        return data;
 }
 
+//LCOV_EXCL_START
 gpointer mc_async_queue_pop_forced(async_queue_t *async_queue)
 {
        gpointer data = NULL;
@@ -104,6 +105,7 @@ gpointer mc_async_queue_pop_forced(async_queue_t *async_queue)
 
        return data;
 }
+//LCOV_EXCL_STOP
 
 void mc_async_queue_disable(async_queue_t *async_queue)
 {