Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
TagParser::FlacMetaDataBlockHeader Class Reference

The FlacMetaDataBlockHeader class is a FLAC "METADATA_BLOCK_HEADER" parser and maker. More...

#include <flacmetadata.h>

Public Member Functions

constexpr FlacMetaDataBlockHeader ()
 Constructs a new FLAC "METADATA_BLOCK_HEADER".
 
void parseHeader (std::string_view buffer)
 Parses the FLAC "METADATA_BLOCK_HEADER" which is read using the specified iterator.
 
void makeHeader (std::ostream &outputStream)
 Writes the header to the specified outputStream.
 
constexpr std::uint8_t isLast () const
 Returns whether this is the last metadata block before the audio blocks.
 
void setLast (std::uint8_t last)
 Sets whether this is the last metadata block before the audio blocks.
 
constexpr std::uint8_t type () const
 Returns the block type.
 
void setType (FlacMetaDataBlockType type)
 Sets the block type.
 
constexpr std::uint32_t dataSize () const
 Returns the length in bytes of the meta data (excluding the size of the header itself).
 
void setDataSize (std::uint32_t dataSize)
 Sets the length in bytes of the meta data (excluding the size of the header itself).
 

Detailed Description

The FlacMetaDataBlockHeader class is a FLAC "METADATA_BLOCK_HEADER" parser and maker.

See also
https://xiph.org/flac/format.html

Constructor & Destructor Documentation

◆ FlacMetaDataBlockHeader()

TagParser::FlacMetaDataBlockHeader::FlacMetaDataBlockHeader ( )
constexpr

Constructs a new FLAC "METADATA_BLOCK_HEADER".

Definition at line 51 of file flacmetadata.h.

Member Function Documentation

◆ dataSize()

std::uint32_t TagParser::FlacMetaDataBlockHeader::dataSize ( ) const
constexpr

Returns the length in bytes of the meta data (excluding the size of the header itself).

Definition at line 95 of file flacmetadata.h.

◆ isLast()

std::uint8_t TagParser::FlacMetaDataBlockHeader::isLast ( ) const
constexpr

Returns whether this is the last metadata block before the audio blocks.

Remarks
The default value is 0/false.

Definition at line 62 of file flacmetadata.h.

◆ makeHeader()

void TagParser::FlacMetaDataBlockHeader::makeHeader ( std::ostream & outputStream)

Writes the header to the specified outputStream.

Remarks
Writes always 4 bytes.

Definition at line 40 of file flacmetadata.cpp.

◆ parseHeader()

void TagParser::FlacMetaDataBlockHeader::parseHeader ( std::string_view buffer)

Parses the FLAC "METADATA_BLOCK_HEADER" which is read using the specified iterator.

Remarks
The specified buffer must be at least 4 bytes long.

Definition at line 29 of file flacmetadata.cpp.

◆ setDataSize()

void TagParser::FlacMetaDataBlockHeader::setDataSize ( std::uint32_t dataSize)
inline

Sets the length in bytes of the meta data (excluding the size of the header itself).

Remarks
Max value is (2^24 - 1).

Definition at line 104 of file flacmetadata.h.

◆ setLast()

void TagParser::FlacMetaDataBlockHeader::setLast ( std::uint8_t last)
inline

Sets whether this is the last metadata block before the audio blocks.

Definition at line 70 of file flacmetadata.h.

◆ setType()

void TagParser::FlacMetaDataBlockHeader::setType ( FlacMetaDataBlockType type)
inline

Sets the block type.

Definition at line 87 of file flacmetadata.h.

◆ type()

std::uint8_t TagParser::FlacMetaDataBlockHeader::type ( ) const
constexpr

Returns the block type.

See also
FlacMetaDataBlockType

Definition at line 79 of file flacmetadata.h.


The documentation for this class was generated from the following files: