Tag Parser  6.5.1
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 MEDIA_MATROSKASEEKINFO_H
2 #define MEDIA_MATROSKASEEKINFO_H
3 
4 #include "./ebmlelement.h"
5 
6 #include "../statusprovider.h"
7 
8 #include <utility>
9 
10 namespace Media {
11 
13 {
14 public:
16 
17  EbmlElement *seekHeadElement() const;
18  const std::vector<std::pair<EbmlElement::identifierType, uint64> > &info() const;
19  std::vector<std::pair<EbmlElement::identifierType, uint64> > &info();
20  void shift(uint64 start, int64 amount);
21  void parse(EbmlElement *seekHeadElement);
22  void make(std::ostream &stream);
23  uint64 minSize() const;
24  uint64 maxSize() const;
25  uint64 actualSize() const;
26  bool push(unsigned int index, EbmlElement::identifierType id, uint64 offset);
27  void clear();
28 
29  // these methods seem to be not needed anymore
30  static std::pair<EbmlElement::identifierType, uint64> *findSeekInfo(std::vector<MatroskaSeekInfo> &seekInfos, uint64 offset);
31  static bool updateSeekInfo(const std::vector<MatroskaSeekInfo> &oldSeekInfos, std::vector<MatroskaSeekInfo> &newSeekInfos, uint64 oldOffset, uint64 newOffset);
32  static bool updateSeekInfo(std::vector<MatroskaSeekInfo> &newSeekInfos, uint64 oldOffset, uint64 newOffset);
33 
34 private:
35  EbmlElement *m_seekHeadElement;
36  std::vector<std::pair<EbmlElement::identifierType, uint64> > m_info;
37 };
38 
43  m_seekHeadElement(nullptr)
44 {}
45 
50 {
51  return m_seekHeadElement;
52 }
53 
58 inline const std::vector<std::pair<EbmlElement::identifierType, uint64> > &MatroskaSeekInfo::info() const
59 {
60  return m_info;
61 }
62 
67 inline std::vector<std::pair<EbmlElement::identifierType, uint64> > &MatroskaSeekInfo::info()
68 {
69  return m_info;
70 }
71 
72 }
73 
74 #endif // MEDIA_MATROSKASEEKINFO_H
FileElementTraits< EbmlElement >::identifierType identifierType
Specifies the type used to store identifiers.
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition: ebmlelement.h:50
const std::vector< std::pair< EbmlElement::identifierType, uint64 > > & info() const
Returns the seek information gathered when the parse() method was called.
The MatroskaSeekInfo class helps parsing and making "SeekHead"-elements.
MatroskaSeekInfo()
Constructs a new MatroskaSeekInfo.
EbmlElement * seekHeadElement() const
Returns a pointer to the seekHeadElement specified when the parse() method was called.
Contains all classes and functions of the TagInfo library.
Definition: exceptions.h:9
The StatusProvider class acts as a base class for objects providing status information.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.