From: Sebastian Dröge Date: Thu, 5 Jul 2012 09:03:52 +0000 (+0200) Subject: discoverer: Update for GstToc API changes X-Git-Tag: 1.19.3~511^2~6248 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9ee382e7aeb4e57618250bc6dcd399fa2286a12;p=platform%2Fupstream%2Fgstreamer.git discoverer: Update for GstToc API changes --- diff --git a/tools/gst-discoverer.c b/tools/gst-discoverer.c index f706f55..51fd5b4 100644 --- a/tools/gst-discoverer.c +++ b/tools/gst-discoverer.c @@ -366,23 +366,27 @@ print_toc_entry (gpointer data, gpointer user_data) GstTocEntry *entry = (GstTocEntry *) data; gint depth = GPOINTER_TO_INT (user_data); guint indent = MIN (GPOINTER_TO_UINT (user_data), MAX_INDENT); + GstTagList *tags; + GList *subentries; gint64 start, stop; - gst_toc_entry_get_start_stop (entry, &start, &stop); + gst_toc_entry_get_start_stop_times (entry, &start, &stop); g_print ("%*s%s: start: %" GST_TIME_FORMAT " stop: %" GST_TIME_FORMAT "\n", - depth, " ", gst_toc_entry_type_get_nick (entry->type), + depth, " ", + gst_toc_entry_type_get_nick (gst_toc_entry_get_entry_type (entry)), GST_TIME_ARGS (start), GST_TIME_ARGS (stop)); indent += 2; /* print tags */ - if (entry->type == GST_TOC_ENTRY_TYPE_CHAPTER) + tags = gst_toc_entry_get_tags (entry); + if (tags) { g_print ("%*sTags:\n", 2 * depth, " "); - gst_tag_list_foreach (entry->tags, print_tag_foreach, - GUINT_TO_POINTER (indent)); + gst_tag_list_foreach (tags, print_tag_foreach, GUINT_TO_POINTER (indent)); + } /* loop over sub-toc entries */ - g_list_foreach (entry->subentries, print_toc_entry, - GUINT_TO_POINTER (indent)); + subentries = gst_toc_entry_get_sub_entries (entry); + g_list_foreach (subentries, print_toc_entry, GUINT_TO_POINTER (indent)); } static void @@ -414,8 +418,11 @@ print_properties (GstDiscovererInfo * info, gint tab) } } if (show_toc && (toc = gst_discoverer_info_get_toc (info))) { + GList *entries; + g_print ("%*sTOC: \n", tab + 1, " "); - g_list_foreach (toc->entries, print_toc_entry, GUINT_TO_POINTER (tab + 5)); + entries = gst_toc_get_entries (toc); + g_list_foreach (entries, print_toc_entry, GUINT_TO_POINTER (tab + 5)); } }