|
vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
|
Video stream reassembly buffer. More...
#include <pes.h>
Public Member Functions | |
| cReassemblyBufferVideo () | |
| AVPacket * | PopAvPacket () override |
| bool | ParseCodecHeader (const uint8_t *, int) |
| Parse video codec header to detect codec type. | |
| bool | HasLeadingZero (const uint8_t *, int) |
| Check if video data has a leading zero byte before the start code. | |
Public Member Functions inherited from cReassemblyBuffer | |
| virtual void | Push (const uint8_t *data, int size, int64_t pts) |
| bool | IsEmpty () |
| size_t | GetSize () |
| void | Reset () |
| Reset the reassembly buffer. | |
| AVCodecID | GetCodec () |
Static Private Attributes | |
| static constexpr uint32_t | VIDEO_FRAME_START_CODE = 0x00'0001 |
| static constexpr int | VIDEO_FRAME_START_CODE_LEN = 3 |
| static constexpr uint8_t | MPEG2_STREAM_TYPE = 0xB3 |
| static constexpr uint8_t | H264_STREAM_TYPE = 0x09 |
| static constexpr uint8_t | HEVC_STREAM_TYPE = 0x46 |
Additional Inherited Members | |
Protected Member Functions inherited from cReassemblyBuffer | |
| cReassemblyBuffer (const char *identifier) | |
| AVPacket * | PopAvPacket (int) |
| Pop an AVPacket from the reassembly buffer. | |
Protected Attributes inherited from cReassemblyBuffer | |
| AVCodecID | m_codec = AV_CODEC_ID_NONE |
| detected codec ID | |
| cPtsTrackingBuffer | m_buffer |
| fragmentation buffer | |
| int64_t | m_lastPoppedPts = AV_NOPTS_VALUE |
| PTS of the last popped AVPacket. | |
Video stream reassembly buffer.
Reassembles video elementary streams (MPEG2, H.264, HEVC) by detecting frame start codes and codec headers.
| bool cReassemblyBufferVideo::HasLeadingZero | ( | const uint8_t * | data, |
| int | size | ||
| ) |
Check if video data has a leading zero byte before the start code.
Some H.264/HEVC streams include a leading zero byte (0x00) before the standard start code (0x000001). This method detects that pattern.
| data | Pointer to video data |
| size | Size of the data in bytes |
Definition at line 431 of file pes.cpp.
References ReadBytes(), VIDEO_FRAME_START_CODE, and VIDEO_FRAME_START_CODE_LEN.
Referenced by ParseCodecHeader(), cSoftHdDevice::PlayVideoInternal(), and TEST_CASE().
| bool cReassemblyBufferVideo::ParseCodecHeader | ( | const uint8_t * | fragment, |
| int | size | ||
| ) |
Parse video codec header to detect codec type.
Analyzes video frame start codes and stream type bytes to identify the codec. Supports MPEG2, H.264, and HEVC video codecs.
| fragment | Pointer to video frame data |
| size | Size of the fragment in bytes |
Definition at line 398 of file pes.cpp.
References H264_STREAM_TYPE, HasLeadingZero(), HEVC_STREAM_TYPE, cReassemblyBuffer::m_codec, MPEG2_STREAM_TYPE, ReadBytes(), VIDEO_FRAME_START_CODE, and VIDEO_FRAME_START_CODE_LEN.
Referenced by cSoftHdDevice::PlayVideoInternal(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().
|
inlineoverridevirtual |
Implements cReassemblyBuffer.
Definition at line 144 of file pes.h.
References cPtsTrackingBuffer::GetSize(), cReassemblyBuffer::m_buffer, and cReassemblyBuffer::PopAvPacket().
Referenced by cSoftHdDevice::HandleStillPicture(), cSoftHdDevice::PlayVideoInternal(), and TEST_CASE().
|
staticconstexprprivate |
Definition at line 152 of file pes.h.
Referenced by ParseCodecHeader().
|
staticconstexprprivate |
Definition at line 153 of file pes.h.
Referenced by ParseCodecHeader().
|
staticconstexprprivate |
Definition at line 151 of file pes.h.
Referenced by ParseCodecHeader().
|
staticconstexprprivate |
Definition at line 148 of file pes.h.
Referenced by HasLeadingZero(), and ParseCodecHeader().
|
staticconstexprprivate |
Definition at line 149 of file pes.h.
Referenced by HasLeadingZero(), and ParseCodecHeader().