Tag Parser
6.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The MatroskaChapter class provides an implementation of AbstractAttachment for Matroska files. More...
#include <matroskachapter.h>
Public Member Functions | |
MatroskaChapter (EbmlElement *chapterAtomElement) | |
Constructs a new MatroskaChapter for the specified chapterAtomElement. More... | |
~MatroskaChapter () | |
Destroys the chapter. More... | |
MatroskaChapter * | nestedChapter (std::size_t index) |
Returns the nested chapter with the specified index. More... | |
const MatroskaChapter * | nestedChapter (std::size_t index) const |
Returns the nested chapter with the specified index. More... | |
std::size_t | nestedChapterCount () const |
Returns the number of nested chapters. More... | |
void | clear () |
Resets the object to its initial state. More... | |
![]() | |
virtual | ~AbstractChapter () |
Destroys the chapter. More... | |
uint64 | id () const |
Returns the chapter ID if known; otherwise returns zero. More... | |
const std::vector< LocaleAwareString > & | names () const |
Returns the chapter name. More... | |
ChronoUtilities::TimeSpan | startTime () const |
Returns the start time if known; otherwise returns a negative time span. More... | |
ChronoUtilities::TimeSpan | endTime () const |
Returns the end time if known; otherwise returns a negative time span. More... | |
const std::vector< uint64 > & | tracks () const |
Returns a list of tracks on which the chapter applies. More... | |
bool | isHidden () const |
Returns whether the chapter is flagged as hidden. More... | |
bool | isEnabled () const |
Returns whether the chapter is flagged as enabled. More... | |
std::string | label () const |
Returns a label for the chapter. More... | |
void | parse () |
Parses the chapter. More... | |
void | parseNested () |
Parses the chapter and nested chapters recursively. More... | |
![]() | |
const NotificationList & | notifications () const |
Returns notifications for the current object. More... | |
bool | hasNotifications () const |
Returns an indication whether there are notifications for the current object. More... | |
bool | hasCriticalNotifications () const |
Returns an indication whether there are critical notifications for the current object. More... | |
NotificationType | worstNotificationType () const |
Returns the worst notification type. More... | |
const std::string & | currentStatus () const |
Returns a status information for the current object. More... | |
double | currentPercentage () const |
Returns the progress percentage of the current object. More... | |
size_t | registerCallback (CallbackFunction callback) |
Registers a callback function. More... | |
void | unregisterCallback (size_t id) |
Unregisters a previously registered callback function whith the specified id. More... | |
void | unregisterAllCallbacks () |
Unregisters all callback functions. More... | |
void | forwardStatusUpdateCalls (StatusProvider *other=nullptr) |
Forwards all status updates calls to the specified statusProvider. More... | |
StatusProvider * | usedProvider () |
Returns the provider which callback functions will be called when the status or the percentage is updated. More... | |
void | tryToAbort () |
Commands the object to abort the current operation. More... | |
bool | isAborted () const |
Returns an indication whether the current operation should be aborted. More... | |
void | invalidateStatus () |
Invalidates the current status. More... | |
void | invalidateNotifications () |
Invalidates the object's notifications. More... | |
void | updateStatus (const std::string &status) |
This method is meant to be called by the derived class to report updated status information. More... | |
void | updateStatus (const std::string &status, double percentage) |
This method is meant to be called by the derived class to report updated status information. More... | |
void | updatePercentage (double percentage) |
This method is meant to be called by the derived class to report updated progress percentage only. More... | |
void | addNotification (const Notification ¬ification) |
This protected method is meant to be called by the derived class to add a notification. More... | |
void | addNotification (NotificationType type, const std::string &message, const std::string &context) |
This protected method is meant to be called by the derived class to add a notification of the specified type, message and context. More... | |
void | addNotifications (const StatusProvider &from) |
This protected method is meant to be called by the derived class to add all notifications from another StatusProvider instance. More... | |
void | addNotifications (const std::string &higherContext, const StatusProvider &from) |
This protected method is meant to be called by the derived class to add all notifications from another StatusProvider instance. More... | |
void | addNotifications (const NotificationList ¬ifications) |
This protected method is meant to be called by the derived class to add the specified notifications. More... | |
Protected Member Functions | |
void | internalParse () |
Parses the "ChapterAtom"-element which has been specified when constructing the object. More... | |
![]() | |
AbstractChapter () | |
Constructs a new chapter. More... | |
![]() | |
StatusProvider () | |
Constructs a new StatusProvider. More... | |
Additional Inherited Members | |
![]() | |
typedef std::function< void(StatusProvider &sender)> | CallbackFunction |
typedef std::vector< CallbackFunction > | CallbackVector |
typedef std::pair< int, CallbackFunction > | CallbackPair |
![]() | |
uint64 | m_id |
std::vector< LocaleAwareString > | m_names |
ChronoUtilities::TimeSpan | m_startTime |
ChronoUtilities::TimeSpan | m_endTime |
std::vector< uint64 > | m_tracks |
bool | m_hidden |
bool | m_enabled |
The MatroskaChapter class provides an implementation of AbstractAttachment for Matroska files.
Definition at line 12 of file matroskachapter.h.
Media::MatroskaChapter::MatroskaChapter | ( | EbmlElement * | chapterAtomElement | ) |
Constructs a new MatroskaChapter for the specified chapterAtomElement.
Definition at line 23 of file matroskachapter.cpp.
Media::MatroskaChapter::~MatroskaChapter | ( | ) |
Destroys the chapter.
Definition at line 30 of file matroskachapter.cpp.
|
virtual |
Resets the object to its initial state.
Reimplemented from Media::AbstractChapter.
Definition at line 119 of file matroskachapter.cpp.
|
protectedvirtual |
Parses the "ChapterAtom"-element which has been specified when constructing the object.
Implements Media::AbstractChapter.
Definition at line 39 of file matroskachapter.cpp.
|
inlinevirtual |
Returns the nested chapter with the specified index.
Reimplemented from Media::AbstractChapter.
Definition at line 32 of file matroskachapter.h.
|
inlinevirtual |
Returns the nested chapter with the specified index.
Reimplemented from Media::AbstractChapter.
Definition at line 37 of file matroskachapter.h.
|
inlinevirtual |
Returns the number of nested chapters.
Reimplemented from Media::AbstractChapter.
Definition at line 42 of file matroskachapter.h.