Tag Parser  7.1.0
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 TAG_PARSER_MATROSKAATTACHMENT_H
2 #define TAG_PARSER_MATROSKAATTACHMENT_H
3 
4 #include "../abstractattachment.h"
5 
6 namespace TagParser {
7 
8 class EbmlElement;
9 class MatroskaAttachment;
10 
12  friend class MatroskaAttachment;
13 
14 public:
15  void make(std::ostream &stream, Diagnostics &diag) const;
16  const MatroskaAttachment &attachment() const;
17  uint64 requiredSize() const;
18  void bufferCurrentAttachments(Diagnostics &diag);
19 
20 private:
22 
23  MatroskaAttachment &m_attachment;
24  uint64 m_attachedFileElementSize;
25  uint64 m_totalSize;
26 };
27 
32 {
33  return m_attachment;
34 }
35 
40 {
41  return m_totalSize;
42 }
43 
45 public:
47 
48  void parse(EbmlElement *attachedFileElement, Diagnostics &diag);
49  MatroskaAttachmentMaker prepareMaking(Diagnostics &diag);
50  void make(std::ostream &stream, Diagnostics &diag);
51 
52  EbmlElement *attachedFileElement() const;
53 
54 private:
55  EbmlElement *m_attachedFileElement;
56 };
57 
62  : m_attachedFileElement(nullptr)
63 {
64 }
65 
70 {
71  return m_attachedFileElement;
72 }
73 
85 {
86  return MatroskaAttachmentMaker(*this, diag);
87 }
88 
89 } // namespace TagParser
90 
91 #endif // TAG_PARSER_MATROSKAATTACHMENT_H
const MatroskaAttachment & attachment() const
Returns the associated attachment.
Implementation of TagParser::AbstractAttachment for the Matroska container.
The MatroskaAttachmentMaker class helps writing Matroska "AttachedFile"-elements which contain an att...
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition: ebmlelement.h:31
MatroskaAttachment()
Constructs a new Matroska attachment.
uint64 requiredSize() const
Returns the number of bytes which will be written when making the attachment.
EbmlElement * attachedFileElement() const
Returns the "AttachedFile"-element which has been specified when the parse() method has been called...
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:9
The AbstractAttachment class parses and stores attachment information.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
MatroskaAttachmentMaker prepareMaking(Diagnostics &diag)
Prepares making.
The Diagnostics class is a container for DiagMessage.
Definition: diagnostics.h:154