1#ifndef TAG_PARSER_EBMLELEMENT_H
2#define TAG_PARSER_EBMLELEMENT_H
9#include <c++utilities/conversion/stringbuilder.h>
10#include <c++utilities/conversion/stringconversion.h>
20class MatroskaContainer;
38 std::string idToString()
const;
39 bool isParent()
const;
40 bool isPadding()
const;
41 std::uint64_t firstChildOffset()
const;
42 std::string readString();
43 std::uint64_t readUInteger();
46 static std::uint8_t calculateIdLength(IdentifierType
id);
47 static std::uint8_t calculateSizeDenotationLength(std::uint64_t size);
48 static std::uint8_t makeId(IdentifierType
id,
char *buff);
49 static std::uint8_t makeSizeDenotation(std::uint64_t size,
char *buff);
50 static std::uint8_t makeSizeDenotation(std::uint64_t size,
char *buff, std::uint8_t minBytes);
51 static std::uint8_t calculateUIntegerLength(std::uint64_t integer);
52 static std::uint8_t makeUInteger(std::uint64_t value,
char *buff);
53 static std::uint8_t makeUInteger(std::uint64_t value,
char *buff, std::uint8_t minBytes);
54 static void makeSimpleElement(std::ostream &stream, IdentifierType
id, std::uint64_t content);
55 static void makeSimpleElement(std::ostream &stream, IdentifierType
id, std::string_view content);
65 std::string parsingContext()
const;
75 return argsToString(
'0',
'x', numberToString(
id(), 16u),
' ',
'\"', name,
'\"');
77 return "0x" + numberToString(
id(), 16u);
89 using namespace EbmlIds;
90 using namespace MatroskaIds;
94 case SignatureElements:
95 case SignatureElementList:
100 case ChapterTranslate:
115 case TrackCombinePlanes:
117 case TrackJoinBlocks:
118 case ContentEncodings:
119 case ContentEncoding:
120 case ContentCompression:
121 case ContentEncryption:
124 case CueTrackPositions:
134 case ChapProcessCommand:
The Diagnostics class is a container for DiagMessage.
The EbmlElement class helps to parse EBML files such as Matroska files.
static void makeSimpleElement(std::ostream &stream, IdentifierType id, std::string_view content)
std::uint64_t firstChildOffset() const
Returns the offset of the first child of the element.
bool isPadding() const
Returns an indication whether the element is considered as padding.
static std::uint64_t bytesToBeSkipped
Specifies the number of bytes to be skipped till a valid EBML element is found in the stream.
std::string idToString() const
Converts the specified EBML ID to a printable string.
bool isParent() const
Returns an indication whether the element is a parent element.
std::uint64_t DataSizeType
std::uint32_t IdentifierType
Defines traits for the specified ImplementationType.
The GenericFileElement class helps to parse binary files which consist of an arboreal element structu...
const IdentifierType & id() const
std::uint32_t sizeLength() const
std::uint32_t idLength() const
Implementation of GenericContainer<MediaFileInfo, MatroskaTag, MatroskaTrack, EbmlElement>.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
TAG_PARSER_EXPORT std::string_view matroskaIdName(std::uint32_t matroskaId)
Returns a string for the specified matroskaId if known; otherwise returns an empty string.