Toc

#GstToc functions are used to create/free #GstToc and #GstTocEntry structures. Also they are used to convert #GstToc into #GstStructure and vice versa.

#GstToc lets you to inform other elements in pipeline or application that playing source has some kind of table of contents (TOC). These may be chapters, editions, angles or other types. For example: DVD chapters, Matroska chapters or cue sheet TOC. Such TOC will be useful for applications to display instead of just a playlist.

Using TOC is very easy. Firstly, create #GstToc structure which represents root contents of the source. You can also attach TOC-specific tags to it. Then fill it with #GstTocEntry entries by appending them to the #GstToc using gst.toc.Toc.appendEntry, and appending subentries to a #GstTocEntry using gst.toc_entry.TocEntry.appendSubEntry.

Note that root level of the TOC can contain only either editions or chapters. You should not mix them together at the same level. Otherwise you will get serialization /deserialization errors. Make sure that no one of the entries has negative start and stop values.

Use gst.event.Event.newToc to create a new TOC #GstEvent, and gst.event.Event.parseToc to parse received TOC event. Use gst.event.Event.newTocSelect to create a new TOC select #GstEvent, and gst.event.Event.parseTocSelect to parse received TOC select event. The same rule for the #GstMessage: gst.message.Message.newToc to create new TOC #GstMessage, and gst.message.Message.parseToc to parse received TOC message.

TOCs can have global scope or current scope. Global scope TOCs contain all entries that can possibly be selected using a toc select event, and are what an application is usually interested in. TOCs with current scope only contain the parts of the TOC relevant to the currently selected/playing stream; the current scope TOC is used by downstream elements such as muxers to write correct TOC entries when transcoding files, for example. When playing a DVD, the global TOC would contain a hierarchy of all titles, chapters and angles, for example, while the current TOC would only contain the chapters for the currently playing title if playback of a specific title was requested.

Applications and plugins should not rely on TOCs having a certain kind of structure, but should allow for different alternatives. For example, a simple CUE sheet embedded in a file may be presented as a flat list of track entries, or could have a top-level edition node (or some other alternative type entry) with track entries underneath that node; or even multiple top-level edition nodes (or some other alternative type entries) each with track entries underneath, in case the source file has extracted a track listing from different sources).

Constructors

this
this(gst.types.TocScope scope_)

Create a new #GstToc structure.

Members

Functions

appendEntry
void appendEntry(gst.toc_entry.TocEntry entry)

Appends the #GstTocEntry entry to toc.

dump
void dump()
findEntry
gst.toc_entry.TocEntry findEntry(string uid)

Find #GstTocEntry with given uid in the toc.

getEntries
gst.toc_entry.TocEntry[] getEntries()

Gets the list of #GstTocEntry of toc.

getScope
gst.types.TocScope getScope()
getTags
gst.tag_list.TagList getTags()

Gets the tags for toc.

mergeTags
void mergeTags(gst.tag_list.TagList tags, gst.types.TagMergeMode mode)

Merge tags into the existing tags of toc using mode.

setTags
void setTags(gst.tag_list.TagList tags)

Set a #GstTagList with tags for the complete toc.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.