Commit fce99dc0 authored by Edward Hervey's avatar Edward Hervey
Browse files

tools: Improve pretty-printing of tags

Avoids escaping strings for nothing and printing out useless buffer contents.
parent b40c0b87
......@@ -243,7 +243,13 @@ print_tag_each (GQuark field_id, const GValue * value, gpointer user_data)
gint tab = GPOINTER_TO_INT (user_data);
gchar *ser;
ser = gst_value_serialize (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, " ",
gst_tag_get_nick (g_quark_to_string (field_id)), ser);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment