add comments for line coverage 98/197398/2 tizen_line_coverage
authorSejun Park <sejun79.park@samsung.com>
Fri, 11 Jan 2019 04:12:26 +0000 (13:12 +0900)
committerSejun Park <sejun79.park@samsung.com>
Fri, 11 Jan 2019 04:14:02 +0000 (13:14 +0900)
Change-Id: I39a2c892a99d19c2edbc4bc1769b48550dcacaab

src/media_format.c
src/media_packet.c
src/media_packet_pool.c

index 1a4ff5c1c68b8cd644ab593779e4d4f303c314ba..3e0a9804cd84d702cc64383317c6cedaa30cc6e8 100755 (executable)
@@ -236,7 +236,7 @@ int media_format_set_container_mime(media_format_h fmt, media_format_mimetype_e
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("The format can not be changed..\n", __FUNCTION__);
+               LOGE("The format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -257,7 +257,7 @@ int media_format_set_text_mime(media_format_h fmt, media_format_mimetype_e mimet
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("The format can not be changed..\n", __FUNCTION__);
+               LOGE("The format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -278,7 +278,7 @@ int media_format_set_text_type(media_format_h fmt, media_format_text_type_e type
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("The format can not be changed..\n", __FUNCTION__);
+               LOGE("The format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -299,7 +299,7 @@ int media_format_set_video_mime(media_format_h fmt, media_format_mimetype_e mime
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("The format can not be changed..\n", __FUNCTION__);
+               LOGE("The format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -320,7 +320,7 @@ int media_format_set_video_width(media_format_h fmt, int width)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("the format can not be changed..\n", __FUNCTION__);
+               LOGE("the format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -343,7 +343,7 @@ int media_format_set_video_height(media_format_h fmt, int height)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("The format can not be changed..\n", __FUNCTION__);
+               LOGE("The format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -366,7 +366,7 @@ int media_format_set_video_avg_bps(media_format_h fmt, int avg_bps)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("The format can not be changed..\n", __FUNCTION__);
+               LOGE("The format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -389,7 +389,7 @@ int media_format_set_video_max_bps(media_format_h fmt, int max_bps)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("The format can not be changed..\n", __FUNCTION__);
+               LOGE("The format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -412,7 +412,7 @@ int media_format_set_video_frame_rate(media_format_h fmt, int frame_rate)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("The format can not be changed..\n", __FUNCTION__);
+               LOGE("The format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -436,7 +436,7 @@ int media_format_set_audio_mime(media_format_h fmt, media_format_mimetype_e mime
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("the format can not be changed..\n", __FUNCTION__);
+               LOGE("the format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -460,7 +460,7 @@ int media_format_set_audio_channel(media_format_h fmt, int channel)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("the format can not be changed..\n", __FUNCTION__);
+               LOGE("the format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -484,7 +484,7 @@ int media_format_set_audio_samplerate(media_format_h fmt, int samplerate)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("the format can not be changed..\n", __FUNCTION__);
+               LOGE("the format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -508,7 +508,7 @@ int media_format_set_audio_bit(media_format_h fmt, int bit)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("the format can not be changed..\n", __FUNCTION__);
+               LOGE("the format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -532,7 +532,7 @@ int media_format_set_audio_avg_bps(media_format_h fmt, int avg_bps)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("the format can not be changed..\n", __FUNCTION__);
+               LOGE("the format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -556,7 +556,7 @@ int media_format_set_audio_aac_type(media_format_h fmt, bool is_adts)
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("the format can not be changed..\n", __FUNCTION__);
+               LOGE("the format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -580,7 +580,7 @@ int media_format_set_audio_aac_header_type(media_format_h fmt, media_format_aac_
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
 
        if (!MEDIA_FORMAT_IS_WRITABLE(fmt)) {
-               LOGE("the format can not be changed..\n", __FUNCTION__);
+               LOGE("the format can not be changed..\n", __FUNCTION__);        //LCOV_EXCL_LINE
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
@@ -642,7 +642,7 @@ int media_format_is_writable(media_format_h fmt, bool * is_writable)
        int ret = MEDIA_FORMAT_ERROR_NONE;
        MEDIA_FORMAT_INSTANCE_CHECK(fmt);
        if (MEDIA_FORMAT_GET_REFCOUNT(fmt) <= 0) {
-               LOGE("The format ref_count is less than 0..\n.");
+               LOGE("The format ref_count is less than 0..\n.");       //LCOV_EXCL_LINE
                ret = MEDIA_FORMAT_ERROR_INVALID_OPERATION;
        }
 
index f58d0314bc95820213d43f16a9df196e0aae5cfe..2a3ce0d8a78a7ed001f737fb1328629eff66a213 100755 (executable)
@@ -41,13 +41,13 @@ int media_packet_create_alloc(media_format_h fmt, media_packet_finalize_cb fcb,
        MEDIA_PACKET_INSTANCE_CHECK(fmt);
        MEDIA_PACKET_NULL_ARG_CHECK(packet);
        if (MEDIA_FORMAT_GET_REFCOUNT(fmt) < 1) {
-               LOGE("The media format handle is corrupted or Not set media info");
+               LOGE("The media format handle is corrupted or Not set media info");     //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_PARAMETER;
        }
 
        if (!MEDIA_FORMAT_IS_VIDEO(fmt) && !MEDIA_FORMAT_IS_AUDIO(fmt)
                && !MEDIA_FORMAT_IS_TEXT(fmt)) {
-               LOGE("The media format handle is not specified. set video info, audio info or text info...");
+               LOGE("The media format handle is not specified. set video info, audio info or text info...");   //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
@@ -55,7 +55,7 @@ int media_packet_create_alloc(media_format_h fmt, media_packet_finalize_cb fcb,
        if (handle != NULL)
                memset(handle, 0, sizeof(media_packet_s));
        else {
-               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);
+               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);  //LCOV_EXCL_LINE
                ret = MEDIA_PACKET_ERROR_OUT_OF_MEMORY;
                goto fail;
        }
@@ -76,7 +76,7 @@ int media_packet_create_alloc(media_format_h fmt, media_packet_finalize_cb fcb,
        /* alloc buffer */
        ret = _pkt_alloc_buffer(handle);
        if (ret != MEDIA_PACKET_ERROR_NONE) {
-               LOGE("[%s] failed _pkt_alloc_buffer(), err = (0x%08x)", __FUNCTION__, ret);
+               LOGE("[%s] failed _pkt_alloc_buffer(), err = (0x%08x)", __FUNCTION__, ret);     //LCOV_EXCL_LINE
                goto fail;
        }
 
@@ -114,7 +114,7 @@ int media_packet_create(media_format_h fmt, media_packet_finalize_cb fcb, void *
        MEDIA_PACKET_INSTANCE_CHECK(fmt);
        MEDIA_PACKET_NULL_ARG_CHECK(packet);
        if (MEDIA_FORMAT_GET_REFCOUNT(fmt) < 1) {
-               LOGE("The media format handle is corrupted or Not set media info");
+               LOGE("The media format handle is corrupted or Not set media info");     //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_PARAMETER;
        }
 
@@ -129,7 +129,7 @@ int media_packet_create(media_format_h fmt, media_packet_finalize_cb fcb, void *
        if (handle != NULL)
                memset(handle, 0, sizeof(media_packet_s));
        else {
-               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);
+               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);  //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_OUT_OF_MEMORY;
        }
 
@@ -179,7 +179,7 @@ int media_packet_copy(media_packet_h org_packet, media_packet_finalize_cb fcb, v
        if (handle != NULL)
                memset(handle, 0, sizeof(media_packet_s));
        else {
-               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);
+               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);  //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_OUT_OF_MEMORY;
        }
 
@@ -219,7 +219,7 @@ int media_packet_alloc(media_packet_h packet)
        /* alloc buffer */
        int err = _pkt_alloc_buffer(handle);
        if (err != MEDIA_PACKET_ERROR_NONE) {
-               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);
+               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);  //LCOV_EXCL_LINE
                ret = err;
                goto fail;
        }
@@ -311,12 +311,12 @@ int _pkt_alloc_buffer(media_packet_s *pkt)
                                pkt->size = (size_t)surface_info.size;
                                LOGD("tbm_surface_created, pkt->size = %d\n", pkt->size);
                        } else {
-                               LOGE("tbm_surface_get_info() is failed.. err = 0x%08x \n", err);
+                               LOGE("tbm_surface_get_info() is failed.. err = 0x%08x \n", err);        //LCOV_EXCL_LINE
                                tbm_surface_destroy((tbm_surface_h)pkt->surface_data);
                                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
                        }
                } else {
-                       LOGE("\n tbm_surface_create() is failed!! \n");
+                       LOGE("\n tbm_surface_create() is failed!! \n"); //LCOV_EXCL_LINE
                        return MEDIA_PACKET_ERROR_INVALID_OPERATION;
                }
 
@@ -338,7 +338,7 @@ int _pkt_dealloc_buffer(media_packet_s *handle)
        } else if (handle->type == MEDIA_BUFFER_TYPE_EXTERNAL_TBM_SURFACE || handle->type == MEDIA_BUFFER_TYPE_EXTERNAL_MEMORY) {
                /* there is nothing to do, Do not free the buffer which is created by external module. */
        } else {
-               LOGE("Invalied buffer type");
+               LOGE("Invalied buffer type");   //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
@@ -419,7 +419,7 @@ static size_t _pkt_calculate_video_buffer_size(media_packet_s *pkt)
                buffersize = (stride + (_ROUND_UP_16(width) / 2)) * height;
                break;
        default:
-               LOGE("Not supported format\n");
+               LOGE("Not supported format\n"); //LCOV_EXCL_LINE
                return 0;
        }
 
@@ -522,7 +522,7 @@ static size_t _pkt_calculate_audio_buffer_size(media_packet_s *pkt)
                buffersize = (OPUS_MAX_FRM_SIZE * OPUS_MAX_NCH) * 2;    /* 2 = (16bit/8) */
                break;
        default:
-               LOGE("Not supported format\n");
+               LOGE("Not supported format\n"); //LCOV_EXCL_LINE
                return 0;
        }
 
@@ -541,7 +541,7 @@ static size_t _pkt_calculate_text_buffer_size(media_packet_s *pkt)
                buffersize = TXT_MAX_FRM_SIZE;
                break;
        default:
-               LOGE("Not supported text format\n");
+               LOGE("Not supported text format\n");    //LCOV_EXCL_LINE
                return 0;
        }
        return buffersize;
@@ -559,7 +559,7 @@ int media_packet_create_from_tbm_surface(media_format_h fmt, tbm_surface_h surfa
        MEDIA_PACKET_INSTANCE_CHECK(surface);
        MEDIA_PACKET_NULL_ARG_CHECK(packet);
        if (!MEDIA_FORMAT_IS_VIDEO(fmt) && !MEDIA_FORMAT_IS_AUDIO(fmt)) {
-               LOGE("The media format handle is not specified. set video info or audio info...");
+               LOGE("The media format handle is not specified. set video info or audio info...");      //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
@@ -567,7 +567,7 @@ int media_packet_create_from_tbm_surface(media_format_h fmt, tbm_surface_h surfa
        if (handle != NULL) {
                memset(handle, 0, sizeof(media_packet_s));
        } else {
-               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);
+               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);  //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_OUT_OF_MEMORY;
        }
 
@@ -635,7 +635,7 @@ int media_packet_create_from_external_memory(media_format_h fmt, void *mem_ptr,
        }
 
        if (MEDIA_FORMAT_IS_RAW(fmt) && MEDIA_FORMAT_IS_VIDEO(fmt)) {
-               LOGE("failed!. it supports only 'MEDIA_FORMAT_ENCODED' type.");
+               LOGE("failed!. it supports only 'MEDIA_FORMAT_ENCODED' type."); //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_PARAMETER;
        }
 
@@ -643,7 +643,7 @@ int media_packet_create_from_external_memory(media_format_h fmt, void *mem_ptr,
        if (handle != NULL) {
                memset(handle, 0, sizeof(media_packet_s));
        } else {
-               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);
+               LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY);  //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_OUT_OF_MEMORY;
        }
 
@@ -733,7 +733,7 @@ int media_packet_set_format(media_packet_h packet, media_format_h fmt)
 
        /* if trying to set same format,  return */
        if (handle->format == MEDIA_FORMAT_CAST(fmt)) {
-               LOGE("The packet handle already refers the format handle..\n");
+               LOGE("The packet handle already refers the format handle..\n"); //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
@@ -1121,7 +1121,7 @@ int media_packet_get_number_of_video_planes(media_packet_h packet, uint32_t *num
                        LOGD(" surface_info the number of planes = %d\n", (int)surface_info.num_planes);
                } else {
                        *num = 0;
-                       LOGE("tbm_surface_get_info() is failed.. 0x%08x \n", err);
+                       LOGE("tbm_surface_get_info() is failed.. 0x%08x \n", err);      //LCOV_EXCL_LINE
                        ret = MEDIA_PACKET_ERROR_INVALID_OPERATION;
                }
        } else {
@@ -1165,7 +1165,7 @@ int media_packet_get_video_stride_width(media_packet_h packet, int plane_idx, in
                        }
                } else {
                        *stride_width = 0;
-                       LOGE("tbm_surface_get_info() is failed.. 0x%08x \n", err);
+                       LOGE("tbm_surface_get_info() is failed.. 0x%08x \n", err);      //LCOV_EXCL_LINE
                        ret = MEDIA_PACKET_ERROR_INVALID_OPERATION;
                }
        } else {
@@ -1186,7 +1186,7 @@ int media_packet_get_video_stride_height(media_packet_h packet, int plane_idx, i
        MEDIA_PACKET_INSTANCE_CHECK(packet);
        MEDIA_PACKET_NULL_ARG_CHECK(stride_height);
        if (plane_idx < 0) {
-               LOGE("Invalid plane_idx : %d, must not be negative number\n", plane_idx);
+               LOGE("Invalid plane_idx : %d, must not be negative number\n", plane_idx);       //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_PARAMETER;
        }
 
@@ -1201,13 +1201,13 @@ int media_packet_get_video_stride_height(media_packet_h packet, int plane_idx, i
                        if (surface_info.num_planes > plane_idx) {
                                *stride_height = surface_info.planes[plane_idx].size / surface_info.planes[plane_idx].stride;
                        } else {
-                               LOGE("the plane_idx is invalid, The number of planes = %lu\n", surface_info.num_planes);
+                               LOGE("the plane_idx is invalid, The number of planes = %lu\n", surface_info.num_planes);        //LCOV_EXCL_LINE
                                *stride_height = 0;
                                ret = MEDIA_PACKET_ERROR_INVALID_PARAMETER;
                        }
                } else {
                        *stride_height = 0;
-                       LOGE("tbm_surface_get_info() is failed.. 0x%08x \n", err);
+                       LOGE("tbm_surface_get_info() is failed.. 0x%08x \n", err);      //LCOV_EXCL_LINE
                        ret = MEDIA_PACKET_ERROR_INVALID_OPERATION;
                }
        } else {
@@ -1229,7 +1229,7 @@ int media_packet_get_video_plane_data_ptr(media_packet_h packet, int plane_idx,
        MEDIA_PACKET_INSTANCE_CHECK(packet);
        MEDIA_PACKET_NULL_ARG_CHECK(plane_data_ptr);
        if (plane_idx < 0) {
-               LOGE("Invalid plane_idx : %d, must not be negative number\n", plane_idx);
+               LOGE("Invalid plane_idx : %d, must not be negative number\n", plane_idx);       //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_PARAMETER;
        }
 
@@ -1245,12 +1245,12 @@ int media_packet_get_video_plane_data_ptr(media_packet_h packet, int plane_idx,
                                *plane_data_ptr = surface_info.planes[plane_idx].ptr;
                                LOGD("the tbm_surface_info.planes[%d].ptr = %p\n", plane_idx, surface_info.planes[plane_idx].ptr);
                        } else {
-                               LOGE("the plane_idx is invalid, The number of planes = %lu\n", surface_info.num_planes);
+                               LOGE("the plane_idx is invalid, The number of planes = %lu\n", surface_info.num_planes);        //LCOV_EXCL_LINE
                                *plane_data_ptr = NULL;
                                ret = MEDIA_PACKET_ERROR_INVALID_PARAMETER;
                        }
                } else {
-                       LOGE("tbm_surface_get_info() is failed.. 0x%08x \n", err);
+                       LOGE("tbm_surface_get_info() is failed.. 0x%08x \n", err);      //LCOV_EXCL_LINE
                        *plane_data_ptr = NULL;
                        ret = MEDIA_PACKET_ERROR_INVALID_OPERATION;
                }
@@ -1274,7 +1274,7 @@ int media_packet_get_codec_data(media_packet_h packet, void **codec_data, unsign
 
        handle = (media_packet_s *)packet;
 
-       LOGI("Get: codec data = %p, codec_data_size = %u\n", handle->codec_data, handle->codec_data_size);
+       LOGI("Get: codec data = %p, codec_data_size = %u\n", handle->codec_data, handle->codec_data_size);      //LCOV_EXCL_LINE
 
        if (handle->codec_data) {
                *codec_data_size = handle->codec_data_size;
@@ -1306,20 +1306,20 @@ int media_packet_destroy(media_packet_h packet)
 
                /* creator do not want to destroy media packet handle */
                if (finalize_cb_ret == MEDIA_PACKET_REUSE) {
-                       LOGI("the media packet handle will be reused.");
+                       LOGI("the media packet handle will be reused.");        //LCOV_EXCL_LINE
                        return MEDIA_PACKET_ERROR_NONE;
                }
        }
 
        ret = _pkt_dealloc_buffer(handle);
        if (ret != MEDIA_PACKET_ERROR_NONE) {
-               LOGE("[%s] failed _pkt_dealloc_buffer(), err = (0x%08x)", __FUNCTION__, ret);
+               LOGE("[%s] failed _pkt_dealloc_buffer(), err = (0x%08x)", __FUNCTION__, ret);   //LCOV_EXCL_LINE
                return ret;
        }
        /* unreference media_format */
        media_format_unref(handle->format);
 
-       LOGI("The packet handle(%p) will be destroyed..\n", handle);
+       LOGI("The packet handle(%p) will be destroyed..\n", handle);    //LCOV_EXCL_LINE
 
        free(handle);
        handle = NULL;
@@ -1373,7 +1373,7 @@ static uint32_t _convert_to_tbm_surface_format(media_format_mimetype_e format_ty
                tbm_format = TBM_FORMAT_BGRA8888;
                break;
        default:
-               LOGE("Invalid media format mime type!");
+               LOGE("Invalid media format mime type!");        //LCOV_EXCL_LINE
                tbm_format = 0;
                break;
        }
index ed6e15bf34f28c25b91d80df3af45419f421aee9..b97e184c1a203b5fae493343c4b30d34155fa7b5 100755 (executable)
@@ -37,7 +37,7 @@ int media_packet_pool_create(media_packet_pool_h *pool)
        if (pool_handle != NULL)
                memset(pool_handle, 0, sizeof(media_packet_pool_s));
        else {
-               LOGE("out of memory");
+               LOGE("out of memory");  //LCOV_EXCL_LINE
                ret = MEDIA_PACKET_ERROR_OUT_OF_MEMORY;
                return ret;
        }
@@ -144,29 +144,29 @@ int media_packet_pool_allocate(media_packet_pool_h pool)
        pool_handle = (media_packet_pool_s *)pool;
 
        if (!(pool_handle->pool_created)) {
-               LOGE("The media packet pool is not created..");
+               LOGE("The media packet pool is not created.."); //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
        if (!(pool_handle->min_pool_size)) {
-               LOGE("The media packet pool size is not set. set pool size...");
+               LOGE("The media packet pool size is not set. set pool size...");        //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
        if (pool_handle->curr_pool_size >= pool_handle->max_pool_size) {
-               LOGE("The media packet pool is full..");
+               LOGE("The media packet pool is full..");        //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
 
        }
 
        if (g_atomic_int_get(&pool_handle->pool_allocated)) {
-               LOGE("The media packet is already allocated. set media format size...");
+               LOGE("The media packet is already allocated. set media format size...");        //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
        for (i = 0; i < pool_handle->min_pool_size; i++) {
                if (media_packet_create_alloc(pool_handle->fmt_h, _packet_finalize_cb, pool_handle, &pool_handle->packet[i]) != MEDIA_PACKET_ERROR_NONE) {
-                       LOGE("The media packet pool is full or out of memory...");
+                       LOGE("The media packet pool is full or out of memory...");      //LCOV_EXCL_LINE
                        return MEDIA_PACKET_ERROR_INVALID_OPERATION;
                }
                g_queue_push_tail(pool_handle->queue, pool_handle->packet[i]);
@@ -176,7 +176,7 @@ int media_packet_pool_allocate(media_packet_pool_h pool)
 
        /* increase format reference count */
        if (media_format_ref(pool_handle->fmt_h) != MEDIA_FORMAT_ERROR_NONE) {
-               LOGE("failed to increase ref count");
+               LOGE("failed to increase ref count");   //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
@@ -200,14 +200,14 @@ int media_packet_pool_acquire_packet(media_packet_pool_h pool, media_packet_h *p
        }
 
        if (!g_atomic_int_get(&pool_handle->pool_allocated)) {
-               LOGE("The media packet pool is not allocated...");
+               LOGE("The media packet pool is not allocated...");      //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
        g_mutex_lock(&pool_handle->mutex);
        if (!(pool_handle->curr_pool_size)) {
                g_mutex_unlock(&pool_handle->mutex);
-               LOGE("The media packet pool size is not set. set pool size...");
+               LOGE("The media packet pool size is not set. set pool size...");        //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
 
@@ -278,7 +278,7 @@ int media_packet_pool_release_packet(media_packet_pool_h pool, media_packet_h pk
        g_mutex_lock(&pool_handle->mutex);
 
        if ((find = g_queue_find(pool_handle->queue, pkt))) {
-               LOGE("unable to release '%p' to the pool. Already released", pkt);
+               LOGE("unable to release '%p' to the pool. Already released", pkt);      //LCOV_EXCL_LINE
                g_mutex_unlock(&pool_handle->mutex);
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
@@ -286,7 +286,7 @@ int media_packet_pool_release_packet(media_packet_pool_h pool, media_packet_h pk
        num_pkts = g_queue_get_length(pool_handle->queue);
 
        if (num_pkts == pool_handle->curr_pool_size) {
-               LOGE("Queue is already full");
+               LOGE("Queue is already full");  //LCOV_EXCL_LINE
                g_mutex_unlock(&pool_handle->mutex);
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
@@ -296,7 +296,7 @@ int media_packet_pool_release_packet(media_packet_pool_h pool, media_packet_h pk
                g_cond_signal(&pool_handle->queue_cond);
                LOGD("The packet released to pool is  %p..\n", pkt);
        } else {
-               LOGE("packet is not aquired from pool %p", pkt);
+               LOGE("packet is not aquired from pool %p", pkt);        //LCOV_EXCL_LINE
                g_mutex_unlock(&pool_handle->mutex);
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
@@ -328,7 +328,7 @@ int media_packet_pool_deallocate(media_packet_pool_h pool)
        num_pkts = g_queue_get_length(pool_handle->queue);
 
        if (num_pkts < pool_handle->curr_pool_size) {
-               LOGE("packet is being used, release the packet before deallocate");
+               LOGE("packet is being used, release the packet before deallocate");             //LCOV_EXCL_LINE
                g_mutex_unlock(&pool_handle->mutex);
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
@@ -339,7 +339,7 @@ int media_packet_pool_deallocate(media_packet_pool_h pool)
 
                packet = g_queue_pop_head(pool_handle->queue);
                if (packet == NULL) {
-                       LOGE("Failed to get packet handle from Queue ");
+                       LOGE("Failed to get packet handle from Queue ");        //LCOV_EXCL_LINE
                        return MEDIA_PACKET_ERROR_INVALID_OPERATION;
                }
                ret = media_packet_destroy(packet);
@@ -352,7 +352,7 @@ int media_packet_pool_deallocate(media_packet_pool_h pool)
 
        /* unreference media_format */
        if (media_format_unref(pool_handle->fmt_h) != MEDIA_FORMAT_ERROR_NONE) {
-               LOGE("failed to decrease ref count");
+               LOGE("failed to decrease ref count");           //LCOV_EXCL_LINE
                g_mutex_unlock(&pool_handle->mutex);
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }
@@ -380,7 +380,7 @@ int media_packet_pool_destroy(media_packet_pool_h pool)
        g_mutex_unlock(&pool_handle->mutex);
 
        if (num_pkts > 0) {
-               LOGE("The packet pool needs to deallocate first ");
+               LOGE("The packet pool needs to deallocate first ");             //LCOV_EXCL_LINE
                return MEDIA_PACKET_ERROR_INVALID_OPERATION;
        }