gstreamermm
1.10.0
|
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>
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... | |
![]() | |
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) |
![]() | |
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... | |
![]() | |
Glib::RefPtr< Gst::MiniObject > | wrap (GstMiniObject* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
![]() | |
typedef sigc::slot< void > | SlotFinalizer |
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).
|
delete |
|
delete |
void Gst::Toc::append_entry | ( | Glib::RefPtr< Gst::TocEntry > | entry | ) |
Appends the Gst::TocEntry entry to toc.
entry | A Gst::TocEntry. |
void Gst::Toc::dump | ( | ) |
void Gst::Toc::dump | ( | ) | const |
Glib::RefPtr<Gst::TocEntry> Gst::Toc::find_entry | ( | const Glib::ustring & | uid | ) | const |
Find Gst::TocEntry with given uid in the toc.
uid | UID to find Gst::TocEntry with. |
nullptr
if not found. Gst::TocScope Gst::Toc::get_scope | ( | ) | const |
Gst::TagList Gst::Toc::get_tags | ( | ) | const |
Gets the tags for toc.
GstToc* Gst::Toc::gobj | ( | ) |
Provides access to the underlying C instance.
const GstToc* Gst::Toc::gobj | ( | ) | const |
Provides access to the underlying C instance.
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.
|
protected |
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.
void Gst::Toc::set_tags | ( | const Gst::TagList& | tags | ) |
Set a Gst::TagList with tags for the complete toc.
tags | A Gst::TagList or nullptr . |
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.
|
related |
A Glib::wrap() method for this object.
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. |