Tag Parser  8.2.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | List of all members
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". More...
 
void parseHeader (const char *buffer)
 Parses the FLAC "METADATA_BLOCK_HEADER" which is read using the specified iterator. More...
 
void makeHeader (std::ostream &outputStream)
 Writes the header to the specified outputStream. More...
 
constexpr byte isLast () const
 Returns whether this is the last metadata block before the audio blocks. More...
 
void setLast (byte last)
 Sets whether this is the last metadata block before the audio blocks. More...
 
constexpr byte type () const
 Returns the block type. More...
 
void setType (FlacMetaDataBlockType type)
 Sets the block type. More...
 
constexpr uint32 dataSize () const
 Returns the length in bytes of the meta data (excluding the size of the header itself). More...
 
void setDataSize (uint32 dataSize)
 Sets the length in bytes of the meta data (excluding the size of the header itself). More...
 

Detailed Description

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

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

Definition at line 29 of file flacmetadata.h.

Constructor & Destructor Documentation

◆ FlacMetaDataBlockHeader()

constexpr TagParser::FlacMetaDataBlockHeader::FlacMetaDataBlockHeader ( )

Constructs a new FLAC "METADATA_BLOCK_HEADER".

Definition at line 52 of file flacmetadata.h.

Member Function Documentation

◆ dataSize()

constexpr uint32 TagParser::FlacMetaDataBlockHeader::dataSize ( ) const

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

Definition at line 96 of file flacmetadata.h.

◆ isLast()

constexpr byte TagParser::FlacMetaDataBlockHeader::isLast ( ) const

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

Remarks
The default value is 0/false.

Definition at line 63 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 41 of file flacmetadata.cpp.

◆ parseHeader()

void TagParser::FlacMetaDataBlockHeader::parseHeader ( const char *  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 30 of file flacmetadata.cpp.

◆ setDataSize()

void TagParser::FlacMetaDataBlockHeader::setDataSize ( uint32  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 105 of file flacmetadata.h.

◆ setLast()

void TagParser::FlacMetaDataBlockHeader::setLast ( byte  last)
inline

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

Definition at line 71 of file flacmetadata.h.

◆ setType()

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

Sets the block type.

Definition at line 88 of file flacmetadata.h.

◆ type()

constexpr byte TagParser::FlacMetaDataBlockHeader::type ( ) const

Returns the block type.

See also
FlacMetaDataBlockType

Definition at line 80 of file flacmetadata.h.


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