From: Gilbok Lee Date: Fri, 24 Feb 2023 04:49:10 +0000 (+0900) Subject: [0.6.276] Disable print taglist function X-Git-Tag: accepted/tizen/unified/20230303.162757~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4a859c494f84d44d7cd1d4fa46b6f9e305554fc;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git [0.6.276] Disable print taglist function Change-Id: I93f246ffeaa319e78d2b419e3e06fe933a6531ab --- diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 3c54fab..5cec31e 100644 --- a/packaging/libmm-player.spec +++ b/packaging/libmm-player.spec @@ -1,6 +1,6 @@ Name: libmm-player Summary: Multimedia Framework Player Library -Version: 0.6.275 +Version: 0.6.276 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_player_gst.c b/src/mm_player_gst.c index 585a8a7..8d442fe 100644 --- a/src/mm_player_gst.c +++ b/src/mm_player_gst.c @@ -51,35 +51,6 @@ | FUNCTION DEFINITIONS | | | ========================================================================================== */ -#ifdef __DEBUG__ -static void -print_tag(const GstTagList *list, const gchar *tag, gpointer unused) -{ - gint i, count; - - count = gst_tag_list_get_tag_size(list, tag); - - LOGD("count = %d", count); - - for (i = 0; i < count; i++) { - gchar *str; - - if (gst_tag_get_type(tag) == G_TYPE_STRING) { - if (!gst_tag_list_get_string_index(list, tag, i, &str)) - g_assert_not_reached(); - } else { - str = g_strdup_value_contents(gst_tag_list_get_value_index(list, tag, i)); - } - - if (i == 0) - g_print(" %15s: %s", gst_tag_get_nick(tag), str); - else - g_print(" : %s", str); - - g_free(str); - } -} -#endif static gboolean __mmplayer_check_error_posted_from_activated_track(mmplayer_t *player, gchar *src_element_name) @@ -1882,6 +1853,7 @@ __mmplayer_gst_handle_async_done_message(mmplayer_t *player, GstMessage *msg) return; } +#ifdef __DEBUG__ static void __mmplayer_print_tag_foreach(const GstTagList *tags, const gchar *tag, gpointer user_data) { @@ -1901,35 +1873,38 @@ __mmplayer_print_tag_foreach(const GstTagList *tags, const gchar *tag, gpointer g_free(str); g_value_unset(&val); } +#endif static void __mmplayer_dump_collection(GstStreamCollection * collection) { guint i = 0; +#ifdef __DEBUG__ GstTagList *tags = NULL; +#endif GstCaps *caps = NULL; for (i = 0; i < gst_stream_collection_get_size(collection); i++) { GstStream *stream = gst_stream_collection_get_stream(collection, i); - LOGD ("collection: Stream %u type %s flags 0x%x\n", i, + LOGD ("collection: [%u] Stream, type: %s, flags 0x%x\n", i, gst_stream_type_get_name(gst_stream_get_stream_type(stream)), gst_stream_get_stream_flags(stream)); LOGD (" ID: %s\n", gst_stream_get_stream_id(stream)); caps = gst_stream_get_caps(stream); if (caps) { - gchar *caps_str = gst_caps_to_string(caps); - LOGD (" caps: %s\n", caps_str); - g_free(caps_str); + MMPLAYER_LOG_GST_CAPS_TYPE(caps); gst_caps_unref(caps); } +#ifdef __DEBUG__ tags = gst_stream_get_tags(stream); if (tags) { LOGD (" tags:\n"); gst_tag_list_foreach(tags, __mmplayer_print_tag_foreach, GUINT_TO_POINTER(MMPLAYER_TAG_INDENT)); gst_tag_list_unref(tags); } +#endif } } @@ -1941,12 +1916,11 @@ __mmplayer_stream_notify_cb(GstStreamCollection *collection, gst_stream_get_stream_id(stream), pspec->name, collection); if (g_str_equal(pspec->name, "caps")) { GstCaps *caps = gst_stream_get_caps(stream); - gchar *caps_str = gst_caps_to_string(caps); - LOGD (" New caps: %s\n", caps_str); - g_free(caps_str); + MMPLAYER_LOG_GST_CAPS_TYPE(caps); gst_caps_unref(caps); } +#ifdef __DEBUG__ if (g_str_equal (pspec->name, "tags")) { GstTagList *tags = gst_stream_get_tags(stream); if (tags) { @@ -1955,6 +1929,7 @@ __mmplayer_stream_notify_cb(GstStreamCollection *collection, gst_tag_list_unref(tags); } } +#endif } static void @@ -2154,7 +2129,7 @@ __mmplayer_gst_bus_sync_callback(GstBus *bus, GstMessage *message, gpointer data LOGE("TAGS received from element \"%s\".", GST_STR_NULL(GST_ELEMENT_NAME(GST_MESSAGE_SRC(message)))); - gst_tag_list_foreach(tags, print_tag, NULL); + gst_tag_list_foreach(tags, __mmplayer_print_tag_foreach, GUINT_TO_POINTER(MMPLAYER_TAG_INDENT)); gst_tag_list_unref(tags); tags = NULL; }