[Bug 540890] Need generic way of handling multi-track/chapters files

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Mar 22 12:45:05 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=540890
  GStreamer | gstreamer (core) | git

--- Comment #88 from Alexander Saprykin <xelfium at gmail.com> 2012-03-22 19:44:57 UTC ---
(In reply to comment #87)
> Review of attachment 209758 [details]:
> 
> ::: gst/gsttoc.c
> @@ +39,3 @@
> + * lists. You should use GST_TOC_ENTRY_TYPE_CHAPTER for generic TOC entry and
> + * GST_TOC_ENTRY_TYPE_EDITION for the entries which are considered to be
> alternatives
> + * (like DVD angles, Matroska editions and so on).
> 
> Is the hierarchy at most two levels deep?
> GstToc
>   GstTocEntry (in GstToc.entries)
>     GstTocEntry (in GstToc.subentries) 
>     GstTocEntry (in GstToc.subentries) 
>     ...
>   GstTocEntry (in GstToc.entries)
>     GstTocEntry (in GstToc.subentries)
>     ...
>   ...
> 
> 
> Or is it arbitrary, so that GstTocEntries can have a list of GstTocEntries
> again?

The hierarchy is arbitrary, so GstTocEntry has GList field named "subentries"
which contains another GstTocEntries and so on. The only limitation is that
chapters and editions can't be mixed at the same hierarchy level. In that case
TOC supposed to be broken. As I remember, we have disscussed this moment with
Sebastian and decided that mixed chapters and angles on the same level wouldn't
have much meaning.

> @@ +55,3 @@
> + * and gst_event_parse_toc_select() to parse received TOC select event. The
> same rule for
> + * the #GstMessage: gst_message_new_toc() to create new TOC #GstMessage, and
> + * gst_message_parse_toc() to parse received TOC message. Also you can create
> a new TOC query
> 
> For the toc parsing I am not sure how applications would iterate over the
> content. Could point to the totem chapters plugin sources in a reply on this
> bug?

Totem chapters plugin doesn't support TOC. So there is no application which
uses it at all. Well, the iteration is quite easy: just go through subentries
recursively. Functions you've mentioned below do exactly the same thing. I can
write an example of such usage in developer paper which is coming next days.

> @@ +482,3 @@
> +GstToc *
> +_gst_toc_from_structure (const GstStructure * toc)
> +{
> 
> please add a comment for where this is needed.
> 
> @@ +647,3 @@
> +GstStructure *
> +_gst_toc_to_structure (const GstToc * toc)
> +{
> 
> please add a comment for where this is needed.

These functions are used to parse TOC messages, events and queries. It seems
that there is no need to make them public. Do you want to add comments about
these functions right into the source code?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list