Tag Parser 12.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
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.
 
void parseHeader (CppUtilities::BinaryReader &reader, Diagnostics &diag)
 Parses the header read using the specified reader.
 
constexpr bool isValid () const
 Returns an indication whether the frame is valid.
 
double mpegVersion () const
 Returns the MPEG version if known (1.0, 2.0 or 2.5); otherwise returns 0.
 
int layer () const
 Returns the MPEG layer if known (1, 2, or 3); otherwise returns 0.
 
constexpr bool isProtectedByCrc () const
 Returns an indication whether the frame is protected by CRC.
 
std::uint16_t bitrate () const
 Returns the bitrate of the frame if known; otherwise returns 0.
 
std::uint32_t samplingFrequency () const
 Returns the sampeling frequency of the frame if known; otherwise returns 0.
 
constexpr std::uint32_t paddingSize () const
 Returns the padding size if known; otherwise returns 0.
 
MpegChannelMode channelMode () const
 Returns the channel mode if known; otherwise returns MpegChannelMode::Unspecifed.
 
constexpr bool hasCopyright () const
 Returns an indication whether the frame is copyrighted.
 
constexpr bool isOriginal () const
 Returns an indication whether the frame labeled as original.
 
std::uint32_t sampleCount () const
 Returns the sample count if known; otherwise returns 0.
 
std::uint32_t size () const
 Returns the size if known; otherwise returns 0.
 
constexpr bool isXingHeaderAvailable () const
 Returns an indication whether a Xing header is present.
 
constexpr XingHeaderFlags xingHeaderFlags () const
 Returns the Xing header flags.
 
constexpr bool isXingFramefieldPresent () const
 Returns an indication whether the Xing frame field is present.
 
constexpr bool isXingBytesfieldPresent () const
 Returns an indication whether the Xing bytes field is present.
 
constexpr bool isXingTocFieldPresent () const
 Returns an indication whether the Xing TOC is present.
 
constexpr bool isXingQualityIndicatorFieldPresent () const
 Returns an indication whether the Xing quality indicator field is present.
 
constexpr std::uint32_t xingFrameCount () const
 Returns an indication whether the Xing frame count is present.
 
constexpr std::uint32_t xingBytesfield () const
 Returns the Xing bytes field if known; otherwise returns 0.
 
constexpr std::uint32_t xingQualityIndicator () const
 Returns the Xing quality indicator if known; otherwise returns 0.
 

Detailed Description

The MpegAudioFrame class is used to parse MPEG audio frames.

Definition at line 37 of file mpegaudioframe.h.

Constructor & Destructor Documentation

◆ MpegAudioFrame()

constexpr TagParser::MpegAudioFrame::MpegAudioFrame ( )
constexpr

Constructs a new frame.

Definition at line 80 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 109 of file mpegaudioframe.h.

◆ channelMode()

MpegChannelMode TagParser::MpegAudioFrame::channelMode ( ) const

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

Definition at line 164 of file mpegaudioframe.cpp.

◆ hasCopyright()

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

Returns an indication whether the frame is copyrighted.

Definition at line 133 of file mpegaudioframe.h.

◆ isOriginal()

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

Returns an indication whether the frame labeled as original.

Definition at line 141 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 101 of file mpegaudioframe.h.

◆ isValid()

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

Returns an indication whether the frame is valid.

Definition at line 93 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 183 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 175 of file mpegaudioframe.h.

◆ isXingHeaderAvailable()

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

Returns an indication whether a Xing header is present.

Definition at line 159 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 199 of file mpegaudioframe.h.

◆ isXingTocFieldPresent()

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

Returns an indication whether the Xing TOC is present.

Definition at line 191 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 105 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 88 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 121 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 49 of file mpegaudioframe.cpp.

◆ sampleCount()

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

Returns the sample count if known; otherwise returns 0.

Definition at line 185 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 122 of file mpegaudioframe.cpp.

◆ size()

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

Returns the size if known; otherwise returns 0.

Definition at line 208 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 215 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 207 of file mpegaudioframe.h.

◆ xingHeaderFlags()

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

Returns the Xing header flags.

Definition at line 167 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 223 of file mpegaudioframe.h.


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