mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
tools: Improve pretty-printing of tags
Avoids escaping strings for nothing and printing out useless buffer contents.
This commit is contained in:
parent
b40c0b875c
commit
fce99dc0be
1 changed files with 7 additions and 1 deletions
|
@ -243,6 +243,12 @@ print_tag_each (GQuark field_id, const GValue * value, gpointer user_data)
|
|||
gint tab = GPOINTER_TO_INT (user_data);
|
||||
gchar *ser;
|
||||
|
||||
if (G_VALUE_HOLDS_STRING (value))
|
||||
ser = g_value_dup_string (value);
|
||||
else if (GST_VALUE_HOLDS_BUFFER (value)) {
|
||||
GstBuffer *buf = gst_value_get_buffer (value);
|
||||
ser = g_strdup_printf ("<GstBuffer [%d bytes]>", GST_BUFFER_SIZE (buf));
|
||||
} else
|
||||
ser = gst_value_serialize (value);
|
||||
|
||||
g_print ("%*s%s: %s\n", tab, " ",
|
||||
|
|
Loading…
Reference in a new issue