Tag Parser  6.2.2
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
matroskaattachment.h
Go to the documentation of this file.
1 #ifndef MEDIA_MATROSKAATTACHMENT_H
2 #define MEDIA_MATROSKAATTACHMENT_H
3 
4 #include "../abstractattachment.h"
5 
6 namespace Media {
7 
8 class EbmlElement;
9 class MatroskaAttachment;
10 
12 {
13  friend class MatroskaAttachment;
14 
15 public:
16  void make(std::ostream &stream) const;
17  const MatroskaAttachment &attachment() const;
18  uint64 requiredSize() const;
19  void bufferCurrentAttachments();
20 
21 private:
23 
24  MatroskaAttachment &m_attachment;
25  uint64 m_attachedFileElementSize;
26  uint64 m_totalSize;
27 };
28 
33 {
34  return m_attachment;
35 }
36 
41 {
42  return m_totalSize;
43 }
44 
46 {
47 public:
49 
50  void parse(EbmlElement *attachedFileElement);
51  MatroskaAttachmentMaker prepareMaking();
52  void make(std::ostream &stream);
53 
54  EbmlElement *attachedFileElement() const;
55 
56 private:
57  EbmlElement *m_attachedFileElement;
58 
59 };
60 
65  m_attachedFileElement(nullptr)
66 {}
67 
72 {
73  return m_attachedFileElement;
74 }
75 
87 {
88  return MatroskaAttachmentMaker(*this);
89 }
90 
91 } // namespace Media
92 
93 #endif // MEDIA_MATROSKAATTACHMENT_H
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition: ebmlelement.h:50
The MatroskaAttachmentMaker class helps writing Matroska "AttachedFile"-elements which contain an att...
The AbstractAttachment class parses and stores attachment information.
EbmlElement * attachedFileElement() const
Returns the "AttachedFile"-element which has been specified when the parse() method has been called...
uint64 requiredSize() const
Returns the number of bytes which will be written when making the attachment.
const MatroskaAttachment & attachment() const
Returns the associated attachment.
MatroskaAttachmentMaker prepareMaking()
Prepares making.
MatroskaAttachment()
Constructs a new Matroska attachment.
Contains all classes and functions of the TagInfo library.
Definition: exceptions.h:9
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Implementation of Media::AbstractAttachment for the Matroska container.