Tag Parser 12.5.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
matroskaattachment.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_MATROSKAATTACHMENT_H
2#define TAG_PARSER_MATROSKAATTACHMENT_H
3
5
6namespace TagParser {
7
8class EbmlElement;
10
11class TAG_PARSER_EXPORT MatroskaAttachmentMaker {
12 friend class MatroskaAttachment;
13
14public:
15 void make(std::ostream &stream, Diagnostics &diag) const;
16 const MatroskaAttachment &attachment() const;
17 std::uint64_t requiredSize() const;
19
20private:
21 MatroskaAttachmentMaker(MatroskaAttachment &attachment, Diagnostics &diag);
22
23 MatroskaAttachment &m_attachment;
24 std::uint64_t m_attachedFileElementSize;
25 std::uint64_t m_totalSize;
26};
27
32{
33 return m_attachment;
34}
35
39inline std::uint64_t MatroskaAttachmentMaker::requiredSize() const
40{
41 return m_totalSize;
42}
43
45public:
47
50 void make(std::ostream &stream, Diagnostics &diag);
51
53
54private:
55 EbmlElement *m_attachedFileElement;
56};
57
62 : m_attachedFileElement(nullptr)
63{
64}
65
70{
71 return m_attachedFileElement;
72}
73
88
89} // namespace TagParser
90
91#endif // TAG_PARSER_MATROSKAATTACHMENT_H
AbstractAttachment()
Constructs a new attachment.
The Diagnostics class is a container for DiagMessage.
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition ebmlelement.h:32
The MatroskaAttachmentMaker class helps writing Matroska "AttachedFile"-elements which contain an att...
const MatroskaAttachment & attachment() const
Returns the associated attachment.
std::uint64_t requiredSize() const
Returns the number of bytes which will be written when making the attachment.
void make(std::ostream &stream, Diagnostics &diag) const
Saves the attachment (specified when constructing the object) to the specified stream (makes an "Atta...
void bufferCurrentAttachments(Diagnostics &diag)
Implementation of TagParser::AbstractAttachment for the Matroska container.
EbmlElement * attachedFileElement() const
Returns the "AttachedFile"-element which has been specified when the parse() method has been called.
void make(std::ostream &stream, Diagnostics &diag)
Writes the attachment to the specified stream (makes an "AttachedFile"-element).
MatroskaAttachmentMaker prepareMaking(Diagnostics &diag)
Prepares making.
void parse(EbmlElement *attachedFileElement, Diagnostics &diag)
Parses attachment from the specified attachedFileElement.
MatroskaAttachment()
Constructs a new Matroska attachment.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10