Tag Parser  6.5.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | Protected Member Functions | List of all members
Media::MatroskaChapter Class Reference

The MatroskaChapter class provides an implementation of AbstractAttachment for Matroska files. More...

#include <matroskachapter.h>

Inheritance diagram for Media::MatroskaChapter:
[legend]
Collaboration diagram for Media::MatroskaChapter:
[legend]

Public Member Functions

 MatroskaChapter (EbmlElement *chapterAtomElement)
 Constructs a new MatroskaChapter for the specified chapterAtomElement. More...
 
 ~MatroskaChapter ()
 Destroys the chapter. More...
 
MatroskaChapternestedChapter (std::size_t index)
 Returns the nested chapter with the specified index. More...
 
const MatroskaChapternestedChapter (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...
 
- Public Member Functions inherited from Media::AbstractChapter
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...
 
- Public Member Functions inherited from Media::StatusProvider
const NotificationListnotifications () 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...
 
StatusProviderusedProvider ()
 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 &notification)
 This 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 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 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 method is meant to be called by the derived class to add all notifications from another StatusProvider instance. More...
 
void addNotifications (const NotificationList &notifications)
 This 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...
 
- Protected Member Functions inherited from Media::AbstractChapter
 AbstractChapter ()
 Constructs a new chapter. More...
 
- Protected Member Functions inherited from Media::StatusProvider
 StatusProvider ()
 Constructs a new StatusProvider. More...
 

Additional Inherited Members

- Public Types inherited from Media::StatusProvider
typedef std::function< void(StatusProvider &sender)> CallbackFunction
 
typedef std::vector< CallbackFunctionCallbackVector
 
typedef std::pair< int, CallbackFunctionCallbackPair
 
- Protected Attributes inherited from Media::AbstractChapter
uint64 m_id
 
std::vector< LocaleAwareStringm_names
 
ChronoUtilities::TimeSpan m_startTime
 
ChronoUtilities::TimeSpan m_endTime
 
std::vector< uint64 > m_tracks
 
bool m_hidden
 
bool m_enabled
 

Detailed Description

The MatroskaChapter class provides an implementation of AbstractAttachment for Matroska files.

Definition at line 12 of file matroskachapter.h.

Constructor & Destructor Documentation

◆ MatroskaChapter()

Media::MatroskaChapter::MatroskaChapter ( EbmlElement chapterAtomElement)

Constructs a new MatroskaChapter for the specified chapterAtomElement.

Definition at line 23 of file matroskachapter.cpp.

◆ ~MatroskaChapter()

Media::MatroskaChapter::~MatroskaChapter ( )

Destroys the chapter.

Definition at line 30 of file matroskachapter.cpp.

Member Function Documentation

◆ clear()

void Media::MatroskaChapter::clear ( )
virtual

Resets the object to its initial state.

Reimplemented from Media::AbstractChapter.

Definition at line 119 of file matroskachapter.cpp.

◆ internalParse()

void Media::MatroskaChapter::internalParse ( )
protectedvirtual

Parses the "ChapterAtom"-element which has been specified when constructing the object.

Remarks
  • Fetches nested chapters but does not parse them.
  • Clears all previous parsing results.

Implements Media::AbstractChapter.

Definition at line 39 of file matroskachapter.cpp.

◆ nestedChapter() [1/2]

MatroskaChapter * Media::MatroskaChapter::nestedChapter ( std::size_t  index)
inlinevirtual

Returns the nested chapter with the specified index.

Reimplemented from Media::AbstractChapter.

Definition at line 32 of file matroskachapter.h.

◆ nestedChapter() [2/2]

const MatroskaChapter * Media::MatroskaChapter::nestedChapter ( std::size_t  index) const
inlinevirtual

Returns the nested chapter with the specified index.

Reimplemented from Media::AbstractChapter.

Definition at line 37 of file matroskachapter.h.

◆ nestedChapterCount()

std::size_t Media::MatroskaChapter::nestedChapterCount ( ) const
inlinevirtual

Returns the number of nested chapters.

Reimplemented from Media::AbstractChapter.

Definition at line 42 of file matroskachapter.h.


The documentation for this class was generated from the following files: