1 #ifndef TAG_PARSER_ADTSFRAME_H 2 #define TAG_PARSER_ADTSFRAME_H 6 #include <c++utilities/conversion/types.h> 18 void parseHeader(IoUtilities::BinaryReader &reader);
20 constexpr
bool isValid()
const;
21 constexpr
bool isMpeg4()
const;
22 constexpr
bool hasCrc()
const;
23 constexpr byte mpeg4AudioObjectId()
const;
24 constexpr byte mpeg4SamplingFrequencyIndex()
const;
25 constexpr byte mpeg4ChannelConfig()
const;
26 constexpr uint16 totalSize()
const;
27 constexpr byte headerSize()
const;
28 constexpr uint16 dataSize()
const;
29 constexpr uint16 bufferFullness()
const;
30 constexpr byte frameCount()
const;
31 constexpr uint16 crc()
const;
60 return m_header1 & 0x8u;
68 return (m_header1 & 0x1u) == 0;
78 return (m_header2 >> 0x36) + 0x1u;
87 return (m_header2 >> 0x32) & 0xFu;
97 return (m_header2 >> 0x2E) & 0x7u;
105 return (m_header2 >> 0x1D) & 0x1FFFu;
129 return (m_header2 >> 0x12) & 0x7FFu;
137 return ((m_header2 >> 0x10) & 0x3u) + 0x1u;
146 return m_header2 & 0xFFFFu;
151 #endif // TAG_PARSER_ADTSFRAME_H constexpr AdtsFrame()
Constructs a new frame.
constexpr byte frameCount() const
Returns the number of AAC frames (RDBs) in the ADTS frame.
constexpr bool isMpeg4() const
Returns whether the MPEG version is MPEG-4; otherwise the MPEG version is MPEG-2. ...
constexpr uint16 dataSize() const
Returns the data size (total size minus header size) in bytes.
constexpr uint16 crc() const
Returns the CRC-16 checksum of the frame.
constexpr uint16 totalSize() const
Returns the size of the frame (including the header) in bytes.
constexpr byte mpeg4AudioObjectId() const
Returns the MPEG-4 audio object type ID.
The AdtsFrame class is used to parse "Audio Data Transport Stream" frames.
constexpr uint16 bufferFullness() const
Returns the buffer fullness.
Contains utility classes helping to read and write streams.
constexpr bool isValid() const
Returns an indication whether the frame is valid.
constexpr byte headerSize() const
Retruns the header size in bytes (9 if CRC is present; otherwise 7).
constexpr byte mpeg4SamplingFrequencyIndex() const
Returns the MPEG-4 sample rate index.
constexpr byte mpeg4ChannelConfig() const
Returns the MPEG-4 channel configuration.
Contains all classes and functions of the TagInfo library.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
constexpr bool hasCrc() const
Returns whether a CRC-16 checksum is present ("protection absent" bit is NOT set).