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

The MpegAudioFrame class is used to parse MPEG audio frames. More...

#include <mpegaudioframe.h>

Public Member Functions

 MpegAudioFrame ()
 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...
 
double mpegVersion () const
 Returns the MPEG version if known (1.0, 2.0 or 2.5); otherwise returns 0. More...
 
int layer () const
 Returns the MPEG layer if known (1, 2, or 3); otherwise returns 0. More...
 
bool isProtectedByCrc () const
 Returns an indication whether the frame is protected by CRC. More...
 
uint32 bitrate () const
 Returns the bitrate of the frame if known; otherwise returns 0. More...
 
uint32 samplingFrequency () const
 Returns the sampeling frequency of the frame if known; otherwise returns 0. More...
 
uint32 paddingSize () const
 Returns the padding size if known; otherwise returns 0. More...
 
MpegChannelMode channelMode () const
 Returns the channel mode if known; otherwise returns MpegChannelMode::Unspecifed. More...
 
bool hasCopyright () const
 Returns an indication whether the frame is copyrighted. More...
 
bool isOriginal () const
 Returns an indication whether the frame labeled as original. More...
 
uint32 sampleCount () const
 Returns the sample count if known; otherwise returns 0. More...
 
uint32 size () const
 Returns the size if known; otherwise retruns 0. More...
 
bool isXingHeaderAvailable () const
 Returns an indication whether a Xing header is present. More...
 
XingHeaderFlags xingHeaderFlags () const
 Returns the Xing header flags. More...
 
bool isXingFramefieldPresent () const
 Returns an indication whether the Xing frame field is present. More...
 
bool isXingBytesfieldPresent () const
 Returns an indication whether the Xing bytes field is present. More...
 
bool isXingTocFieldPresent () const
 Returns an indication whether the Xing TOC is present. More...
 
bool isXingQualityIndicatorFieldPresent () const
 Returns an indication whether the Xing quality indicator field is present. More...
 
uint32 xingFrameCount () const
 Returns an indication whether the Xing frame count is present. More...
 
uint32 xingBytesfield () const
 Returns the Xing bytes field if known; otherwise returns 0. More...
 
uint32 xingQualityIndicator () const
 Returns the Xing quality indicator if known; otherwise returns 0. More...
 

Detailed Description

The MpegAudioFrame class is used to parse MPEG audio frames.

Definition at line 40 of file mpegaudioframe.h.

Constructor & Destructor Documentation

◆ MpegAudioFrame()

Media::MpegAudioFrame::MpegAudioFrame ( )
inline

Constructs a new frame.

Definition at line 84 of file mpegaudioframe.h.

Member Function Documentation

◆ bitrate()

uint32 Media::MpegAudioFrame::bitrate ( ) const
inline

Returns the bitrate of the frame if known; otherwise returns 0.

Definition at line 112 of file mpegaudioframe.h.

◆ channelMode()

MpegChannelMode Media::MpegAudioFrame::channelMode ( ) const

Returns the channel mode if known; otherwise returns MpegChannelMode::Unspecifed.

Definition at line 154 of file mpegaudioframe.cpp.

◆ hasCopyright()

bool Media::MpegAudioFrame::hasCopyright ( ) const
inline

Returns an indication whether the frame is copyrighted.

Definition at line 135 of file mpegaudioframe.h.

◆ isOriginal()

bool Media::MpegAudioFrame::isOriginal ( ) const
inline

Returns an indication whether the frame labeled as original.

Definition at line 143 of file mpegaudioframe.h.

◆ isProtectedByCrc()

bool Media::MpegAudioFrame::isProtectedByCrc ( ) const
inline

Returns an indication whether the frame is protected by CRC.

Definition at line 104 of file mpegaudioframe.h.

◆ isValid()

bool Media::MpegAudioFrame::isValid ( ) const
inline

Returns an indication whether the frame is valid.

Definition at line 96 of file mpegaudioframe.h.

◆ isXingBytesfieldPresent()

bool Media::MpegAudioFrame::isXingBytesfieldPresent ( ) const
inline

Returns an indication whether the Xing bytes field is present.

Definition at line 188 of file mpegaudioframe.h.

◆ isXingFramefieldPresent()

bool Media::MpegAudioFrame::isXingFramefieldPresent ( ) const
inline

Returns an indication whether the Xing frame field is present.

Definition at line 178 of file mpegaudioframe.h.

◆ isXingHeaderAvailable()

bool Media::MpegAudioFrame::isXingHeaderAvailable ( ) const
inline

Returns an indication whether a Xing header is present.

Definition at line 162 of file mpegaudioframe.h.

◆ isXingQualityIndicatorFieldPresent()

bool Media::MpegAudioFrame::isXingQualityIndicatorFieldPresent ( ) const
inline

Returns an indication whether the Xing quality indicator field is present.

Definition at line 208 of file mpegaudioframe.h.

◆ isXingTocFieldPresent()

bool Media::MpegAudioFrame::isXingTocFieldPresent ( ) const
inline

Returns an indication whether the Xing TOC is present.

Definition at line 198 of file mpegaudioframe.h.

◆ layer()

int Media::MpegAudioFrame::layer ( ) const

Returns the MPEG layer if known (1, 2, or 3); otherwise returns 0.

Definition at line 95 of file mpegaudioframe.cpp.

◆ mpegVersion()

double Media::MpegAudioFrame::mpegVersion ( ) const

Returns the MPEG version if known (1.0, 2.0 or 2.5); otherwise returns 0.

Definition at line 78 of file mpegaudioframe.cpp.

◆ paddingSize()

uint32 Media::MpegAudioFrame::paddingSize ( ) const
inline

Returns the padding size if known; otherwise returns 0.

Definition at line 123 of file mpegaudioframe.h.

◆ parseHeader()

void Media::MpegAudioFrame::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 50 of file mpegaudioframe.cpp.

◆ sampleCount()

uint32 Media::MpegAudioFrame::sampleCount ( ) const

Returns the sample count if known; otherwise returns 0.

Definition at line 176 of file mpegaudioframe.cpp.

◆ samplingFrequency()

uint32 Media::MpegAudioFrame::samplingFrequency ( ) const

Returns the sampeling frequency of the frame if known; otherwise returns 0.

Definition at line 112 of file mpegaudioframe.cpp.

◆ size()

uint32 Media::MpegAudioFrame::size ( ) const

Returns the size if known; otherwise retruns 0.

Definition at line 200 of file mpegaudioframe.cpp.

◆ xingBytesfield()

uint32 Media::MpegAudioFrame::xingBytesfield ( ) const
inline

Returns the Xing bytes field if known; otherwise returns 0.

Definition at line 226 of file mpegaudioframe.h.

◆ xingFrameCount()

uint32 Media::MpegAudioFrame::xingFrameCount ( ) const
inline

Returns an indication whether the Xing frame count is present.

Definition at line 218 of file mpegaudioframe.h.

◆ xingHeaderFlags()

XingHeaderFlags Media::MpegAudioFrame::xingHeaderFlags ( ) const
inline

Returns the Xing header flags.

Definition at line 170 of file mpegaudioframe.h.

◆ xingQualityIndicator()

uint32 Media::MpegAudioFrame::xingQualityIndicator ( ) const
inline

Returns the Xing quality indicator if known; otherwise returns 0.

Definition at line 234 of file mpegaudioframe.h.


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