Tag Parser  7.0.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  EbmlElement *seekHeadElement() const;
15  const std::vector<std::pair<EbmlElement::IdentifierType, uint64>> &info() const;
16  std::vector<std::pair<EbmlElement::IdentifierType, uint64>> &info();
17  void shift(uint64 start, int64 amount);
18  void parse(EbmlElement *seekHeadElement, Diagnostics &diag);
19  void make(std::ostream &stream, Diagnostics &diag);
20  uint64 minSize() const;
21  uint64 maxSize() const;
22  uint64 actualSize() const;
23  bool push(unsigned int index, EbmlElement::IdentifierType id, uint64 offset);
24  void clear();
25 
26  // these methods seem to be not needed anymore
27  static std::pair<EbmlElement::IdentifierType, uint64> *findSeekInfo(std::vector<MatroskaSeekInfo> &seekInfos, uint64 offset);
28  static bool updateSeekInfo(
29  const std::vector<MatroskaSeekInfo> &oldSeekInfos, std::vector<MatroskaSeekInfo> &newSeekInfos, uint64 oldOffset, uint64 newOffset);
30  static bool updateSeekInfo(std::vector<MatroskaSeekInfo> &newSeekInfos, uint64 oldOffset, uint64 newOffset);
31 
32 private:
33  EbmlElement *m_seekHeadElement;
34  std::vector<std::pair<EbmlElement::IdentifierType, uint64>> m_info;
35 };
36 
41  : m_seekHeadElement(nullptr)
42 {
43 }
44 
49 {
50  return m_seekHeadElement;
51 }
52 
57 inline const std::vector<std::pair<EbmlElement::IdentifierType, uint64>> &MatroskaSeekInfo::info() const
58 {
59  return m_info;
60 }
61 
66 inline std::vector<std::pair<EbmlElement::IdentifierType, uint64>> &MatroskaSeekInfo::info()
67 {
68  return m_info;
69 }
70 
71 } // namespace TagParser
72 
73 #endif // TAG_PARSER_MATROSKASEEKINFO_H
const std::vector< std::pair< EbmlElement::IdentifierType, uint64 > > & info() const
Returns the seek information gathered when the parse() method was called.
EbmlElement * seekHeadElement() const
Returns a pointer to the seekHeadElement specified when the parse() method was called.
FileElementTraits< ImplementationType >::IdentifierType IdentifierType
Specifies the type used to store identifiers.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
MatroskaSeekInfo()
Constructs a new MatroskaSeekInfo.