5 #include <c++utilities/conversion/stringbuilder.h> 6 #include <c++utilities/conversion/stringconversion.h> 7 #include <c++utilities/io/binaryreader.h> 23 Mpeg4Descriptor::Mpeg4Descriptor(
ContainerType &container, uint64 startOffset, uint64 maxSize)
39 string Mpeg4Descriptor::parsingContext()
const 49 return "0x" + ConversionUtilities::numberToString(
id(), 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 byte tmp =
reader().readByte();
78 diag.emplace_back(
DiagLevel::Warning,
"The descriptor seems to be truncated; unable to parse siblings of that ", parsingContext());
std::string idToString() const
Converts the specified atom ID to a printable string.
FileElementTraits< ImplementationType >::ContainerType ContainerType
Specifies the type of the corresponding container.
std::unique_ptr< ImplementationType > m_firstChild
std::unique_ptr< ImplementationType > m_nextSibling
uint64 startOffset() const
Returns the start offset in the related stream.
uint64 totalSize() const
Returns the total size of the element.
static constexpr byte minimumElementSize()
Returns the mimimum element size.
IoUtilities::BinaryReader & reader()
Returns the related BinaryReader.
void internalParse(Diagnostics &diag)
Parses the MPEG-4 descriptor.
ContainerType & container()
Returns the related container.
uint64 maxTotalSize() const
Returns maximum total size.
Mpeg4Descriptor(ContainerType &container, uint64 startOffset, uint64 maxSize)
Constructs a new top level descriptor with the specified container at the specified startOffset and w...
std::iostream & stream()
Returns the related stream.
ImplementationType * parent()
Returns the parent of the element.