![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsAVCParser.h>
Public Member Functions | |
| AVCParser (const void *data, size_t size_in_bytes) | |
| bool | byteAligned () const |
| bool | endOfStream () const |
| template<typename INT> requires std::signed_integral<INT> | |
| bool | i (INT &val, size_t n) |
| template<typename INT> requires std::integral<INT> | |
| bool | nextBits (INT &val, size_t n) |
| bool | rbspTrailingBits () |
| template<typename INT> requires std::integral<INT> | |
| bool | readBits (INT &val, size_t n) |
| size_t | remainingBits () const |
| size_t | remainingBytes () const |
| void | reset (const void *data, size_t size_in_bytes) |
| void | reset (size_t byte_offset=0, size_t bit_offset=0) |
| template<typename INT> requires std::signed_integral<INT> | |
| bool | se (INT &val) |
| template<typename INT> requires std::unsigned_integral<INT> | |
| bool | u (INT &val, size_t n) |
| template<typename INT> requires std::unsigned_integral<INT> | |
| bool | ue (INT &val) |
Parser for Advanced Video Coding data.
Originally defined for AVC, it is now used in:
The naming of methods such as readBits(), i(), u(), etc. is directly transposed from ISO/IEC 14496-10, ITU-T Rec. H.264.
| ts::AVCParser::AVCParser | ( | const void * | data, |
| size_t | size_in_bytes ) |
Constructor.
| [in] | data | Address of a memory area to parse. It must remain valid as long as the AVCParser object is used. |
| [in] | size_in_bytes | Size in bytes of the memory area to parse. |
| void ts::AVCParser::reset | ( | const void * | data, |
| size_t | size_in_bytes ) |
Reset with a new memory area.
| [in] | data | Address of a memory area to parse. It must remain valid as long as the AVCParser object is used. |
| [in] | size_in_bytes | Size in bytes of the memory area to parse. |
| void ts::AVCParser::reset | ( | size_t | byte_offset = 0, |
| size_t | bit_offset = 0 ) |
Reset parsing at the specified point.
| [in] | byte_offset | Offset of first byte to analyze. |
| [in] | bit_offset | Offset of first bit in first byte. The bit offset zero is the most significant bit. |
| size_t ts::AVCParser::remainingBytes | ( | ) | const |
Get number of remaining bytes (rounded down). This is the remaining bytes in the input raw binary data. The remaining number of bytes to read can be lower, especially in case of "start code emulation prevention".
| size_t ts::AVCParser::remainingBits | ( | ) | const |
Get number of remaining bits. This is the remaining bits in the input raw binary data. The remaining number of bits to read can be lower, especially in case of "start code emulation prevention".
|
inline |
Check end of stream.
|
inline |
Check if the current bit pointer is on a byte boundary.
| bool ts::AVCParser::rbspTrailingBits | ( | ) |
Skip an rbsp_trailing_bits() as defined by ISO/EIC 14496-10 7.3.2.11.
| bool ts::AVCParser::nextBits | ( | INT & | val, |
| size_t | n ) |
Provide the next n bits without advancing the bitstream pointer.
| INT | An integer type for the returned data. |
| [out] | val | Returned integer value. |
| [in] | n | Number of bits to read. |
| bool ts::AVCParser::readBits | ( | INT & | val, |
| size_t | n ) |
Read the next n bits and advance the bitstream pointer.
| INT | An integer type for the returned data. |
| [out] | val | Returned integer value. |
| [in] | n | Number of bits to read. |
|
inline |
Read the next unsigned integer using n bits and advance the bitstream pointer.
| INT | An integer type for the returned data. |
| [out] | val | Returned integer value. |
| [in] | n | Number of bits to read. |
|
inline |
Read the next signed integer using n bits and advance the bitstream pointer.
| INT | An integer type for the returned data. |
| [out] | val | Returned integer value. |
| [in] | n | Number of bits to read. |
|
inline |
Read the next Exp-Golomb-coded unsigned integer and advance the bitstream pointer.
| INT | An integer type for the returned data. |
| [out] | val | Returned integer value. |
Read the next Exp-Golomb-coded signed integer and advance the bitstream pointer.
| INT | An integer type for the returned data. |
| [out] | val | Returned integer value. |