mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
discoverer: Tags now contain GstSamples instead of GstBuffers
This commit is contained in:
parent
a008aa0b46
commit
c4f15da97f
1 changed files with 9 additions and 3 deletions
|
@ -319,10 +319,16 @@ print_tag_each (GQuark field_id, const GValue * value, gpointer user_data)
|
||||||
if (G_VALUE_HOLDS_STRING (value))
|
if (G_VALUE_HOLDS_STRING (value))
|
||||||
ser = g_value_dup_string (value);
|
ser = g_value_dup_string (value);
|
||||||
else if (GST_VALUE_HOLDS_BUFFER (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 =
|
ser =
|
||||||
g_strdup_printf ("<GstBuffer [%" G_GSIZE_FORMAT " bytes]>",
|
g_strdup_printf ("<GstSample [%" G_GSIZE_FORMAT " bytes, type %s]>",
|
||||||
gst_buffer_get_size (buf));
|
gst_buffer_get_size (buf), caps_str);
|
||||||
|
g_free (caps_str);
|
||||||
} else
|
} else
|
||||||
ser = gst_value_serialize (value);
|
ser = gst_value_serialize (value);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue