summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/media-info/media-info-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/media-info/media-info-test.c')
-rw-r--r--gst-libs/gst/media-info/media-info-test.c56
1 files changed, 3 insertions, 53 deletions
diff --git a/gst-libs/gst/media-info/media-info-test.c b/gst-libs/gst/media-info/media-info-test.c
index 553e97c6..5a73c8bd 100644
--- a/gst-libs/gst/media-info/media-info-test.c
+++ b/gst-libs/gst/media-info/media-info-test.c
@@ -5,56 +5,6 @@
#include "media-info.h"
static void
-caps_print (GstCaps *caps)
-{
- if (caps == NULL) return;
- /*
- if (!strcmp (gst_caps_get_mime (caps), "application/x-gst-metadata") ||
- !strcmp (gst_caps_get_mime (caps), "application/x-gst-streaminfo"))
- */
- if (TRUE)
- {
- GstProps *props = caps->properties;
- GList *walk;
-
- if (props == NULL)
- {
- g_print (" none\n");
- return;
- }
- walk = props->properties;
-
- while (walk) {
- GstPropsEntry *entry = (GstPropsEntry *) walk->data;
- const gchar *name;
- const gchar *str_val;
- gint int_val;
- GstPropsType type;
-
- name = gst_props_entry_get_name (entry);
- type = gst_props_entry_get_props_type (entry);
- switch (type) {
- case GST_PROPS_STRING_TYPE:
- gst_props_entry_get_string (entry, &str_val);
- g_print (" %s='%s'\n", name, str_val);
- break;
- case GST_PROPS_INT_TYPE:
- gst_props_entry_get_int (entry, &int_val);
- g_print (" %s=%d\n", name, int_val);
- break;
- default:
- break;
- }
-
- walk = g_list_next (walk);
- }
- }
- else {
- g_print (" unkown caps type\n");
- }
-}
-
-static void
info_print (GstMediaInfoStream *stream)
{
int i;
@@ -77,11 +27,11 @@ info_print (GstMediaInfoStream *stream)
g_print ("- track %d\n", i);
track = (GstMediaInfoTrack *) p->data;
g_print (" - metadata:\n");
- caps_print (track->metadata);
+ g_print ("%s\n", gst_caps_to_string (track->metadata));
g_print (" - streaminfo:\n");
- caps_print (track->streaminfo);
+ g_print ("%s\n", gst_caps_to_string (track->streaminfo));
g_print (" - format:\n");
- caps_print (track->format);
+ g_print ("%s\n", gst_caps_to_string (track->format));
p = p->next;
}
}