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

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

#include <mpegaudioframe.h>

Public Member Functions

constexpr MpegAudioFrame ()
 Constructs a new frame. More...
 
void parseHeader (CppUtilities::BinaryReader &reader, Diagnostics &diag)
 Parses the header read using the specified reader. More...
 
constexpr 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...
 
constexpr bool isProtectedByCrc () const
 Returns an indication whether the frame is protected by CRC. More...
 
std::uint16_t bitrate () const
 Returns the bitrate of the frame if known; otherwise returns 0. More...
 
std::uint32_t samplingFrequency () const
 Returns the sampeling frequency of the frame if known; otherwise returns 0. More...
 
constexpr std::uint32_t 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...
 
constexpr bool hasCopyright () const
 Returns an indication whether the frame is copyrighted. More...
 
constexpr bool isOriginal () const
 Returns an indication whether the frame labeled as original. More...
 
std::uint32_t sampleCount () const
 Returns the sample count if known; otherwise returns 0. More...
 
std::uint32_t size () const
 Returns the size if known; otherwise retruns 0. More...
 
constexpr bool isXingHeaderAvailable () const
 Returns an indication whether a Xing header is present. More...
 
constexpr XingHeaderFlags xingHeaderFlags () const
 Returns the Xing header flags. More...
 
constexpr bool isXingFramefieldPresent () const
 Returns an indication whether the Xing frame field is present. More...
 
constexpr bool isXingBytesfieldPresent () const
 Returns an indication whether the Xing bytes field is present. More...
 
constexpr bool isXingTocFieldPresent () const
 Returns an indication whether the Xing TOC is present. More...
 
constexpr bool isXingQualityIndicatorFieldPresent () const
 Returns an indication whether the Xing quality indicator field is present. More...
 
constexpr std::uint32_t xingFrameCount () const
 Returns an indication whether the Xing frame count is present. More...
 
constexpr std::uint32_t xingBytesfield () const
 Returns the Xing bytes field if known; otherwise returns 0. More...
 
constexpr std::uint32_t 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 36 of file mpegaudioframe.h.

Constructor & Destructor Documentation

◆ MpegAudioFrame()

constexpr TagParser::MpegAudioFrame::MpegAudioFrame ( )
constexpr

Constructs a new frame.

Definition at line 79 of file mpegaudioframe.h.

Member Function Documentation

◆ bitrate()

std::uint16_t TagParser::MpegAudioFrame::bitrate ( ) const
inline

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

Definition at line 108 of file mpegaudioframe.h.

◆ channelMode()

MpegChannelMode TagParser::MpegAudioFrame::channelMode ( ) const

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

Definition at line 152 of file mpegaudioframe.cpp.

◆ hasCopyright()

constexpr bool TagParser::MpegAudioFrame::hasCopyright ( ) const
constexpr

Returns an indication whether the frame is copyrighted.

Definition at line 132 of file mpegaudioframe.h.

◆ isOriginal()

constexpr bool TagParser::MpegAudioFrame::isOriginal ( ) const
constexpr

Returns an indication whether the frame labeled as original.

Definition at line 140 of file mpegaudioframe.h.

◆ isProtectedByCrc()

constexpr bool TagParser::MpegAudioFrame::isProtectedByCrc ( ) const
constexpr

Returns an indication whether the frame is protected by CRC.

Definition at line 100 of file mpegaudioframe.h.

◆ isValid()

constexpr bool TagParser::MpegAudioFrame::isValid ( ) const
constexpr

Returns an indication whether the frame is valid.

Definition at line 92 of file mpegaudioframe.h.

◆ isXingBytesfieldPresent()

constexpr bool TagParser::MpegAudioFrame::isXingBytesfieldPresent ( ) const
constexpr

Returns an indication whether the Xing bytes field is present.

Definition at line 182 of file mpegaudioframe.h.

◆ isXingFramefieldPresent()

constexpr bool TagParser::MpegAudioFrame::isXingFramefieldPresent ( ) const
constexpr

Returns an indication whether the Xing frame field is present.

Definition at line 174 of file mpegaudioframe.h.

◆ isXingHeaderAvailable()

constexpr bool TagParser::MpegAudioFrame::isXingHeaderAvailable ( ) const
constexpr

Returns an indication whether a Xing header is present.

Definition at line 158 of file mpegaudioframe.h.

◆ isXingQualityIndicatorFieldPresent()

constexpr bool TagParser::MpegAudioFrame::isXingQualityIndicatorFieldPresent ( ) const
constexpr

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

Definition at line 198 of file mpegaudioframe.h.

◆ isXingTocFieldPresent()

constexpr bool TagParser::MpegAudioFrame::isXingTocFieldPresent ( ) const
constexpr

Returns an indication whether the Xing TOC is present.

Definition at line 190 of file mpegaudioframe.h.

◆ layer()

int TagParser::MpegAudioFrame::layer ( ) const

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

Definition at line 93 of file mpegaudioframe.cpp.

◆ mpegVersion()

double TagParser::MpegAudioFrame::mpegVersion ( ) const

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

Definition at line 76 of file mpegaudioframe.cpp.

◆ paddingSize()

constexpr std::uint32_t TagParser::MpegAudioFrame::paddingSize ( ) const
constexpr

Returns the padding size if known; otherwise returns 0.

Definition at line 120 of file mpegaudioframe.h.

◆ parseHeader()

void TagParser::MpegAudioFrame::parseHeader ( CppUtilities::BinaryReader &  reader,
Diagnostics diag 
)

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 47 of file mpegaudioframe.cpp.

◆ sampleCount()

std::uint32_t TagParser::MpegAudioFrame::sampleCount ( ) const

Returns the sample count if known; otherwise returns 0.

Definition at line 173 of file mpegaudioframe.cpp.

◆ samplingFrequency()

std::uint32_t TagParser::MpegAudioFrame::samplingFrequency ( ) const

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

Definition at line 110 of file mpegaudioframe.cpp.

◆ size()

std::uint32_t TagParser::MpegAudioFrame::size ( ) const

Returns the size if known; otherwise retruns 0.

Definition at line 196 of file mpegaudioframe.cpp.

◆ xingBytesfield()

constexpr std::uint32_t TagParser::MpegAudioFrame::xingBytesfield ( ) const
constexpr

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

Definition at line 214 of file mpegaudioframe.h.

◆ xingFrameCount()

constexpr std::uint32_t TagParser::MpegAudioFrame::xingFrameCount ( ) const
constexpr

Returns an indication whether the Xing frame count is present.

Definition at line 206 of file mpegaudioframe.h.

◆ xingHeaderFlags()

constexpr XingHeaderFlags TagParser::MpegAudioFrame::xingHeaderFlags ( ) const
constexpr

Returns the Xing header flags.

Definition at line 166 of file mpegaudioframe.h.

◆ xingQualityIndicator()

constexpr std::uint32_t TagParser::MpegAudioFrame::xingQualityIndicator ( ) const
constexpr

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

Definition at line 222 of file mpegaudioframe.h.


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