summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-04-17 17:31:24 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-04-17 17:32:01 +0200
commitc4f15da97fb6cb43f7e9844db454b39507a2555d (patch)
tree3b8caf1f81b1be27f2de896d7a07d695fd85636f /tools
parenta008aa0b463f688ae138ea0c7b4488e94706915b (diff)
discoverer: Tags now contain GstSamples instead of GstBuffers
Diffstat (limited to 'tools')
-rw-r--r--tools/gst-discoverer.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/gst-discoverer.c b/tools/gst-discoverer.c
index c28ee648f..7cdf2bf5f 100644
--- a/tools/gst-discoverer.c
+++ b/tools/gst-discoverer.c
@@ -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);