Tag Parser
12.5.3
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Toggle main menu visibility
Loading...
Searching...
No Matches
matroska
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
11
class
TAG_PARSER_EXPORT
MatroskaAttachmentMaker {
12
friend
class
MatroskaAttachment
;
13
14
public
:
15
void
make
(std::ostream &stream,
Diagnostics
&diag)
const
;
16
const
MatroskaAttachment
&
attachment
()
const
;
17
std::uint64_t
requiredSize
()
const
;
18
void
bufferCurrentAttachments
(
Diagnostics
&diag);
19
20
private
:
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
31
inline
const
MatroskaAttachment
&
MatroskaAttachmentMaker::attachment
()
const
32
{
33
return
m_attachment;
34
}
35
39
inline
std::uint64_t
MatroskaAttachmentMaker::requiredSize
()
const
40
{
41
return
m_totalSize;
42
}
43
44
class
TAG_PARSER_EXPORT
MatroskaAttachment
final :
public
AbstractAttachment
{
45
public
:
46
MatroskaAttachment
();
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
61
inline
MatroskaAttachment::MatroskaAttachment
()
62
: m_attachedFileElement(nullptr)
63
{
64
}
65
69
inline
EbmlElement
*
MatroskaAttachment::attachedFileElement
()
const
70
{
71
return
m_attachedFileElement;
72
}
73
84
inline
MatroskaAttachmentMaker
MatroskaAttachment::prepareMaking
(
Diagnostics
&diag)
85
{
86
return
MatroskaAttachmentMaker
(*
this
, diag);
87
}
88
89
}
// namespace TagParser
90
91
#endif
// TAG_PARSER_MATROSKAATTACHMENT_H
abstractattachment.h
TagParser::AbstractAttachment::AbstractAttachment
AbstractAttachment()
Constructs a new attachment.
Definition
abstractattachment.cpp:136
TagParser::Diagnostics
The Diagnostics class is a container for DiagMessage.
Definition
diagnostics.h:156
TagParser::EbmlElement
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition
ebmlelement.h:32
TagParser::MatroskaAttachmentMaker
The MatroskaAttachmentMaker class helps writing Matroska "AttachedFile"-elements which contain an att...
Definition
matroskaattachment.h:11
TagParser::MatroskaAttachmentMaker::MatroskaAttachment
friend class MatroskaAttachment
Definition
matroskaattachment.h:12
TagParser::MatroskaAttachmentMaker::attachment
const MatroskaAttachment & attachment() const
Returns the associated attachment.
Definition
matroskaattachment.h:31
TagParser::MatroskaAttachmentMaker::requiredSize
std::uint64_t requiredSize() const
Returns the number of bytes which will be written when making the attachment.
Definition
matroskaattachment.h:39
TagParser::MatroskaAttachmentMaker::make
void make(std::ostream &stream, Diagnostics &diag) const
Saves the attachment (specified when constructing the object) to the specified stream (makes an "Atta...
Definition
matroskaattachment.cpp:147
TagParser::MatroskaAttachmentMaker::bufferCurrentAttachments
void bufferCurrentAttachments(Diagnostics &diag)
Definition
matroskaattachment.cpp:183
TagParser::MatroskaAttachment
Implementation of TagParser::AbstractAttachment for the Matroska container.
Definition
matroskaattachment.h:44
TagParser::MatroskaAttachment::attachedFileElement
EbmlElement * attachedFileElement() const
Returns the "AttachedFile"-element which has been specified when the parse() method has been called.
Definition
matroskaattachment.h:69
TagParser::MatroskaAttachment::make
void make(std::ostream &stream, Diagnostics &diag)
Writes the attachment to the specified stream (makes an "AttachedFile"-element).
Definition
matroskaattachment.cpp:95
TagParser::MatroskaAttachment::prepareMaking
MatroskaAttachmentMaker prepareMaking(Diagnostics &diag)
Prepares making.
Definition
matroskaattachment.h:84
TagParser::MatroskaAttachment::parse
void parse(EbmlElement *attachedFileElement, Diagnostics &diag)
Parses attachment from the specified attachedFileElement.
Definition
matroskaattachment.cpp:30
TagParser::MatroskaAttachment::MatroskaAttachment
MatroskaAttachment()
Constructs a new Matroska attachment.
Definition
matroskaattachment.h:61
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition
global.h:14
TagParser
Contains all classes and functions of the TagInfo library.
Definition
aaccodebook.h:10
Generated on
for Tag Parser by
1.18.0