Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::DecompressMP3::FrameHeader_t Struct Reference

Decoded 32 bit MP3 packet header. More...

Inheritance diagram for Burger::DecompressMP3::FrameHeader_t:

Public Member Functions

uint_t IsFreeFormat (void) const
 Return TRUE if bit rate is adjustable.
 
void Invalidate (void)
 Mark the structure as invalid.
 
uint_t is_valid (void) const
 Return TRUE if the structure is valid.
 
uint_t Decode (const void *pInput)
 Decode the 32 bit packet header.
 
void Encode (void *pOutput) const
 Encode the 32 bit MP3 packet header.
 

Public Attributes

uint_t m_uBitrateIndex
 4 bit index into the bit rate tables (0 = free format, 1-14 index)
 
uint_t m_uSamplingRateFrequencyIndex
 0-2, index into the sampling rate table
 
uint_t m_bPadding
 TRUE if the frame is padded by one extra slot
 
uint_t m_bPrivateExtension
 TRUE if a private extension is present
 
uint_t m_bCopyrighted
 TRUE if this file is copyrighted (Copy forbidden)
 
uint_t m_bOriginalMedia
 TRUE if this is the original file
 
uint_t m_bCRCPresent
 TRUE if there's a CRC-16 (IBM format) after the header
 
eMPEGAudioVersionID m_uVersion
 MP3 Version 1, 2 or 2.5.
 
eMPEGLayerDescription m_uLayerDescription
 MP3 Layer description 1,2 or 3.
 
eMPEGChannelMode m_uChannelMode
 MP3 Channel mode.
 
eMPEGModeExtension m_uModeExtension
 MP3 Mode extension.
 
eMPEGEmphasis m_uEmphasis
 Decompression emphasis (Not really used anymore)
 

Detailed Description

Decoded 32 bit MP3 packet header.


The beginning of an MP3 data packet is a big endian 32 bit value broken down to certain bit fields that are described by these web pages https://www.mp3-tech.org/programmer/frame_header.html and http://www.datavoyage.com/mpgscript/mpeghdr.htm

This structure and functions will parse, validate and read or write this data from or into an MP3 data stream.

See also
FrameHeaderExt_t, DecompressMP3, eMPEGAudioVersionID, eMPEGLayerDescription, eMPEGChannelMode, eMPEGModeExtension or eMPEGEmphasis

Member Function Documentation

◆ Decode()

uint_t BURGER_API Burger::DecompressMP3::FrameHeader_t::Decode ( const void * pInput)

Decode the 32 bit packet header.


Details are found on these web pages https://www.mp3-tech.org/programmer/frame_header.html http://www.datavoyage.com/mpgscript/mpeghdr.htm

Parameters
pInputPointer to the 32 bit value in big endian (In memory encoding for the file)
Returns
Zero if no error, error code if there was a parsing issue.
See also
Encode(void *) const or DecompressMP3::ScanForFramePacket(uint_t) const

◆ Encode()

void BURGER_API Burger::DecompressMP3::FrameHeader_t::Encode ( void * pOutput) const

Encode the 32 bit MP3 packet header.


Details are found on these web pages https://www.mp3-tech.org/programmer/frame_header.html http://www.datavoyage.com/mpgscript/mpeghdr.htm

Parameters
pOutputPointer to a 4 byte buffer to store the encoded data
See also
Decode(void *) or DecompressMP3::ScanForFramePacket(uint_t) const

◆ Invalidate()

void Burger::DecompressMP3::FrameHeader_t::Invalidate ( void )
inline

Mark the structure as invalid.


See also
is_valid(void) const

◆ is_valid()

uint_t Burger::DecompressMP3::FrameHeader_t::is_valid ( void ) const
inline

Return TRUE if the structure is valid.


See also
Invalidate(void)

◆ IsFreeFormat()

uint_t Burger::DecompressMP3::FrameHeader_t::IsFreeFormat ( void ) const
inline

Return TRUE if bit rate is adjustable.


If this packet has a bit rate index of zero, return TRUE since this denotes a free format bit rate is used.

See also
FrameHeader_t

Member Data Documentation

◆ m_bCopyrighted

uint_t Burger::DecompressMP3::FrameHeader_t::m_bCopyrighted

TRUE if this file is copyrighted (Copy forbidden)

◆ m_bCRCPresent

uint_t Burger::DecompressMP3::FrameHeader_t::m_bCRCPresent

TRUE if there's a CRC-16 (IBM format) after the header

◆ m_bOriginalMedia

uint_t Burger::DecompressMP3::FrameHeader_t::m_bOriginalMedia

TRUE if this is the original file

◆ m_bPadding

uint_t Burger::DecompressMP3::FrameHeader_t::m_bPadding

TRUE if the frame is padded by one extra slot

◆ m_bPrivateExtension

uint_t Burger::DecompressMP3::FrameHeader_t::m_bPrivateExtension

TRUE if a private extension is present

◆ m_uBitrateIndex

uint_t Burger::DecompressMP3::FrameHeader_t::m_uBitrateIndex

4 bit index into the bit rate tables (0 = free format, 1-14 index)

◆ m_uChannelMode

eMPEGChannelMode Burger::DecompressMP3::FrameHeader_t::m_uChannelMode

MP3 Channel mode.

◆ m_uEmphasis

eMPEGEmphasis Burger::DecompressMP3::FrameHeader_t::m_uEmphasis

Decompression emphasis (Not really used anymore)

◆ m_uLayerDescription

eMPEGLayerDescription Burger::DecompressMP3::FrameHeader_t::m_uLayerDescription

MP3 Layer description 1,2 or 3.

◆ m_uModeExtension

eMPEGModeExtension Burger::DecompressMP3::FrameHeader_t::m_uModeExtension

MP3 Mode extension.

◆ m_uSamplingRateFrequencyIndex

uint_t Burger::DecompressMP3::FrameHeader_t::m_uSamplingRateFrequencyIndex

0-2, index into the sampling rate table

◆ m_uVersion

eMPEGAudioVersionID Burger::DecompressMP3::FrameHeader_t::m_uVersion

MP3 Version 1, 2 or 2.5.