summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-03-24 15:26:57 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2009-03-24 15:26:57 +0100
commitc081c6b747a1a1f80bd042cd3c5c9646a9f95216 (patch)
tree7b1cb4d468d8903e3efc276f74062dc8669903d7 /tests
parent786b0c248ce019e535f0307b4b105a665d8782d1 (diff)
seek: print tags from the different tracks
Diffstat (limited to 'tests')
-rw-r--r--tests/examples/seek/seek.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c
index 2eddc151c..e24fe5751 100644
--- a/tests/examples/seek/seek.c
+++ b/tests/examples/seek/seek.c
@@ -1729,7 +1729,7 @@ update_streams (GstPipeline * pipeline)
if (pipeline_type == 16 && need_streams) {
GstTagList *tags;
- gchar *name;
+ gchar *name, *str;
gint active_idx;
gboolean state;
@@ -1746,6 +1746,11 @@ update_streams (GstPipeline * pipeline)
active_idx = 0;
for (i = 0; i < n_video; i++) {
g_signal_emit_by_name (pipeline, "get-video-tags", i, &tags);
+ if (tags) {
+ str = gst_structure_to_string ((GstStructure *) tags);
+ g_print ("video %d: %s\n", i, str);
+ g_free (str);
+ }
/* find good name for the label */
name = g_strdup_printf ("video %d", i + 1);
gtk_combo_box_append_text (GTK_COMBO_BOX (video_combo), name);
@@ -1758,6 +1763,11 @@ update_streams (GstPipeline * pipeline)
active_idx = 0;
for (i = 0; i < n_audio; i++) {
g_signal_emit_by_name (pipeline, "get-audio-tags", i, &tags);
+ if (tags) {
+ str = gst_structure_to_string ((GstStructure *) tags);
+ g_print ("audio %d: %s\n", i, str);
+ g_free (str);
+ }
/* find good name for the label */
name = g_strdup_printf ("audio %d", i + 1);
gtk_combo_box_append_text (GTK_COMBO_BOX (audio_combo), name);
@@ -1770,10 +1780,15 @@ update_streams (GstPipeline * pipeline)
active_idx = 0;
for (i = 0; i < n_text; i++) {
g_signal_emit_by_name (pipeline, "get-text-tags", i, &tags);
+
name = NULL;
if (tags) {
const GValue *value;
+ str = gst_structure_to_string ((GstStructure *) tags);
+ g_print ("text %d: %s\n", i, str);
+ g_free (str);
+
/* get the language code if we can */
value = gst_tag_list_get_value_index (tags, GST_TAG_LANGUAGE_CODE, 0);
if (value && G_VALUE_HOLDS_STRING (value)) {