Tag Parser
7.0.3
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
#include <matroskaseekinfo.h>
Public Member Functions | |
MatroskaSeekInfo () | |
Constructs a new MatroskaSeekInfo. More... | |
EbmlElement * | seekHeadElement () const |
Returns a pointer to the seekHeadElement specified when the parse() method was called. More... | |
const std::vector< std::pair< EbmlElement::IdentifierType, uint64 > > & | info () const |
Returns the seek information gathered when the parse() method was called. More... | |
std::vector< std::pair< EbmlElement::IdentifierType, uint64 > > & | info () |
Returns a mutable version of the seek information gathered when the parse() method was called. More... | |
void | shift (uint64 start, int64 amount) |
Shifts all offsets greather or equal than start by amount bytes. More... | |
void | parse (EbmlElement *seekHeadElement, Diagnostics &diag) |
Parses the specified seekHeadElement. More... | |
void | make (std::ostream &stream, Diagnostics &diag) |
Writes a "SeekHead" element for the current instance to the specified stream. More... | |
uint64 | minSize () const |
Returns the minimal number of bytes written when calling the make() method. More... | |
uint64 | maxSize () const |
Returns the maximal number of bytes written when calling the make() method. More... | |
uint64 | actualSize () const |
Returns the number of bytes which will be written when calling the make() method. More... | |
bool | push (unsigned int index, EbmlElement::IdentifierType id, uint64 offset) |
Pushes the specified offset of an element with the specified id to the info. More... | |
void | clear () |
Resets the object to its initial state. More... | |
Static Public Member Functions | |
static std::pair< EbmlElement::IdentifierType, uint64 > * | findSeekInfo (std::vector< MatroskaSeekInfo > &seekInfos, uint64 offset) |
Returns a pointer to the first pair with the specified offset or nullptr if no such pair could be found. More... | |
static bool | updateSeekInfo (const std::vector< MatroskaSeekInfo > &oldSeekInfos, std::vector< MatroskaSeekInfo > &newSeekInfos, uint64 oldOffset, uint64 newOffset) |
Sets the offset of all entires in newSeekInfos to newOffset where the corresponding entry in oldSeekInfos has the offset oldOffset. More... | |
static bool | updateSeekInfo (std::vector< MatroskaSeekInfo > &newSeekInfos, uint64 oldOffset, uint64 newOffset) |
Sets the offset of all entires in newSeekInfos to newOffset where the offset is oldOffset. More... | |
Definition at line 10 of file matroskaseekinfo.h.
|
inline |
Constructs a new MatroskaSeekInfo.
Definition at line 40 of file matroskaseekinfo.h.
uint64 TagParser::MatroskaSeekInfo::actualSize | ( | ) | const |
Returns the number of bytes which will be written when calling the make() method.
Definition at line 170 of file matroskaseekinfo.cpp.
void TagParser::MatroskaSeekInfo::clear | ( | ) |
Resets the object to its initial state.
Definition at line 208 of file matroskaseekinfo.cpp.
|
static |
Returns a pointer to the first pair with the specified offset or nullptr if no such pair could be found.
Definition at line 217 of file matroskaseekinfo.cpp.
|
inline |
Returns the seek information gathered when the parse() method was called.
Definition at line 57 of file matroskaseekinfo.h.
|
inline |
Returns a mutable version of the seek information gathered when the parse() method was called.
Definition at line 66 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 107 of file matroskaseekinfo.cpp.
uint64 TagParser::MatroskaSeekInfo::maxSize | ( | ) | const |
Returns the maximal number of bytes written when calling the make() method.
Definition at line 160 of file matroskaseekinfo.cpp.
uint64 TagParser::MatroskaSeekInfo::minSize | ( | ) | const |
Returns the minimal number of bytes written when calling the make() method.
Definition at line 150 of file matroskaseekinfo.cpp.
void TagParser::MatroskaSeekInfo::parse | ( | EbmlElement * | seekHeadElement, |
Diagnostics & | diag | ||
) |
Parses the specified seekHeadElement.
Throws | ios_base::failure when an IO error occurs. |
Throws | Failure or a derived exception when a parsing error occurs. |
Definition at line 40 of file matroskaseekinfo.cpp.
bool TagParser::MatroskaSeekInfo::push | ( | unsigned int | index, |
EbmlElement::IdentifierType | id, | ||
uint64 | 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 188 of file matroskaseekinfo.cpp.
|
inline |
Returns a pointer to the seekHeadElement specified when the parse() method was called.
Definition at line 48 of file matroskaseekinfo.h.
void TagParser::MatroskaSeekInfo::shift | ( | uint64 | start, |
int64 | amount | ||
) |
Shifts all offsets greather or equal than start by amount bytes.
Definition at line 25 of file matroskaseekinfo.cpp.
|
static |
Sets the offset of all entires in newSeekInfos to newOffset where the corresponding entry in oldSeekInfos has the offset oldOffset.
Definition at line 233 of file matroskaseekinfo.cpp.
|
static |
Sets the offset of all entires in newSeekInfos to newOffset where the offset is oldOffset.
Definition at line 259 of file matroskaseekinfo.cpp.