Tag Parser
9.1.1
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 (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... | |
The MpegAudioFrame class is used to parse MPEG audio frames.
Definition at line 36 of file mpegaudioframe.h.
|
constexpr |
Constructs a new frame.
Definition at line 79 of file mpegaudioframe.h.
|
inline |
Returns the bitrate of the frame if known; otherwise returns 0.
Definition at line 108 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 |
Returns an indication whether the frame is copyrighted.
Definition at line 132 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the frame labeled as original.
Definition at line 140 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the frame is protected by CRC.
Definition at line 100 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the frame is valid.
Definition at line 92 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing bytes field is present.
Definition at line 182 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing frame field is present.
Definition at line 174 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether a Xing header is present.
Definition at line 158 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing quality indicator field is present.
Definition at line 198 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing TOC is present.
Definition at line 190 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 |
Returns the padding size if known; otherwise returns 0.
Definition at line 120 of file mpegaudioframe.h.
void TagParser::MpegAudioFrame::parseHeader | ( | CppUtilities::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.
std::uint32_t TagParser::MpegAudioFrame::sampleCount | ( | ) | const |
Returns the sample count if known; otherwise returns 0.
Definition at line 173 of file mpegaudioframe.cpp.
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.
std::uint32_t TagParser::MpegAudioFrame::size | ( | ) | const |
Returns the size if known; otherwise retruns 0.
Definition at line 196 of file mpegaudioframe.cpp.
|
constexpr |
Returns the Xing bytes field if known; otherwise returns 0.
Definition at line 214 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing frame count is present.
Definition at line 206 of file mpegaudioframe.h.
|
constexpr |
Returns the Xing header flags.
Definition at line 166 of file mpegaudioframe.h.
|
constexpr |
Returns the Xing quality indicator if known; otherwise returns 0.
Definition at line 222 of file mpegaudioframe.h.