diff --git a/ChangeLog b/ChangeLog index 98c4f7f2eb..3e2e779942 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-12 Tim-Philipp Müller + + * tools/gst-launch.c: (print_tag): + Print something more intelligible for image tags when + using the -t switch (#341556). + 2006-05-12 Thomas Vander Stichele * Makefile.am: diff --git a/tools/gst-launch.c b/tools/gst-launch.c index 03aec4a70b..002b7dee57 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -245,6 +245,19 @@ print_tag (const GstTagList * list, const gchar * tag, gpointer unused) 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 if (gst_tag_get_type (tag) == GST_TYPE_BUFFER) { + GstBuffer *img; + + img = gst_value_get_buffer (gst_tag_list_get_value_index (list, tag, i)); + if (img) { + gchar *caps_str; + + caps_str = GST_BUFFER_CAPS (img) ? + gst_caps_to_string (GST_BUFFER_CAPS (img)) : g_strdup ("unknown"); + str = g_strdup_printf ("buffer of %u bytes, type: %s", + GST_BUFFER_SIZE (img), caps_str); + g_free (caps_str); + } } else { str = g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i));