Tag Parser 12.4.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. | |
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. | |
The MpegAudioFrame class is used to parse MPEG audio frames.
|
constexpr |
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 164 of file mpegaudioframe.cpp.
|
constexpr |
Returns an indication whether the frame is copyrighted.
Definition at line 133 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the frame labeled as original.
Definition at line 141 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the frame is protected by CRC.
Definition at line 101 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the frame is valid.
Definition at line 93 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing bytes field is present.
Definition at line 183 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing frame field is present.
Definition at line 175 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether a Xing header is present.
Definition at line 159 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing quality indicator field is present.
Definition at line 199 of file mpegaudioframe.h.
|
constexpr |
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 105 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 88 of file mpegaudioframe.cpp.
|
constexpr |
Returns the padding size if known; otherwise returns 0.
Definition at line 121 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 49 of file mpegaudioframe.cpp.
std::uint32_t TagParser::MpegAudioFrame::sampleCount | ( | ) | const |
Returns the sample count if known; otherwise returns 0.
Definition at line 185 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 122 of file mpegaudioframe.cpp.
std::uint32_t TagParser::MpegAudioFrame::size | ( | ) | const |
Returns the size if known; otherwise returns 0.
Definition at line 208 of file mpegaudioframe.cpp.
|
constexpr |
Returns the Xing bytes field if known; otherwise returns 0.
Definition at line 215 of file mpegaudioframe.h.
|
constexpr |
Returns an indication whether the Xing frame count is present.
Definition at line 207 of file mpegaudioframe.h.
|
constexpr |
Returns the Xing header flags.
Definition at line 167 of file mpegaudioframe.h.
|
constexpr |
Returns the Xing quality indicator if known; otherwise returns 0.
Definition at line 223 of file mpegaudioframe.h.