![]() |
TSDuck v3.46-4965
MPEG Transport Stream Toolkit
|
#include <tsAccessUnitIterator.h>
Public Member Functions | |
| AccessUnitIterator (const uint8_t *data, size_t size, uint8_t stream_type=ST_NULL, CodecType default_format=CodecType::UNDEFINED) | |
| bool | atEnd () const |
| const uint8_t * | currentAccessUnit () const |
| size_t | currentAccessUnitHeaderSize () const |
| size_t | currentAccessUnitIndex () const |
| bool | currentAccessUnitIsSEI () const |
| size_t | currentAccessUnitOffset () const |
| size_t | currentAccessUnitSize () const |
| uint8_t | currentAccessUnitType () const |
| bool | isValid () const |
| bool | next () |
| void | reset () |
| CodecType | videoFormat () const |
Iterator for common AVC/HEVC/VVC video access units.
Some H.26x video coding formats use a common access unit bitstream format. This class is an iterator over the payload of a PES packet (possibly truncated) to locate each access unit.
This class can be used with:
| ts::AccessUnitIterator::AccessUnitIterator | ( | const uint8_t * | data, |
| size_t | size, | ||
| uint8_t | stream_type = ST_NULL, | ||
| CodecType | default_format = CodecType::UNDEFINED ) |
Constructor. The current access unit is set to the first one.
| [in] | data | Address of data to explore, typically a PES packet payload or the start of one. This data area must not be modified during the lifetime of this object. |
| [in] | size | Data size in bytes. |
| [in] | stream_type | Optional stream type, as found in the PMT. Used as a hint. |
| [in] | default_format | Default encoding format if it cannot be determined from stream_type. If stream_type and default_format are both unspecified, access unit types values cannot be extracted. |
|
inline |
Check if the video format is valid.
|
inline |
Get the video format.
|
inline |
Get the address of the current access unit.
|
inline |
Get the offset of the current access unit inside the data area.
|
inline |
Get the size of the current access unit.
|
inline |
Get the size of the header of the current access unit.
|
inline |
Get the index of the current access unit.
|
inline |
Get the current access unit type.
| bool ts::AccessUnitIterator::currentAccessUnitIsSEI | ( | ) | const |
Check if the current access unit is a Supplemental Enhancement Information (SEI). The syntax of the SEI access unit is common between AVC, HEVC and VVC but the access unit type is different. This method checks if the current access unit is an SEI for the current video format.
| bool ts::AccessUnitIterator::next | ( | ) |
Iterate to the next access unit.
|
inline |
Check if the last access unit was passed.
| void ts::AccessUnitIterator::reset | ( | ) |
Reset the exploration of the data area at the beginning.