Tag Parser
6.3.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The AbstractChapter class parses chapter information. More...
#include <abstractchapter.h>
Public Member Functions | |
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... | |
virtual AbstractChapter * | nestedChapter (std::size_t index) |
Returns the nested chapter with the specified index. More... | |
virtual const AbstractChapter * | nestedChapter (std::size_t index) const |
Returns the nested chapter with the specified index. More... | |
virtual std::size_t | nestedChapterCount () const |
Returns the number of nested chapters. More... | |
virtual void | clear () |
Resets the object to its initial state. 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 | |
AbstractChapter () | |
Constructs a new chapter. More... | |
virtual void | internalParse ()=0 |
Internally called to parse the chapter. More... | |
![]() | |
StatusProvider () | |
Constructs a new StatusProvider. More... | |
Protected Attributes | |
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 |
Additional Inherited Members | |
![]() | |
typedef std::function< void(StatusProvider &sender)> | CallbackFunction |
typedef std::vector< CallbackFunction > | CallbackVector |
typedef std::pair< int, CallbackFunction > | CallbackPair |
The AbstractChapter class parses chapter information.
Definition at line 14 of file abstractchapter.h.
|
virtual |
Destroys the chapter.
Definition at line 29 of file abstractchapter.cpp.
|
protected |
Constructs a new chapter.
Definition at line 18 of file abstractchapter.cpp.
|
virtual |
Resets the object to its initial state.
Reimplemented in Media::MatroskaChapter.
Definition at line 51 of file abstractchapter.cpp.
|
inline |
Returns the end time if known; otherwise returns a negative time span.
Definition at line 74 of file abstractchapter.h.
|
inline |
Returns the chapter ID if known; otherwise returns zero.
Definition at line 50 of file abstractchapter.h.
|
protectedpure virtual |
Internally called to parse the chapter.
Must be implemented when subclassing.
Throws | Failure or a derived class when a parsing error occurs. |
Throws | std::ios_base::failure when an IO error occurs. |
Implemented in Media::MatroskaChapter.
|
inline |
Returns whether the chapter is flagged as enabled.
Definition at line 98 of file abstractchapter.h.
|
inline |
Returns whether the chapter is flagged as hidden.
Definition at line 90 of file abstractchapter.h.
string Media::AbstractChapter::label | ( | ) | const |
Returns a label for the chapter.
Definition at line 35 of file abstractchapter.cpp.
|
inline |
Returns the chapter name.
Definition at line 58 of file abstractchapter.h.
|
inlinevirtual |
Returns the nested chapter with the specified index.
Reimplemented in Media::MatroskaChapter.
Definition at line 106 of file abstractchapter.h.
|
inlinevirtual |
Returns the nested chapter with the specified index.
Reimplemented in Media::MatroskaChapter.
Definition at line 114 of file abstractchapter.h.
|
inlinevirtual |
Returns the number of nested chapters.
Reimplemented in Media::MatroskaChapter.
Definition at line 122 of file abstractchapter.h.
void Media::AbstractChapter::parse | ( | ) |
Parses the chapter.
Fetches nested chapters but does not parse them.
Clears all previous parsing results.
Definition at line 68 of file abstractchapter.cpp.
void Media::AbstractChapter::parseNested | ( | ) |
Parses the chapter and nested chapters recursively.
Clears all previous parsing results.
Definition at line 80 of file abstractchapter.cpp.
|
inline |
Returns the start time if known; otherwise returns a negative time span.
Definition at line 66 of file abstractchapter.h.
|
inline |
Returns a list of tracks on which the chapter applies.
Definition at line 82 of file abstractchapter.h.
|
protected |
Definition at line 44 of file abstractchapter.h.
|
protected |
Definition at line 41 of file abstractchapter.h.
|
protected |
Definition at line 43 of file abstractchapter.h.
|
protected |
Definition at line 38 of file abstractchapter.h.
|
protected |
Definition at line 39 of file abstractchapter.h.
|
protected |
Definition at line 40 of file abstractchapter.h.
|
protected |
Definition at line 42 of file abstractchapter.h.