Tag Parser 12.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The MatroskaSeekInfo class helps parsing and making "SeekHead"-elements. More...
#include <matroskaseekinfo.h>
Public Member Functions | |
MatroskaSeekInfo () | |
Constructs a new MatroskaSeekInfo. | |
const std::vector< EbmlElement * > & | seekHeadElements () const |
Returns a pointer to the seek head elements the seek information is composed of. | |
const std::vector< std::pair< EbmlElement::IdentifierType, std::uint64_t > > & | info () const |
Returns the seek information gathered when the parse() method was called. | |
std::vector< std::pair< EbmlElement::IdentifierType, std::uint64_t > > & | info () |
Returns a mutable version of the seek information gathered when the parse() method was called. | |
void | shift (std::uint64_t start, std::int64_t amount) |
Shifts all offsets greater or equal than start by amount bytes. | |
void | parse (EbmlElement *seekHeadElements, Diagnostics &diag, std::size_t maxIndirection=1) |
Parses the specified seekHeadElement and populates info() with the gathered information. | |
void | make (std::ostream &stream, Diagnostics &diag) |
Writes a "SeekHead" element for the current instance to the specified stream. | |
std::uint64_t | minSize () const |
Returns the minimal number of bytes written when calling the make() method. | |
std::uint64_t | maxSize () const |
Returns the maximal number of bytes written when calling the make() method. | |
std::uint64_t | actualSize () const |
Returns the number of bytes which will be written when calling the make() method. | |
bool | push (unsigned int index, EbmlElement::IdentifierType id, std::uint64_t offset) |
Pushes the specified offset of an element with the specified id to the info. | |
void | clear () |
Resets the object to its initial state. | |
The MatroskaSeekInfo class helps parsing and making "SeekHead"-elements.
|
inline |
Constructs a new MatroskaSeekInfo.
Definition at line 37 of file matroskaseekinfo.h.
std::uint64_t TagParser::MatroskaSeekInfo::actualSize | ( | ) | const |
Returns the number of bytes which will be written when calling the make() method.
Definition at line 212 of file matroskaseekinfo.cpp.
void TagParser::MatroskaSeekInfo::clear | ( | ) |
Resets the object to its initial state.
Definition at line 251 of file matroskaseekinfo.cpp.
|
inline |
Returns a mutable version of the seek information gathered when the parse() method was called.
Definition at line 64 of file matroskaseekinfo.h.
|
inline |
Returns the seek information gathered when the parse() method was called.
Definition at line 55 of file matroskaseekinfo.h.
void TagParser::MatroskaSeekInfo::make | ( | std::ostream & | stream, |
Diagnostics & | diag ) |
Writes a "SeekHead" element for the current instance to the specified stream.
stream | Specifies the stream to write the "SeekHead" element to. |
Throws | ios_base::failure when an IO error occurs. |
Throws | Failure or a derived exception when a making error occurs. |
Definition at line 147 of file matroskaseekinfo.cpp.
std::uint64_t TagParser::MatroskaSeekInfo::maxSize | ( | ) | const |
Returns the maximal number of bytes written when calling the make() method.
Definition at line 202 of file matroskaseekinfo.cpp.
std::uint64_t TagParser::MatroskaSeekInfo::minSize | ( | ) | const |
Returns the minimal number of bytes written when calling the make() method.
Definition at line 192 of file matroskaseekinfo.cpp.
void TagParser::MatroskaSeekInfo::parse | ( | EbmlElement * | seekHeadElements, |
Diagnostics & | diag, | ||
std::size_t | maxIndirection = 1 ) |
Parses the specified seekHeadElement and populates info() with the gathered information.
Throws | ios_base::failure when an IO error occurs. |
Throws | Failure or a derived exception when a parsing error occurs. |
Definition at line 51 of file matroskaseekinfo.cpp.
bool TagParser::MatroskaSeekInfo::push | ( | unsigned int | index, |
EbmlElement::IdentifierType | id, | ||
std::uint64_t | offset ) |
Pushes the specified offset of an element with the specified id to the info.
If there is an existing entry with the same id and index the existing entry will be updated and no new entry created.
Definition at line 231 of file matroskaseekinfo.cpp.
|
inline |
Returns a pointer to the seek head elements the seek information is composed of.
Definition at line 46 of file matroskaseekinfo.h.
void TagParser::MatroskaSeekInfo::shift | ( | std::uint64_t | start, |
std::int64_t | amount ) |
Shifts all offsets greater or equal than start by amount bytes.
Definition at line 25 of file matroskaseekinfo.cpp.