3 #include "../ogg/oggiterator.h"
5 #include "../exceptions.h"
7 #include <c++utilities/conversion/binaryconversion.h>
24 void FlacToOggMappingHeader::parseHeader(
OggIterator &iterator)
27 char buff[0x0D + 0x04 + 0x22 - 0x05];
28 iterator.
read(buff, 5);
29 if (*buff != 0x7Fu || BE::toUInt32(buff + 1) != 0x464C4143u) {
32 iterator.
read(buff,
sizeof(buff));
35 m_majorVersion =
static_cast<std::uint8_t
>(*(buff + 0x00));
36 m_minorVersion =
static_cast<std::uint8_t
>(*(buff + 0x01));
37 m_headerCount = BE::toUInt16(buff + 0x02);
38 if (BE::toUInt32(buff + 0x04) != 0x664C6143u) {
45 if (header.
type() != FlacMetaDataBlockType::StreamInfo) {
53 m_streamInfo.parse(buff + 0x0D + 0x04 - 0x05);
The exception that is thrown when the data to be parsed or to be made seems invalid and therefore can...
The OggIterator class helps iterating through all segments of an OGG bitstream.
void read(char *buffer, std::size_t count)
Reads count bytes from the OGG stream and writes it to the specified buffer.
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.