~ubuntu-branches/ubuntu/trusty/gstreamer1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst/gsttoc.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2012-09-14 09:04:41 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120914090441-1ul912ezvm3xfael
Tags: 0.11.94-1
* New upstream release:
  + debian/libgstreamer.symbols:
    - Update symbols file.
  + debian/control.in:
    - Build-depend on gtk-doc >= 1.12.
  + debian/patches/0001-netclientclock-simplify-by-using-g_socket_condition_.patch:
    - Dropped, merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 *
36
36
 * Using TOC is very easy. Firstly, create #GstToc structure which represents root
37
37
 * contents of the source. You can also attach TOC-specific tags to it. Then fill
38
 
 * it with #GstTocEntry entries by appending them to #GstToc.entries #GstTocEntry.subentries
39
 
 * lists. You should use GST_TOC_ENTRY_TYPE_CHAPTER for generic TOC entry and
40
 
 * GST_TOC_ENTRY_TYPE_EDITION for the entries which are considered to be alternatives
41
 
 * (like DVD angles, Matroska editions and so on).
 
38
 * it with #GstTocEntry entries by appending them to the #GstToc using
 
39
 * gst_toc_append_entry(), and appending subentries to a #GstTocEntry using
 
40
 * gst_toc_entry_append_sub_entry().
42
41
 *
43
42
 * Note that root level of the TOC can contain only either editions or chapters. You
44
43
 * should not mix them together at the same level. Otherwise you will get serialization
45
44
 * /deserialization errors. Make sure that no one of the entries has negative start and
46
45
 *  stop values.
47
46
 *
48
 
 * Please, use #GstToc.info and #GstTocEntry.info fields in that way: create a #GstStructure,
49
 
 * put all info related to your element there and put this structure into the info field under
50
 
 * the name of your element. Some fields in the info structure can be used for internal purposes,
51
 
 * so you should use it in the way described above to not to overwrite already existent fields.
52
 
 *
53
47
 * Use gst_event_new_toc() to create a new TOC #GstEvent, and gst_event_parse_toc() to
54
48
 * parse received TOC event. Use gst_event_new_toc_select() to create a new TOC select #GstEvent,
55
49
 * and gst_event_parse_toc_select() to parse received TOC select event. The same rule for
56
50
 * the #GstMessage: gst_message_new_toc() to create new TOC #GstMessage, and
57
 
 * gst_message_parse_toc() to parse received TOC message. Also you can create a new TOC query
58
 
 * with gst_query_new_toc(), set it with gst_query_set_toc() and parse it with
59
 
 * gst_query_parse_toc().
 
51
 * gst_message_parse_toc() to parse received TOC message.
 
52
 *
 
53
 * TOCs can have global scope or current scope. Global scope TOCs contain
 
54
 * all entries that can possibly be selected using a toc select event, and
 
55
 * are what an application is usually interested in. TOCs with current scope
 
56
 * only contain the parts of the TOC relevant to the currently selected/playing
 
57
 * stream; the current scope TOC is used by downstream elements such as muxers
 
58
 * to write correct TOC entries when transcoding files, for example. When
 
59
 * playing a DVD, the global TOC would contain a hierarchy of all titles,
 
60
 * chapters and angles, for example, while the current TOC would only contain
 
61
 * the chapters for the currently playing title if playback of a specific
 
62
 * title was requested.
60
63
 */
61
64
 
62
65
#ifdef HAVE_CONFIG_H
421
424
 * Copy #GstToc with all subentries (deep copy).
422
425
 *
423
426
 * Returns: newly allocated #GstToc in case of success, NULL otherwise;
424
 
 * free it when done with gst_toc_free().
 
427
 * free it when done with gst_toc_unref().
425
428
 */
426
429
static GstToc *
427
430
gst_toc_copy (const GstToc * toc)
616
619
}
617
620
 
618
621
/**
619
 
 * gst_toc_entry_get_uid:
 
622
 * gst_toc_entry_get_sub_entries:
620
623
 * @entry: A #GstTocEntry instance
621
624
 *
622
625
 * Gets the sub-entries of @entry.