Tag Parser
6.2.2
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
Implementation of Media::AbstractAttachment for the Matroska container. More...
#include <matroskaattachment.h>
Public Member Functions | |
MatroskaAttachment () | |
Constructs a new Matroska attachment. More... | |
void | parse (EbmlElement *attachedFileElement) |
Parses attachment from the specified attachedFileElement. More... | |
MatroskaAttachmentMaker | prepareMaking () |
Prepares making. More... | |
void | make (std::ostream &stream) |
Writes the attachment to the specified stream (makes an "AttachedFile"-element). More... | |
EbmlElement * | attachedFileElement () const |
Returns the "AttachedFile"-element which has been specified when the parse() method has been called. More... | |
![]() | |
const std::string & | description () const |
Returns a description of the attachment. More... | |
void | setDescription (const std::string &description) |
Sets a description of the attachment. More... | |
const std::string & | name () const |
Returns the (file) name of the attachment. More... | |
void | setName (const std::string &name) |
Sets the (file) name of the attachment. More... | |
const std::string & | mimeType () const |
Returns the MIME-type of the attachment. More... | |
void | setMimeType (const std::string &mimeType) |
Sets the MIME-type of the attachment. More... | |
uint64 | id () const |
Returns the ID of the attachment. More... | |
void | setId (const uint64 &id) |
Sets the ID of the attachment. More... | |
const StreamDataBlock * | data () const |
Returns a reference to the data of the attachment. More... | |
void | setData (std::unique_ptr< StreamDataBlock > &&data) |
Sets the data for the attachment. More... | |
void | setFile (const std::string &path) |
Sets the data, name and MIME-type for the specified path. More... | |
bool | isDataFromFile () const |
Returns whether the assigned data has been assigned using the setFile() method. More... | |
std::string | label () const |
Returns a label for the track. More... | |
void | clear () |
Resets the object to its initial state. More... | |
bool | isIgnored () const |
Returns whether the attachment is ignored/omitted when rewriting the container. More... | |
void | setIgnored (bool ignored) |
Sets whether the attachment is ignored/omitted when rewriting the container. More... | |
bool | isEmpty () const |
Returns whether the attachment is empty (no data and no meta-data assigned). 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... | |
Additional Inherited Members | |
![]() | |
typedef std::function< void(StatusProvider &sender)> | CallbackFunction |
typedef std::vector< CallbackFunction > | CallbackVector |
typedef std::pair< int, CallbackFunction > | CallbackPair |
![]() | |
AbstractAttachment () | |
Constructs a new attachment. More... | |
![]() | |
StatusProvider () | |
Constructs a new StatusProvider. More... | |
Implementation of Media::AbstractAttachment for the Matroska container.
Definition at line 45 of file matroskaattachment.h.
|
inline |
Constructs a new Matroska attachment.
Definition at line 64 of file matroskaattachment.h.
|
inline |
Returns the "AttachedFile"-element which has been specified when the parse() method has been called.
Definition at line 71 of file matroskaattachment.h.
void Media::MatroskaAttachment::make | ( | std::ostream & | stream | ) |
Writes the attachment to the specified stream (makes an "AttachedFile"-element).
Throws | std::ios_base::failure when an IO error occurs. |
Throws | Media::Failure or a derived exception when a making error occurs. |
Definition at line 93 of file matroskaattachment.cpp.
void Media::MatroskaAttachment::parse | ( | EbmlElement * | attachedFileElement | ) |
Parses attachment from the specified attachedFileElement.
Throws | std::ios_base::failure when an IO error occurs. |
Throws | Media::Failure or a derived exception when a parsing error occurs. |
Definition at line 29 of file matroskaattachment.cpp.
|
inline |
Prepares making.
Throws | Media::Failure or a derived exception when a making error occurs. |
This method might be useful when it is necessary to know the size of the attachment before making it.
Definition at line 86 of file matroskaattachment.h.