discoverer: Tags now contain GstSamples instead of GstBuffers

This commit is contained in:
Sebastian Dröge 2012-04-17 17:31:24 +02:00
parent a008aa0b46
commit c4f15da97f

View file

@ -319,10 +319,16 @@ print_tag_each (GQuark field_id, const GValue * value, gpointer user_data)
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);
GstSample *smpl = gst_value_get_sample (value);
GstBuffer *buf = gst_sample_get_buffer (smpl);
GstCaps *caps = gst_sample_get_caps (smpl);
gchar *caps_str;
caps_str = caps ? gst_caps_to_string (caps) : g_strdup ("unknown");
ser =
g_strdup_printf ("<GstBuffer [%" G_GSIZE_FORMAT " bytes]>",
gst_buffer_get_size (buf));
g_strdup_printf ("<GstSample [%" G_GSIZE_FORMAT " bytes, type %s]>",
gst_buffer_get_size (buf), caps_str);
g_free (caps_str);
} else
ser = gst_value_serialize (value);