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);
23 byte mpeg4AudioObjectId()
const;
24 byte mpeg4SamplingFrequencyIndex()
const;
25 byte mpeg4ChannelConfig()
const;
26 uint16 totalSize()
const;
27 byte headerSize()
const;
28 uint16 dataSize()
const;
29 uint16 bufferFullness()
const;
30 byte frameCount()
const;
59 return m_header1 & 0x8u;
67 return (m_header1 & 0x1u) == 0;
77 return (m_header2 >> 0x36) + 0x1u;
86 return (m_header2 >> 0x32) & 0xFu;
96 return (m_header2 >> 0x2E) & 0x7u;
104 return (m_header2 >> 0x1D) & 0x1FFFu;
128 return (m_header2 >> 0x12) & 0x7FFu;
136 return ((m_header2 >> 0x10) & 0x3u) + 0x1u;
145 return m_header2 & 0xFFFFu;
150 #endif // TAG_PARSER_ADTSFRAME_H bool isMpeg4() const
Returns whether the MPEG version is MPEG-4; otherwise the MPEG version is MPEG-2. ...
uint16 totalSize() const
Returns the size of the frame (including the header) in bytes.
uint16 bufferFullness() const
Returns the buffer fullness.
uint16 crc() const
Returns the CRC-16 checksum of the frame.
bool hasCrc() const
Returns whether a CRC-16 checksum is present ("protection absent" bit is NOT set).
Contains utility classes helping to read and write streams.
byte mpeg4AudioObjectId() const
Returns the MPEG-4 audio object type ID.
AdtsFrame()
Constructs a new frame.
bool isValid() const
Returns an indication whether the frame is valid.
byte mpeg4ChannelConfig() const
Returns the MPEG-4 channel configuration.
byte frameCount() const
Returns the number of AAC frames (RDBs) in the ADTS frame.
uint16 dataSize() const
Returns the data size (total size minus header size) in bytes.
byte mpeg4SamplingFrequencyIndex() const
Returns the MPEG-4 sample rate index.
byte headerSize() const
Retruns the header size in bytes (9 if CRC is present; otherwise 7).
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.