1#ifndef TAG_PARSER_MP4ATOM_H
2#define TAG_PARSER_MP4ATOM_H
8#include <c++utilities/conversion/stringconversion.h>
52 static void makeHeader(std::uint64_t size, std::uint32_t
id, CppUtilities::BinaryWriter &
writer);
61 std::string parsingContext()
const;
69 auto idString = CppUtilities::interpretIntegerAsString<IdentifierType>(
id());
70 for (
char &c : idString) {
The Diagnostics class is a container for DiagMessage.
Mp4Container ContainerType
std::uint64_t DataSizeType
std::uint32_t IdentifierType
Defines traits for the specified ImplementationType.
GenericFileElement(ContainerType &container, std::uint64_t startOffset)
std::uint64_t startOffset() const
CppUtilities::BinaryWriter & writer()
typename FileElementTraits< Mp4Atom >::ContainerType ContainerType
static constexpr std::uint8_t minimumElementSize()
DataSizeType dataSize() const
ContainerType & container()
The Mp4Atom class helps to parse MP4 files.
static constexpr void addHeaderSize(std::uint64_t &dataSize)
Adds the header size to the specified data size.
Mp4Atom(ContainerType &container, std::uint64_t startOffset, std::uint64_t maxSize)
std::string idToString() const
Converts the specified atom ID to a printable string.
static void seekBackAndWriteAtomSize(std::ostream &stream, const std::ostream::pos_type &startOffset, Diagnostics &diag)
This function helps to write the atom size after writing an atom to a stream.
static void makeHeader(std::uint64_t size, std::uint32_t id, CppUtilities::BinaryWriter &writer)
Writes an MP4 atom header to the specified stream.
static void seekBackAndWriteAtomSize64(std::ostream &stream, const std::ostream::pos_type &startOffset)
This function helps to write the atom size after writing an atom to a stream.
bool isParent() const
Returns an indication whether the atom is a parent element.
void internalParse(Diagnostics &diag)
Parses the MP4 atom.
std::uint64_t firstChildOffset() const
Returns the offset of the first child (relative to the start offset of this atom).
bool isPadding() const
Returns an indication whether the atom is a padding element.
Mp4Atom(ContainerType &container, std::uint64_t startOffset)
Implementation of GenericContainer<MediaFileInfo, Mp4Tag, Mp4Track, Mp4Atom>.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.