| 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)
return;
}
+#ifdef __DEBUG__
static void
__mmplayer_print_tag_foreach(const GstTagList *tags, const gchar *tag, gpointer user_data)
{
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
}
}
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) {
gst_tag_list_unref(tags);
}
}
+#endif
}
static void
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;
}