Tag Parser
8.2.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
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 (IoUtilities::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... | |
uint16 | 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... | |
constexpr 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... | |
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... | |
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... | |
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 uint32 | xingFrameCount () const |
Returns an indication whether the Xing frame count is present. More... | |
constexpr uint32 | xingBytesfield () const |
Returns the Xing bytes field if known; otherwise returns 0. More... | |
constexpr uint32 | xingQualityIndicator () const |
Returns the Xing quality indicator if known; otherwise returns 0. More... | |
The MpegAudioFrame class is used to parse MPEG audio frames.
Definition at line 37 of file mpegaudioframe.h.
constexpr TagParser::MpegAudioFrame::MpegAudioFrame | ( | ) |
Constructs a new frame.
Definition at line 80 of file mpegaudioframe.h.
|
inline |
Returns the bitrate of the frame if known; otherwise returns 0.
Definition at line 109 of file mpegaudioframe.h.
MpegChannelMode TagParser::MpegAudioFrame::channelMode | ( | ) | const |
Returns the channel mode if known; otherwise returns MpegChannelMode::Unspecifed.
Definition at line 152 of file mpegaudioframe.cpp.
constexpr bool TagParser::MpegAudioFrame::hasCopyright | ( | ) | const |
Returns an indication whether the frame is copyrighted.
Definition at line 133 of file mpegaudioframe.h.
constexpr bool TagParser::MpegAudioFrame::isOriginal | ( | ) | const |
Returns an indication whether the frame labeled as original.
Definition at line 141 of file mpegaudioframe.h.
constexpr bool TagParser::MpegAudioFrame::isProtectedByCrc | ( | ) | const |
Returns an indication whether the frame is protected by CRC.
Definition at line 101 of file mpegaudioframe.h.
constexpr bool TagParser::MpegAudioFrame::isValid | ( | ) | const |
Returns an indication whether the frame is valid.
Definition at line 93 of file mpegaudioframe.h.
constexpr bool TagParser::MpegAudioFrame::isXingBytesfieldPresent | ( | ) | const |
Returns an indication whether the Xing bytes field is present.
Definition at line 183 of file mpegaudioframe.h.
constexpr bool TagParser::MpegAudioFrame::isXingFramefieldPresent | ( | ) | const |
Returns an indication whether the Xing frame field is present.
Definition at line 175 of file mpegaudioframe.h.
constexpr bool TagParser::MpegAudioFrame::isXingHeaderAvailable | ( | ) | const |
Returns an indication whether a Xing header is present.
Definition at line 159 of file mpegaudioframe.h.
constexpr bool TagParser::MpegAudioFrame::isXingQualityIndicatorFieldPresent | ( | ) | const |
Returns an indication whether the Xing quality indicator field is present.
Definition at line 199 of file mpegaudioframe.h.
constexpr bool TagParser::MpegAudioFrame::isXingTocFieldPresent | ( | ) | const |
Returns an indication whether the Xing TOC is present.
Definition at line 191 of file mpegaudioframe.h.
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.
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.
constexpr uint32 TagParser::MpegAudioFrame::paddingSize | ( | ) | const |
Returns the padding size if known; otherwise returns 0.
Definition at line 121 of file mpegaudioframe.h.
void TagParser::MpegAudioFrame::parseHeader | ( | IoUtilities::BinaryReader & | reader, |
Diagnostics & | diag | ||
) |
Parses the header read using the specified reader.
Throws | InvalidDataException if the data read from the stream is no valid frame header. |
Definition at line 47 of file mpegaudioframe.cpp.
uint32 TagParser::MpegAudioFrame::sampleCount | ( | ) | const |
Returns the sample count if known; otherwise returns 0.
Definition at line 173 of file mpegaudioframe.cpp.
uint32 TagParser::MpegAudioFrame::samplingFrequency | ( | ) | const |
Returns the sampeling frequency of the frame if known; otherwise returns 0.
Definition at line 110 of file mpegaudioframe.cpp.
uint32 TagParser::MpegAudioFrame::size | ( | ) | const |
Returns the size if known; otherwise retruns 0.
Definition at line 196 of file mpegaudioframe.cpp.
constexpr uint32 TagParser::MpegAudioFrame::xingBytesfield | ( | ) | const |
Returns the Xing bytes field if known; otherwise returns 0.
Definition at line 215 of file mpegaudioframe.h.
constexpr uint32 TagParser::MpegAudioFrame::xingFrameCount | ( | ) | const |
Returns an indication whether the Xing frame count is present.
Definition at line 207 of file mpegaudioframe.h.
constexpr XingHeaderFlags TagParser::MpegAudioFrame::xingHeaderFlags | ( | ) | const |
Returns the Xing header flags.
Definition at line 167 of file mpegaudioframe.h.
constexpr uint32 TagParser::MpegAudioFrame::xingQualityIndicator | ( | ) | const |
Returns the Xing quality indicator if known; otherwise returns 0.
Definition at line 223 of file mpegaudioframe.h.