1 #ifndef TAG_PARSER_EBMLELEMENT_H 2 #define TAG_PARSER_EBMLELEMENT_H 7 #include "../genericfileelement.h" 9 #include <c++utilities/conversion/stringbuilder.h> 10 #include <c++utilities/conversion/stringconversion.h> 11 #include <c++utilities/conversion/types.h> 19 class MatroskaContainer;
37 std::string idToString()
const;
38 bool isParent()
const;
39 bool isPadding()
const;
40 uint64 firstChildOffset()
const;
41 std::string readString();
42 uint64 readUInteger();
46 static byte calculateSizeDenotationLength(uint64 size);
48 static byte makeSizeDenotation(uint64 size,
char *buff);
49 static byte makeSizeDenotation(uint64 size,
char *buff,
byte minBytes);
50 static byte calculateUIntegerLength(uint64 integer);
51 static byte makeUInteger(uint64 value,
char *buff);
52 static byte makeUInteger(uint64 value,
char *buff,
byte minBytes);
53 static void makeSimpleElement(std::ostream &stream,
IdentifierType id, uint64 content);
54 static void makeSimpleElement(std::ostream &stream,
IdentifierType id,
const std::string &content);
55 static void makeSimpleElement(std::ostream &stream,
IdentifierType id,
const char *data, std::size_t dataSize);
65 std::string parsingContext()
const;
73 using namespace ConversionUtilities;
76 return argsToString(
'0',
'x', numberToString(
id(), 16),
' ',
'\"', name,
'\"');
78 return "0x" + numberToString(
id(), 16);
90 using namespace EbmlIds;
91 using namespace MatroskaIds;
165 #endif // TAG_PARSER_EBMLELEMENT_H Defines traits for the specified ImplementationType.
Implementation of GenericContainer<MediaFileInfo, MatroskaTag, MatroskaTrack, EbmlElement>.
uint32 sizeLength() const
Returns the length of the size denotation of the element in byte.
The EbmlElement class helps to parse EBML files such as Matroska files.
The GenericFileElement class helps to parse binary files which consist of an arboreal element strucut...
std::string idToString() const
Converts the specified EBML ID to a printable string.
uint64 firstChildOffset() const
Returns the offset of the first child of the element.
uint32 idLength() const
Returns the length of the id denotation in byte.
bool isPadding() const
Returns an indication whether the element is considered as padding.
static uint64 bytesToBeSkipped
Specifies the number of bytes to be skipped till a valid EBML element is found in the stream.
typename FileElementTraits< ImplementationType >::IdentifierType IdentifierType
Specifies the type used to store identifiers.
const IdentifierType & id() const
Returns the element ID.
bool isParent() const
Returns an indication whether the element is a parent element.
Contains all classes and functions of the TagInfo library.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
The Diagnostics class is a container for DiagMessage.
TAG_PARSER_EXPORT const char * matroskaIdName(uint32 matroskaId)
Returns a string for the specified matroskaId if known; otherwise returns an empty string.