5#include <c++utilities/conversion/stringbuilder.h>
6#include <c++utilities/conversion/stringconversion.h>
7#include <c++utilities/io/binaryreader.h>
39string Mpeg4Descriptor::parsingContext()
const
49 return "0x" + numberToString(
id(),
static_cast<std::uint8_t
>(16));
60 "Descriptor is smaller than 2 byte and hence invalid. The maximum size within the encloding element is " % numberToString(
maxTotalSize())
62 "parsing MPEG-4 descriptor");
70 std::uint8_t tmp =
reader().readByte();
78 diag.emplace_back(
DiagLevel::Warning,
"The descriptor seems to be truncated; unable to parse siblings of that ", parsingContext());
The Diagnostics class is a container for DiagMessage.
The GenericFileElement class helps to parse binary files which consist of an arboreal element structu...
std::uint64_t startOffset() const
std::unique_ptr< Mpeg4Descriptor > m_nextSibling
Mpeg4Descriptor * parent()
static constexpr std::uint8_t minimumElementSize()
std::unique_ptr< Mpeg4Descriptor > m_firstChild
std::uint64_t totalSize() const
ContainerType & container()
CppUtilities::BinaryReader & reader()
std::uint64_t maxTotalSize() const
std::uint32_t m_sizeLength
The Mpeg4Descriptor class helps to parse MPEG-4 descriptors.
std::string idToString() const
Converts the specified atom ID to a printable string.
Mpeg4Descriptor(ContainerType &container, std::uint64_t startOffset, std::uint64_t maxSize)
Constructs a new top level descriptor with the specified container at the specified startOffset and w...
void internalParse(Diagnostics &diag)
Parses the MPEG-4 descriptor.
The exception that is thrown when the data to be parsed is truncated and therefore can not be parsed ...
Contains all classes and functions of the TagInfo library.