Tag Parser 12.5.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
matroskaseekinfo.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_MATROSKASEEKINFO_H
2#define TAG_PARSER_MATROSKASEEKINFO_H
3
4#include "./ebmlelement.h"
5
6#include <memory>
7#include <utility>
8#include <vector>
9
10namespace TagParser {
11
13public:
15
16 const std::vector<EbmlElement *> &seekHeadElements() const;
17 const std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> &info() const;
18 std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> &info();
19 void shift(std::uint64_t start, std::int64_t amount);
20 void parse(EbmlElement *seekHeadElements, Diagnostics &diag, std::size_t maxIndirection = 1);
21 void make(std::ostream &stream, Diagnostics &diag);
22 std::uint64_t minSize() const;
23 std::uint64_t maxSize() const;
24 std::uint64_t actualSize() const;
25 bool push(unsigned int index, EbmlElement::IdentifierType id, std::uint64_t offset);
26 void clear();
27
28private:
29 std::vector<EbmlElement *> m_seekHeadElements;
30 std::vector<std::unique_ptr<EbmlElement>> m_additionalSeekHeadElements;
31 std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> m_info;
32};
33
40
46inline const std::vector<EbmlElement *> &MatroskaSeekInfo::seekHeadElements() const
47{
48 return m_seekHeadElements;
49}
50
55inline const std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> &MatroskaSeekInfo::info() const
56{
57 return m_info;
58}
59
64inline std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> &MatroskaSeekInfo::info()
65{
66 return m_info;
67}
68
69} // namespace TagParser
70
71#endif // TAG_PARSER_MATROSKASEEKINFO_H
The Diagnostics class is a container for DiagMessage.
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition ebmlelement.h:32
typename FileElementTraits< EbmlElement >::IdentifierType IdentifierType
void parse(EbmlElement *seekHeadElements, Diagnostics &diag, std::size_t maxIndirection=1)
Parses the specified seekHeadElement and populates info() with the gathered information.
const std::vector< EbmlElement * > & seekHeadElements() const
Returns a pointer to the seek head elements the seek information is composed of.
MatroskaSeekInfo()
Constructs a new MatroskaSeekInfo.
void shift(std::uint64_t start, std::int64_t amount)
Shifts all offsets greater or equal than start by amount bytes.
void clear()
Resets the object to its initial state.
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 make(std::ostream &stream, Diagnostics &diag)
Writes a "SeekHead" element for the current instance to the specified stream.
std::uint64_t maxSize() const
Returns the maximal number of bytes written when calling the make() method.
std::uint64_t minSize() const
Returns the minimal number of bytes written when calling the make() method.
const std::vector< std::pair< EbmlElement::IdentifierType, std::uint64_t > > & info() const
Returns the seek information gathered when the parse() method was called.
std::uint64_t actualSize() const
Returns the number of bytes which will be written when calling the make() method.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10