From db86baf99dd1c7a80d28b4e6001fbf2b0d393540 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Fri, 24 Feb 2023 13:49:10 +0900 Subject: [PATCH] [0.6.273] Disable print taglist function Change-Id: I93f246ffeaa319e78d2b419e3e06fe933a6531ab --- packaging/libmm-player.spec | 2 +- src/mm_player_gst.c | 49 +++++++++---------------------------- 2 files changed, 13 insertions(+), 38 deletions(-) diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 1ec98a9..fe4aa9a 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.272 +Version: 0.6.273 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_player_gst.c b/src/mm_player_gst.c index 6abf729..5ec69e8 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) @@ -1895,6 +1866,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) { @@ -1914,35 +1886,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 } } @@ -1954,12 +1929,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) { @@ -1968,6 +1942,7 @@ __mmplayer_stream_notify_cb(GstStreamCollection *collection, gst_tag_list_unref(tags); } } +#endif } static void @@ -2167,7 +2142,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; } -- 2.34.1