Tag Parser  9.3.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
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 <utility>
7 
8 namespace TagParser {
9 
11 public:
13 
14  const std::vector<EbmlElement *> &seekHeadElements() const;
15  const std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> &info() const;
16  std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> &info();
17  void shift(std::uint64_t start, std::int64_t amount);
18  void parse(EbmlElement *seekHeadElements, Diagnostics &diag, std::size_t maxIndirection = 1);
19  void make(std::ostream &stream, Diagnostics &diag);
20  std::uint64_t minSize() const;
21  std::uint64_t maxSize() const;
22  std::uint64_t actualSize() const;
23  bool push(unsigned int index, EbmlElement::IdentifierType id, std::uint64_t offset);
24  void clear();
25 
26 private:
27  std::vector<EbmlElement *> m_seekHeadElements;
28  std::vector<std::unique_ptr<EbmlElement>> m_additionalSeekHeadElements;
29  std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> m_info;
30 };
31 
36 {
37 }
38 
44 inline const std::vector<EbmlElement *> &MatroskaSeekInfo::seekHeadElements() const
45 {
46  return m_seekHeadElements;
47 }
48 
53 inline const std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> &MatroskaSeekInfo::info() const
54 {
55  return m_info;
56 }
57 
62 inline std::vector<std::pair<EbmlElement::IdentifierType, std::uint64_t>> &MatroskaSeekInfo::info()
63 {
64  return m_info;
65 }
66 
67 } // namespace TagParser
68 
69 #endif // TAG_PARSER_MATROSKASEEKINFO_H
TagParser::MatroskaSeekInfo::seekHeadElements
const std::vector< EbmlElement * > & seekHeadElements() const
Returns a pointer to the seek head elements the seek information is composed of.
Definition: matroskaseekinfo.h:44
TagParser::Diagnostics
The Diagnostics class is a container for DiagMessage.
Definition: diagnostics.h:156
TagParser::GenericFileElement::IdentifierType
typename FileElementTraits< ImplementationType >::IdentifierType IdentifierType
Specifies the type used to store identifiers.
Definition: genericfileelement.h:57
TagParser
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:10
TagParser::MatroskaSeekInfo
The MatroskaSeekInfo class helps parsing and making "SeekHead"-elements.
Definition: matroskaseekinfo.h:10
TagParser::EbmlElement
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition: ebmlelement.h:31
TagParser::MatroskaSeekInfo::info
const std::vector< std::pair< EbmlElement::IdentifierType, std::uint64_t > > & info() const
Returns the seek information gathered when the parse() method was called.
Definition: matroskaseekinfo.h:53
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
ebmlelement.h
TagParser::MatroskaSeekInfo::MatroskaSeekInfo
MatroskaSeekInfo()
Constructs a new MatroskaSeekInfo.
Definition: matroskaseekinfo.h:35