gstreamermm: Gst::Toc Class Reference

gstreamermm 1.8.0

Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gst::Toc Class Reference

Gst::Toc lets you to inform other elements in pipeline or application that playing source has some kind of table of contents (TOC). More...

`#include <gstreamermm/toc.h>`

Inheritance diagram for Gst::Toc:
[legend]

## Public Member Functions
void | reference () const
| Increment the reference count for this object. More...
void | unreference () const
| Decrement the reference count for this object. More...
GstToc* | gobj ()
| Provides access to the underlying C instance. More...
const GstToc* | gobj () const
| Provides access to the underlying C instance. More...
GstToc* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
| Toc ()=delete
| Toc (const Toc&)=delete
Toc& | operator= (const Toc&)=delete
void | append_entry (Glib::RefPtr< Gst::TocEntry > entry)
| Appends the Gst::TocEntry entry to toc. More...
void | dump ()
void | dump () const
void | set_tags (const Gst::TagList& tags)
| Set a Gst::TagList with tags for the complete toc. More...
Gst::TagList | get_tags () const
| Gets the tags for toc. More...
Gst::TocScope | get_scope () const
Glib::RefPtr< Gst::TocEntry > | find_entry (const Glib::ustring& uid) const
| Find Gst::TocEntry with given uid in the toc. More...
Public Member Functions inherited from Gst::MiniObject
void | reference () const
| Increment the reference count for this object. More...
void | unreference () const
| Decrement the reference count for this object. More...
GstMiniObject* | gobj ()
| Provides access to the underlying C instance. More...
const GstMiniObject* | gobj () const
| Provides access to the underlying C instance. More...
GstMiniObject* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
| MiniObject ()=delete
| MiniObject (const MiniObject&)=delete
MiniObject& | operator= (const MiniObject&)=delete
| ~MiniObject ()
guint | get_flags () const
void | set_flags (const guint& value)
gint | get_refcount () const
gint | get_lockstate () const
bool | lock (LockFlags flags)
| Lock the mini-object with the specified access mode in flags. More...
void | unlock (LockFlags flags)
| Unlock the mini-object with the specified access mode in flags. More...
bool | is_writable () const
| If mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE lock on object is the only one, this means that changes to the object will not be visible to any other object. More...
Glib::RefPtr< MiniObject > | create_writable ()
| Checks if a mini-object is writable. More...
void | set_qdata (GQuark quark, QuarkData* data)
| This sets an opaque, named pointer on a miniobject. More...
QuarkData* | get_qdata (GQuark quark) const
| This function gets back user data pointers stored via set_qdata(). More...
QuarkData* | steal_qdata (GQuark quark)
| This function gets back user data pointers stored via set_qdata() and removes the data from object without invoking its destroy() function (if any was set). More...
void | add_finalize_notifier (const SlotFinalizer& slot)
| Adds notifier when mini object is finalized. More...
void | remove_finalize_notifier ()
| Remove finalize notifier. More...

## Protected Member Functions
void | operator delete (void*, std::size_t)
Protected Member Functions inherited from Gst::MiniObject
void | operator delete (void*, std::size_t)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gst::Toc > | wrap (GstToc* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Gst::MiniObject
Glib::RefPtr< Gst::MiniObject > | wrap (GstMiniObject* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from Gst::MiniObject
typedef sigc::slot< void > | SlotFinalizer

## Detailed Description

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

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::EventToc class to create TOC event, and parse_toc() to parse received TOC event. Use Gst::EventTocSelect to create a new TOC select event, and parse_toc_select() to parse received TOC select event. The same rule for the messages: MessageToc to create new TOC message, and parse() 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).

## Constructor & Destructor Documentation

## § Toc() [1/2]

Gst::Toc::Toc | ( |  | ) |
| delete

## § Toc() [2/2]

Gst::Toc::Toc | ( | const Toc& |  | ) |
| delete

## Member Function Documentation

## § append_entry()

void Gst::Toc::append_entry | ( | Glib::RefPtr< Gst::TocEntry > | entry | ) |

Appends the Gst::TocEntry entry to toc.

Parameters

  entry | A Gst::TocEntry.

## § dump() [1/2]

void Gst::Toc::dump | ( |  | ) |

## § dump() [2/2]

void Gst::Toc::dump | ( |  | ) | const

## § find_entry()

Glib::RefPtr<Gst::TocEntry> Gst::Toc::find_entry | ( | const Glib::ustring & | uid | ) | const

Find Gst::TocEntry with given uid in the toc.

Parameters

  uid | UID to find Gst::TocEntry with.

Returns
  Gst::TocEntry with specified uid from the toc, or `nullptr` if not found.

## § get_scope()

Gst::TocScope Gst::Toc::get_scope | ( |  | ) | const

Returns
  Scope of toc.

## § get_tags()

Gst::TagList Gst::Toc::get_tags | ( |  | ) | const

Gets the tags for toc.

Returns
  A Gst::TagList for entry.

## § gobj() [1/2]

GstToc* Gst::Toc::gobj | ( |  | ) |

Provides access to the underlying C instance.

## § gobj() [2/2]

const GstToc* Gst::Toc::gobj | ( |  | ) | const

Provides access to the underlying C instance.

## § gobj_copy()

GstToc* Gst::Toc::gobj_copy | ( |  | ) | const

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## § operator delete()

void Gst::Toc::operator delete | ( | void * | ,
|  | std::size_t |
| ) |  |
| protected

## § operator=()

Toc& Gst::Toc::operator= | ( | const Toc& |  | ) |
| delete

## § reference()

void Gst::Toc::reference | ( |  | ) | const

Increment the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## § set_tags()

void Gst::Toc::set_tags | ( | const Gst::TagList& | tags | ) |

Set a Gst::TagList with tags for the complete toc.

Parameters

  tags | A Gst::TagList or `nullptr`.

## § unreference()

void Gst::Toc::unreference | ( |  | ) | const

Decrement the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## Friends And Related Function Documentation

## § wrap()

Glib::RefPtr< Gst::Toc > wrap | ( | GstToc * | object,
|  | bool | take_copy = `false`
| ) |  |
| related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.