Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
Implementation of TagParser::AbstractAttachment for the Matroska container. More...
#include <matroskaattachment.h>
Public Member Functions | |
MatroskaAttachment () | |
Constructs a new Matroska attachment. | |
void | parse (EbmlElement *attachedFileElement, Diagnostics &diag) |
Parses attachment from the specified attachedFileElement. | |
MatroskaAttachmentMaker | prepareMaking (Diagnostics &diag) |
Prepares making. | |
void | make (std::ostream &stream, Diagnostics &diag) |
Writes the attachment to the specified stream (makes an "AttachedFile"-element). | |
EbmlElement * | attachedFileElement () const |
Returns the "AttachedFile"-element which has been specified when the parse() method has been called. | |
Public Member Functions inherited from TagParser::AbstractAttachment | |
const std::string & | description () const |
Returns a description of the attachment. | |
void | setDescription (std::string_view description) |
Sets a description of the attachment. | |
const std::string & | name () const |
Returns the (file) name of the attachment. | |
void | setName (std::string_view name) |
Sets the (file) name of the attachment. | |
const std::string & | mimeType () const |
Returns the MIME-type of the attachment. | |
void | setMimeType (std::string_view mimeType) |
Sets the MIME-type of the attachment. | |
std::uint64_t | id () const |
Returns the ID of the attachment. | |
void | setId (std::uint64_t id) |
Sets the ID of the attachment. | |
const StreamDataBlock * | data () const |
Returns a reference to the data of the attachment. | |
void | setData (std::unique_ptr< StreamDataBlock > &&data) |
Sets the data for the attachment. | |
void | setFile (std::string_view path, Diagnostics &diag, AbortableProgressFeedback &progress) |
Sets the data, name and MIME-type for the specified path. | |
bool | isDataFromFile () const |
Returns whether the assigned data has been assigned using the setFile() method. | |
std::string | label () const |
Returns a label for the track. | |
void | clear () |
Resets the object to its initial state. | |
bool | isIgnored () const |
Returns whether the attachment is ignored/omitted when rewriting the container. | |
void | setIgnored (bool ignored) |
Sets whether the attachment is ignored/omitted when rewriting the container. | |
bool | isEmpty () const |
Returns whether the attachment is empty (no data and no meta-data assigned). | |
Additional Inherited Members | |
Protected Member Functions inherited from TagParser::AbstractAttachment | |
AbstractAttachment () | |
Constructs a new attachment. | |
virtual | ~AbstractAttachment () |
Destroys the attachment. | |
Implementation of TagParser::AbstractAttachment for the Matroska container.
|
inline |
Constructs a new Matroska attachment.
Definition at line 61 of file matroskaattachment.h.
|
inline |
Returns the "AttachedFile"-element which has been specified when the parse() method has been called.
Definition at line 69 of file matroskaattachment.h.
void TagParser::MatroskaAttachment::make | ( | std::ostream & | stream, |
Diagnostics & | diag ) |
Writes the attachment to the specified stream (makes an "AttachedFile"-element).
Throws | std::ios_base::failure when an IO error occurs. |
Throws | TagParser::Failure or a derived exception when a making error occurs. |
Definition at line 95 of file matroskaattachment.cpp.
void TagParser::MatroskaAttachment::parse | ( | EbmlElement * | attachedFileElement, |
Diagnostics & | diag ) |
Parses attachment from the specified attachedFileElement.
Throws | std::ios_base::failure when an IO error occurs. |
Throws | TagParser::Failure or a derived exception when a parsing error occurs. |
Definition at line 30 of file matroskaattachment.cpp.
|
inline |
Prepares making.
Throws | TagParser::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 84 of file matroskaattachment.h.