tools: print TOC scope
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 28 Jul 2012 07:30:36 +0000 (08:30 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Sat, 28 Jul 2012 08:40:25 +0000 (09:40 +0100)
tools/gst-launch.c

index 2c1db34..1329590 100644 (file)
@@ -681,6 +681,7 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
         break;
       case GST_MESSAGE_TOC:
         if (toc) {
+          GstTocScope toc_scope;
           GstToc *toc;
           GList *entries;
           gboolean updated;
@@ -696,6 +697,11 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
           }
 
           gst_message_parse_toc (message, &toc, &updated);
+
+          toc_scope = gst_toc_get_scope (toc);
+          PRINT (_("  TOC scope: %s\n"),
+              (toc_scope == GST_TOC_SCOPE_GLOBAL) ? _("global") : _("current"));
+
           /* recursively loop over toc entries */
           entries = gst_toc_get_entries (toc);
           g_list_foreach (entries, print_toc_entry, GUINT_TO_POINTER (0));