Tag Parser
9.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
Go to the documentation of this file.
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, std::uint64_t startOffset, std::uint64_t maxSize)
39 string Mpeg4Descriptor::parsingContext()
const
49 return "0x" + 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 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());
void internalParse(Diagnostics &diag)
Parses the MPEG-4 descriptor.
std::unique_ptr< ImplementationType > m_nextSibling
CppUtilities::BinaryReader & reader()
Returns the related BinaryReader.
std::uint32_t m_sizeLength
std::iostream & stream()
Returns the related stream.
std::uint64_t startOffset() const
Returns the start offset in the related stream.
The Diagnostics class is a container for DiagMessage.
Contains all classes and functions of the TagInfo library.
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...
static constexpr std::uint8_t minimumElementSize()
Returns the mimimum element size.
The Mpeg4Descriptor class helps to parse MPEG-4 descriptors.
The GenericFileElement class helps to parse binary files which consist of an arboreal element strucut...
std::string idToString() const
Converts the specified atom ID to a printable string.
The exception that is thrown when the data to be parsed is truncated and therefore can not be parsed ...
typename FileElementTraits< ImplementationType >::ContainerType ContainerType
Specifies the type of the corresponding container.
ContainerType & container()
Returns the related container.
std::unique_ptr< ImplementationType > m_firstChild
ImplementationType * parent()
Returns the parent of the element.
std::uint64_t maxTotalSize() const
Returns maximum total size.
std::uint64_t totalSize() const
Returns the total size of the element.