Tag Parser  6.5.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | List of all members
Media::FlacMetaDataBlockHeader Class Reference

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

#include <flacmetadata.h>

Public Member Functions

 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...
 
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...
 
byte type () const
 Returns the block type. More...
 
void setType (FlacMetaDataBlockType type)
 Sets the block type. More...
 
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 38 of file flacmetadata.h.

Constructor & Destructor Documentation

◆ FlacMetaDataBlockHeader()

Media::FlacMetaDataBlockHeader::FlacMetaDataBlockHeader ( )
inline

Constructs a new FLAC "METADATA_BLOCK_HEADER".

Definition at line 62 of file flacmetadata.h.

Member Function Documentation

◆ dataSize()

uint32 Media::FlacMetaDataBlockHeader::dataSize ( ) const
inline

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

Definition at line 105 of file flacmetadata.h.

◆ isLast()

byte Media::FlacMetaDataBlockHeader::isLast ( ) const
inline

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

Remarks
The default value is 0/false.

Definition at line 72 of file flacmetadata.h.

◆ makeHeader()

void Media::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 Media::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 Media::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 114 of file flacmetadata.h.

◆ setLast()

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

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

Definition at line 80 of file flacmetadata.h.

◆ setType()

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

Sets the block type.

Definition at line 97 of file flacmetadata.h.

◆ type()

byte Media::FlacMetaDataBlockHeader::type ( ) const
inline

Returns the block type.

See also
FlacMetaDataBlockType

Definition at line 89 of file flacmetadata.h.


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