Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The MatroskaCuePositionUpdater class helps to rewrite the "Cues"-element with shifted positions. More...
#include <matroskacues.h>
Public Member Functions | |
MatroskaCuePositionUpdater () | |
Creates a new MatroskaCuePositionUpdater. | |
EbmlElement * | cuesElement () const |
Returns the "Cues"-element specified when calling the parse() method. | |
std::uint64_t | totalSize () const |
Returns how many bytes will be written when calling the make() method. | |
void | parse (EbmlElement *cuesElement, Diagnostics &diag) |
Parses the specified cuesElement. | |
bool | updateOffsets (std::uint64_t originalOffset, std::uint64_t newOffset) |
Sets the offset of the entries with the specified originalOffset to newOffset. | |
bool | updateRelativeOffsets (std::uint64_t referenceOffset, std::uint64_t originalRelativeOffset, std::uint64_t newRelativeOffset) |
Sets the relative offset of the entries with the specified originalRelativeOffset and the specified referenceOffset to newRelativeOffset. | |
void | make (std::ostream &stream, Diagnostics &diag) |
Writes the previously parsed "Cues"-element with updated positions to the specified stream. | |
void | clear () |
Resets the object to its initial state. | |
The MatroskaCuePositionUpdater class helps to rewrite the "Cues"-element with shifted positions.
This class is used when rewriting a Matroska file to save changed tag information.
|
inline |
Creates a new MatroskaCuePositionUpdater.
The parse() method should be called to do further initialization.
Definition at line 103 of file matroskacues.h.
|
inline |
Resets the object to its initial state.
Parsing results and updates are cleared.
Definition at line 121 of file matroskacues.h.
|
inline |
Returns the "Cues"-element specified when calling the parse() method.
Returns nullptr if no "Cues"-element is set.
Definition at line 113 of file matroskacues.h.
void TagParser::MatroskaCuePositionUpdater::make | ( | std::ostream & | stream, |
Diagnostics & | diag ) |
Writes the previously parsed "Cues"-element with updated positions to the specified stream.
Definition at line 262 of file matroskacues.cpp.
void TagParser::MatroskaCuePositionUpdater::parse | ( | EbmlElement * | cuesElement, |
Diagnostics & | diag ) |
Parses the specified cuesElement.
Definition at line 54 of file matroskacues.cpp.
std::uint64_t TagParser::MatroskaCuePositionUpdater::totalSize | ( | ) | const |
Returns how many bytes will be written when calling the make() method.
Definition at line 40 of file matroskacues.cpp.
bool TagParser::MatroskaCuePositionUpdater::updateOffsets | ( | std::uint64_t | originalOffset, |
std::uint64_t | newOffset ) |
Sets the offset of the entries with the specified originalOffset to newOffset.
Definition at line 179 of file matroskacues.cpp.
bool TagParser::MatroskaCuePositionUpdater::updateRelativeOffsets | ( | std::uint64_t | referenceOffset, |
std::uint64_t | originalRelativeOffset, | ||
std::uint64_t | newRelativeOffset ) |
Sets the relative offset of the entries with the specified originalRelativeOffset and the specified referenceOffset to newRelativeOffset.
Definition at line 205 of file matroskacues.cpp.