From: Sejun Park Date: Fri, 11 Jan 2019 02:27:51 +0000 (+0900) Subject: Add comments for ignoring lines for line coverage X-Git-Tag: submit/tizen/20200422.081514~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e049f50a2de7bdeb292f9a3a6728cf21ce7ae5d3;p=platform%2Fcore%2Fapi%2Fmediacodec.git Add comments for ignoring lines for line coverage Change-Id: I83889b20239b904235f97f9975d7b83a010aec4c --- diff --git a/src/media_codec.c b/src/media_codec.c index b76269a..c71fd6d 100644 --- a/src/media_codec.c +++ b/src/media_codec.c @@ -138,13 +138,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); @@ -180,7 +180,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 { g_mutex_lock(&mediacodec_handles_lock); @@ -302,7 +302,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; } @@ -320,6 +320,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(resource_manager, mc_handle->is_encoder ? MM_RESOURCE_MANAGER_RES_TYPE_VIDEO_ENCODER : @@ -342,8 +343,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 } int ret = mc_prepare(handle->mc_handle); @@ -688,7 +689,7 @@ static gboolean __mediacodec_buffer_status_cb(mediacodec_status_e status, void * return 1; } - +//LCOV_EXCL_START static int __mediacodec_resource_release_cb(mm_resource_manager_h rm, mm_resource_manager_res_h resource_h, void *user_data) { @@ -716,6 +717,7 @@ static int __mediacodec_resource_release_cb(mm_resource_manager_h rm, return FALSE; } +//LCOV_EXCL_STOP static void __mediacodec_init_lib() { @@ -723,7 +725,7 @@ static void __mediacodec_init_lib() if (MM_RESOURCE_MANAGER_ERROR_NONE != mm_resource_manager_create(MM_RESOURCE_MANAGER_APP_CLASS_MEDIA, __mediacodec_resource_release_cb, NULL, &resource_manager)) { - LOGE("Failed to initialize resource manager"); + LOGE("Failed to initialize resource manager"); //LCOV_EXCL_LINE g_ptr_array_unref(mediacodec_handles); } }