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

#include <adtsframe.h>

Public Member Functions

 AdtsFrame ()
 Constructs a new frame. More...
 
void parseHeader (IoUtilities::BinaryReader &reader)
 Parses the header read using the specified reader. More...
 
bool isValid () const
 Returns an indication whether the frame is valid. More...
 
bool isMpeg4 () const
 Returns whether the MPEG version is MPEG-4; otherwise the MPEG version is MPEG-2. More...
 
bool hasCrc () const
 Returns whether a CRC-16 checksum is present ("protection absent" bit is NOT set). More...
 
byte mpeg4AudioObjectId () const
 Returns the MPEG-4 audio object type ID. More...
 
byte mpeg4SamplingFrequencyIndex () const
 Returns the MPEG-4 sample rate index. More...
 
byte mpeg4ChannelConfig () const
 Returns the MPEG-4 channel configuration. More...
 
uint16 totalSize () const
 Returns the size of the frame (including the header) in bytes. More...
 
byte headerSize () const
 Retruns the header size in bytes (9 if CRC is present; otherwise 7). More...
 
uint16 dataSize () const
 Returns the data size (total size minus header size) in bytes. More...
 
uint16 bufferFullness () const
 Returns the buffer fullness. More...
 
byte frameCount () const
 Returns the number of AAC frames (RDBs) in the ADTS frame. More...
 
uint16 crc () const
 Returns the CRC-16 checksum of the frame. More...
 

Detailed Description

Definition at line 14 of file adtsframe.h.

Constructor & Destructor Documentation

◆ AdtsFrame()

TagParser::AdtsFrame::AdtsFrame ( )
inline

Constructs a new frame.

Definition at line 41 of file adtsframe.h.

Member Function Documentation

◆ bufferFullness()

uint16 TagParser::AdtsFrame::bufferFullness ( ) const
inline

Returns the buffer fullness.

Definition at line 126 of file adtsframe.h.

◆ crc()

uint16 TagParser::AdtsFrame::crc ( ) const
inline

Returns the CRC-16 checksum of the frame.

See also
hasCrc()

Definition at line 143 of file adtsframe.h.

◆ dataSize()

uint16 TagParser::AdtsFrame::dataSize ( ) const
inline

Returns the data size (total size minus header size) in bytes.

Definition at line 118 of file adtsframe.h.

◆ frameCount()

byte TagParser::AdtsFrame::frameCount ( ) const
inline

Returns the number of AAC frames (RDBs) in the ADTS frame.

Definition at line 134 of file adtsframe.h.

◆ hasCrc()

bool TagParser::AdtsFrame::hasCrc ( ) const
inline

Returns whether a CRC-16 checksum is present ("protection absent" bit is NOT set).

Definition at line 65 of file adtsframe.h.

◆ headerSize()

byte TagParser::AdtsFrame::headerSize ( ) const
inline

Retruns the header size in bytes (9 if CRC is present; otherwise 7).

Definition at line 110 of file adtsframe.h.

◆ isMpeg4()

bool TagParser::AdtsFrame::isMpeg4 ( ) const
inline

Returns whether the MPEG version is MPEG-4; otherwise the MPEG version is MPEG-2.

Definition at line 57 of file adtsframe.h.

◆ isValid()

bool TagParser::AdtsFrame::isValid ( ) const
inline

Returns an indication whether the frame is valid.

Definition at line 49 of file adtsframe.h.

◆ mpeg4AudioObjectId()

byte TagParser::AdtsFrame::mpeg4AudioObjectId ( ) const
inline

Returns the MPEG-4 audio object type ID.

See also
Media::Mpeg4AudioObjectIds
Mpeg4AudioObjectIds::idToMediaFormat()

Definition at line 75 of file adtsframe.h.

◆ mpeg4ChannelConfig()

byte TagParser::AdtsFrame::mpeg4ChannelConfig ( ) const
inline

Returns the MPEG-4 channel configuration.

See also
Media::Mpeg4ChannelConfigs
Media::mpeg4SampleRateTable::channelConfigString()

Definition at line 94 of file adtsframe.h.

◆ mpeg4SamplingFrequencyIndex()

byte TagParser::AdtsFrame::mpeg4SamplingFrequencyIndex ( ) const
inline

Returns the MPEG-4 sample rate index.

See also
Media::mpeg4SampleRateTable

Definition at line 84 of file adtsframe.h.

◆ parseHeader()

void TagParser::AdtsFrame::parseHeader ( IoUtilities::BinaryReader &  reader)

Parses the header read using the specified reader.

Exceptions
ThrowsInvalidDataException if the data read from the stream is no valid frame header.

Definition at line 22 of file adtsframe.cpp.

◆ totalSize()

uint16 TagParser::AdtsFrame::totalSize ( ) const
inline

Returns the size of the frame (including the header) in bytes.

Definition at line 102 of file adtsframe.h.


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