Tag Parser
8.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The AdtsFrame class is used to parse "Audio Data Transport Stream" frames. More...
#include <adtsframe.h>
Public Member Functions | |
constexpr | AdtsFrame () |
Constructs a new frame. More... | |
void | parseHeader (IoUtilities::BinaryReader &reader) |
Parses the header read using the specified reader. More... | |
constexpr bool | isValid () const |
Returns an indication whether the frame is valid. More... | |
constexpr bool | isMpeg4 () const |
Returns whether the MPEG version is MPEG-4; otherwise the MPEG version is MPEG-2. More... | |
constexpr bool | hasCrc () const |
Returns whether a CRC-16 checksum is present ("protection absent" bit is NOT set). More... | |
constexpr byte | mpeg4AudioObjectId () const |
Returns the MPEG-4 audio object type ID. More... | |
constexpr byte | mpeg4SamplingFrequencyIndex () const |
Returns the MPEG-4 sample rate index. More... | |
constexpr byte | mpeg4ChannelConfig () const |
Returns the MPEG-4 channel configuration. More... | |
constexpr uint16 | totalSize () const |
Returns the size of the frame (including the header) in bytes. More... | |
constexpr byte | headerSize () const |
Retruns the header size in bytes (9 if CRC is present; otherwise 7). More... | |
constexpr uint16 | dataSize () const |
Returns the data size (total size minus header size) in bytes. More... | |
constexpr uint16 | bufferFullness () const |
Returns the buffer fullness. More... | |
constexpr byte | frameCount () const |
Returns the number of AAC frames (RDBs) in the ADTS frame. More... | |
constexpr uint16 | crc () const |
Returns the CRC-16 checksum of the frame. More... | |
The AdtsFrame class is used to parse "Audio Data Transport Stream" frames.
Definition at line 14 of file adtsframe.h.
constexpr TagParser::AdtsFrame::AdtsFrame | ( | ) |
Constructs a new frame.
Definition at line 41 of file adtsframe.h.
constexpr uint16 TagParser::AdtsFrame::bufferFullness | ( | ) | const |
Returns the buffer fullness.
Definition at line 127 of file adtsframe.h.
constexpr uint16 TagParser::AdtsFrame::crc | ( | ) | const |
Returns the CRC-16 checksum of the frame.
Definition at line 144 of file adtsframe.h.
constexpr uint16 TagParser::AdtsFrame::dataSize | ( | ) | const |
Returns the data size (total size minus header size) in bytes.
Definition at line 119 of file adtsframe.h.
constexpr byte TagParser::AdtsFrame::frameCount | ( | ) | const |
Returns the number of AAC frames (RDBs) in the ADTS frame.
Definition at line 135 of file adtsframe.h.
constexpr bool TagParser::AdtsFrame::hasCrc | ( | ) | const |
Returns whether a CRC-16 checksum is present ("protection absent" bit is NOT set).
Definition at line 66 of file adtsframe.h.
constexpr byte TagParser::AdtsFrame::headerSize | ( | ) | const |
Retruns the header size in bytes (9 if CRC is present; otherwise 7).
Definition at line 111 of file adtsframe.h.
constexpr bool TagParser::AdtsFrame::isMpeg4 | ( | ) | const |
Returns whether the MPEG version is MPEG-4; otherwise the MPEG version is MPEG-2.
Definition at line 58 of file adtsframe.h.
constexpr bool TagParser::AdtsFrame::isValid | ( | ) | const |
Returns an indication whether the frame is valid.
Definition at line 50 of file adtsframe.h.
constexpr byte TagParser::AdtsFrame::mpeg4AudioObjectId | ( | ) | const |
Returns the MPEG-4 audio object type ID.
Definition at line 76 of file adtsframe.h.
constexpr byte TagParser::AdtsFrame::mpeg4ChannelConfig | ( | ) | const |
Returns the MPEG-4 channel configuration.
Definition at line 95 of file adtsframe.h.
constexpr byte TagParser::AdtsFrame::mpeg4SamplingFrequencyIndex | ( | ) | const |
Returns the MPEG-4 sample rate index.
Definition at line 85 of file adtsframe.h.
void TagParser::AdtsFrame::parseHeader | ( | IoUtilities::BinaryReader & | reader | ) |
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 22 of file adtsframe.cpp.
constexpr uint16 TagParser::AdtsFrame::totalSize | ( | ) | const |
Returns the size of the frame (including the header) in bytes.
Definition at line 103 of file adtsframe.h.