From: Sangchul Lee Date: Mon, 4 Jan 2021 07:21:03 +0000 (+0900) Subject: Remove redundant function name in logs X-Git-Tag: submit/tizen/20210108.020109~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F41%2F250741%2F1;p=platform%2Fcore%2Fapi%2Fmediatool.git Remove redundant function name in logs The function name is already printed when using dlog. [Version] 0.1.25 [Issue Type] Log Change-Id: I0d61a5336d8dff9d3cb922b9a957981218844d53 Signed-off-by: Sangchul Lee --- diff --git a/include/media_format_private.h b/include/media_format_private.h index 5bea110..fecc2d3 100644 --- a/include/media_format_private.h +++ b/include/media_format_private.h @@ -31,11 +31,11 @@ extern "C" { #define MEDIA_FORMAT_CHECK_CONDITION(condition, error, msg) \ if (condition) {} else \ - { LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); return error; }; + { LOGE("%s(0x%08x)", msg, error); return error; }; #define MEDIA_FORMAT_CHECK_CONDITION_VOID(condition, msg) \ if (condition) {} else \ - { LOGE("[%s] %s", __FUNCTION__, msg); return; }; + { LOGE("%s", msg); return; }; #define MEDIA_FORMAT_INSTANCE_CHECK(media_format) \ diff --git a/include/media_packet_pool_private.h b/include/media_packet_pool_private.h index 4df57e9..6852ccd 100644 --- a/include/media_packet_pool_private.h +++ b/include/media_packet_pool_private.h @@ -33,7 +33,7 @@ extern "C" { #define MEDIA_PACKET_POOL_CHECK_CONDITION(condition, error, msg) \ if (condition) {} else \ - { LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); return error; }; + { LOGE("%s(0x%08x)", msg, error); return error; }; #define MEDIA_PACKET_POOL_INSTANCE_CHECK(pool) \ MEDIA_PACKET_POOL_CHECK_CONDITION(pool != NULL, MEDIA_PACKET_ERROR_INVALID_PARAMETER, "MEDIA_PACKET_ERROR_INVALID_PARAMETER") diff --git a/include/media_packet_private.h b/include/media_packet_private.h index 0c3e2ae..0ef6bd0 100644 --- a/include/media_packet_private.h +++ b/include/media_packet_private.h @@ -31,7 +31,7 @@ extern "C" { #define MEDIA_PACKET_CHECK_CONDITION(condition, error, msg) \ if (condition) {} else \ - { LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); return error; }; + { LOGE("%s(0x%08x)", msg, error); return error; }; #define MEDIA_PACKET_INSTANCE_CHECK(media_packet) \ MEDIA_PACKET_CHECK_CONDITION(media_packet != NULL, MEDIA_PACKET_ERROR_INVALID_PARAMETER, "MEDIA_PACKET_ERROR_INVALID_PARAMETER") diff --git a/packaging/capi-media-tool.spec b/packaging/capi-media-tool.spec index 89c1123..8ff804b 100755 --- a/packaging/capi-media-tool.spec +++ b/packaging/capi-media-tool.spec @@ -1,6 +1,6 @@ Name: capi-media-tool Summary: A Core API media tool library in Tizen Native API -Version: 0.1.24 +Version: 0.1.25 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/media_format.c b/src/media_format.c index c930951..28c7011 100644 --- a/src/media_format.c +++ b/src/media_format.c @@ -303,7 +303,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__); //LCOV_EXCL_LINE + LOGE("The format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -324,7 +324,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__); //LCOV_EXCL_LINE + LOGE("The format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -345,7 +345,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__); //LCOV_EXCL_LINE + LOGE("The format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -366,7 +366,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__); //LCOV_EXCL_LINE + LOGE("The format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -387,7 +387,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -410,7 +410,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__); //LCOV_EXCL_LINE + LOGE("The format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -433,7 +433,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -456,7 +456,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__); //LCOV_EXCL_LINE + LOGE("The format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -479,7 +479,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__); //LCOV_EXCL_LINE + LOGE("The format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -503,7 +503,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -527,7 +527,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -551,7 +551,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -575,7 +575,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -599,7 +599,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -623,7 +623,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } @@ -647,7 +647,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__); //LCOV_EXCL_LINE + LOGE("the format can not be changed.."); //LCOV_EXCL_LINE return MEDIA_FORMAT_ERROR_INVALID_OPERATION; } diff --git a/src/media_packet.c b/src/media_packet.c index f8362cb..d3d143f 100644 --- a/src/media_packet.c +++ b/src/media_packet.c @@ -58,7 +58,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); //LCOV_EXCL_LINE + LOGE("MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIA_PACKET_ERROR_OUT_OF_MEMORY); //LCOV_EXCL_LINE ret = MEDIA_PACKET_ERROR_OUT_OF_MEMORY; goto fail; } @@ -79,7 +79,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); //LCOV_EXCL_LINE + LOGE("failed __pkt_alloc_buffer(), err = (0x%08x)", ret); //LCOV_EXCL_LINE goto fail; } @@ -95,7 +95,7 @@ int media_packet_create_alloc(media_format_h fmt, media_packet_finalize_cb fcb, /* take handle */ *packet = (media_packet_h)handle; - LOGI("[%s] new handle : %p", __FUNCTION__, *packet); + LOGI("new handle : %p", *packet); return ret; fail: @@ -132,7 +132,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); //LCOV_EXCL_LINE + LOGE("MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIA_PACKET_ERROR_OUT_OF_MEMORY); //LCOV_EXCL_LINE return MEDIA_PACKET_ERROR_OUT_OF_MEMORY; } @@ -161,7 +161,7 @@ int media_packet_create(media_format_h fmt, media_packet_finalize_cb fcb, void * /* take handle */ *packet = (media_packet_h)handle; - LOGI("[%s] new handle : %p", __FUNCTION__, *packet); + LOGI("new handle : %p", *packet); return ret; } @@ -182,7 +182,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); //LCOV_EXCL_LINE + LOGE("MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIA_PACKET_ERROR_OUT_OF_MEMORY); //LCOV_EXCL_LINE return MEDIA_PACKET_ERROR_OUT_OF_MEMORY; } @@ -204,14 +204,14 @@ int media_packet_copy(media_packet_h org_packet, media_packet_finalize_cb fcb, v /* take handle */ *new_packet = (media_packet_h)handle; - LOGI("[%s] new handle : %p", __FUNCTION__, *new_packet); + LOGI("new handle : %p", *new_packet); return ret; } int media_packet_alloc(media_packet_h packet) { - LOGI("[%s] start", __FUNCTION__); + LOGI("start"); media_packet_s *handle; int ret = MEDIA_PACKET_ERROR_NONE; @@ -222,7 +222,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); //LCOV_EXCL_LINE + LOGE("MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIA_PACKET_ERROR_OUT_OF_MEMORY); //LCOV_EXCL_LINE ret = err; goto fail; } @@ -230,7 +230,7 @@ int media_packet_alloc(media_packet_h packet) /* allocated buffer */ handle->is_allocated = true; - LOGI("[%s] end", __FUNCTION__); + LOGI("end"); return ret; fail: @@ -571,7 +571,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); //LCOV_EXCL_LINE + LOGE("MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIA_PACKET_ERROR_OUT_OF_MEMORY); //LCOV_EXCL_LINE return MEDIA_PACKET_ERROR_OUT_OF_MEMORY; } @@ -605,7 +605,7 @@ int media_packet_create_from_tbm_surface(media_format_h fmt, tbm_surface_h surfa /* take handle */ *packet = (media_packet_h)handle; - LOGI("[%s] new handle : %p", __FUNCTION__, *packet); + LOGI("new handle : %p", *packet); return ret; fail: @@ -647,7 +647,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); //LCOV_EXCL_LINE + LOGE("MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIA_PACKET_ERROR_OUT_OF_MEMORY); //LCOV_EXCL_LINE return MEDIA_PACKET_ERROR_OUT_OF_MEMORY; } @@ -672,7 +672,7 @@ int media_packet_create_from_external_memory(media_format_h fmt, void *mem_ptr, /* take handle */ *packet = (media_packet_h)handle; - LOGI("[%s] new handle : %p", __FUNCTION__, *packet); + LOGI("new handle : %p", *packet); return ret; } @@ -1317,7 +1317,7 @@ int media_packet_destroy(media_packet_h packet) ret = __pkt_dealloc_buffer(handle); if (ret != MEDIA_PACKET_ERROR_NONE) { - LOGE("[%s] failed __pkt_dealloc_buffer(), err = (0x%08x)", __FUNCTION__, ret); //LCOV_EXCL_LINE + LOGE("failed __pkt_dealloc_buffer(), err = (0x%08x)", ret); //LCOV_EXCL_LINE return ret; } /* unreference media_format */ diff --git a/src/media_packet_internal.c b/src/media_packet_internal.c index 8b6a3af..a2e6f8f 100644 --- a/src/media_packet_internal.c +++ b/src/media_packet_internal.c @@ -38,7 +38,7 @@ int media_packet_set_codec_data(media_packet_h packet, void *codec_data, unsigne handle->codec_data = (void *)malloc(codec_data_size); if (handle->codec_data == NULL) { - LOGE("[%s] MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_PACKET_ERROR_OUT_OF_MEMORY); + LOGE("MEDIA_PACKET_ERROR_OUT_OF_MEMORY(0x%08x)", MEDIA_PACKET_ERROR_OUT_OF_MEMORY); return MEDIA_PACKET_ERROR_OUT_OF_MEMORY; }