gi-gst-1.0.11: GStreamer bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Structs.Toc

Contents

Description

Toc functions are used to create/free Toc and TocEntry structures. Also they are used to convert Toc into Structure and vice versa.

Toc 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 Toc structure which represents root contents of the source. You can also attach TOC-specific tags to it. Then fill it with TocEntry entries by appending them to the Toc using tocAppendEntry, and appending subentries to a TocEntry using tocEntryAppendSubEntry.

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 eventNewToc to create a new TOC Event, and eventParseToc to parse received TOC event. Use eventNewTocSelect to create a new TOC select Event, and eventParseTocSelect to parse received TOC select event. The same rule for the Message: messageNewToc to create new TOC Message, and messageParseToc 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).

Synopsis

Exported types

newtype Toc Source #

Constructors

Toc (ManagedPtr Toc) 

Instances

BoxedObject Toc Source # 

Methods

boxedType :: Toc -> IO GType #

((~) * info (ResolveTocMethod t Toc), MethodInfo * info Toc p) => IsLabel t (Toc -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Toc -> p #

((~) * info (ResolveTocMethod t Toc), MethodInfo * info Toc p) => IsLabelProxy t (Toc -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Toc -> p #

HasAttributeList * Toc Source # 
((~) * signature (Maybe TagList -> m ()), MonadIO m) => MethodInfo * TocSetTagsMethodInfo Toc signature Source # 
((~) * signature (Maybe TagList -> TagMergeMode -> m ()), MonadIO m) => MethodInfo * TocMergeTagsMethodInfo Toc signature Source # 
((~) * signature (m TagList), MonadIO m) => MethodInfo * TocGetTagsMethodInfo Toc signature Source # 
((~) * signature (m TocScope), MonadIO m) => MethodInfo * TocGetScopeMethodInfo Toc signature Source # 
((~) * signature (m [TocEntry]), MonadIO m) => MethodInfo * TocGetEntriesMethodInfo Toc signature Source # 
((~) * signature (Text -> m (Maybe TocEntry)), MonadIO m) => MethodInfo * TocFindEntryMethodInfo Toc signature Source # 
((~) * signature (m ()), MonadIO m) => MethodInfo * TocDumpMethodInfo Toc signature Source # 

Methods

overloadedMethod :: MethodProxy TocDumpMethodInfo Toc -> signature -> s #

((~) * signature (TocEntry -> m ()), MonadIO m) => MethodInfo * TocAppendEntryMethodInfo Toc signature Source # 
type AttributeList Toc Source # 

Methods

appendEntry

data TocAppendEntryMethodInfo Source #

Instances

((~) * signature (TocEntry -> m ()), MonadIO m) => MethodInfo * TocAppendEntryMethodInfo Toc signature Source # 

tocAppendEntry Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Toc

toc: A Toc instance

-> TocEntry

entry: A TocEntry

-> m () 

Appends the TocEntry entry to toc.

dump

data TocDumpMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * TocDumpMethodInfo Toc signature Source # 

Methods

overloadedMethod :: MethodProxy TocDumpMethodInfo Toc -> signature -> s #

tocDump :: (HasCallStack, MonadIO m) => Toc -> m () Source #

No description available in the introspection data.

findEntry

data TocFindEntryMethodInfo Source #

Instances

((~) * signature (Text -> m (Maybe TocEntry)), MonadIO m) => MethodInfo * TocFindEntryMethodInfo Toc signature Source # 

tocFindEntry Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Toc

toc: Toc to search in.

-> Text

uid: UID to find TocEntry with.

-> m (Maybe TocEntry)

Returns: TocEntry with specified uid from the toc, or Nothing if not found.

Find TocEntry with given uid in the toc.

getEntries

data TocGetEntriesMethodInfo Source #

Instances

((~) * signature (m [TocEntry]), MonadIO m) => MethodInfo * TocGetEntriesMethodInfo Toc signature Source # 

tocGetEntries Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Toc

toc: A Toc instance

-> m [TocEntry]

Returns: A List of TocEntry for entry

Gets the list of TocEntry of toc.

getScope

data TocGetScopeMethodInfo Source #

Instances

((~) * signature (m TocScope), MonadIO m) => MethodInfo * TocGetScopeMethodInfo Toc signature Source # 

tocGetScope Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Toc

toc: a Toc instance

-> m TocScope

Returns: scope of toc

No description available in the introspection data.

getTags

data TocGetTagsMethodInfo Source #

Instances

((~) * signature (m TagList), MonadIO m) => MethodInfo * TocGetTagsMethodInfo Toc signature Source # 

tocGetTags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Toc

toc: A Toc instance

-> m TagList

Returns: A TagList for entry

Gets the tags for toc.

mergeTags

data TocMergeTagsMethodInfo Source #

Instances

((~) * signature (Maybe TagList -> TagMergeMode -> m ()), MonadIO m) => MethodInfo * TocMergeTagsMethodInfo Toc signature Source # 

tocMergeTags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Toc

toc: A Toc instance

-> Maybe TagList

tags: A TagList or Nothing

-> TagMergeMode

mode: A TagMergeMode

-> m () 

Merge tags into the existing tags of toc using mode.

new

tocNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TocScope

scope: scope of this TOC

-> m Toc

Returns: newly allocated Toc structure, free it with gst_toc_unref().

Create a new Toc structure.

setTags

data TocSetTagsMethodInfo Source #

Instances

((~) * signature (Maybe TagList -> m ()), MonadIO m) => MethodInfo * TocSetTagsMethodInfo Toc signature Source # 

tocSetTags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Toc

toc: A Toc instance

-> Maybe TagList

tags: A TagList or Nothing

-> m () 

Set a TagList with tags for the complete toc.