|
vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
|
Video Stream Reassembly Buffer. More...
#include <pes.h>
Public Member Functions | |
| cReassemblyBufferVideo (void) | |
| AVPacket * | PopAvPacket (void) 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 (void) |
| size_t | GetSize (void) |
| void | Reset (void) |
| Reset the reassembly buffer. | |
| AVCodecID | GetCodec (void) |
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.
|
inline |
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 441 of file pes.cpp.
References ReadBytes(), VIDEO_FRAME_START_CODE, and VIDEO_FRAME_START_CODE_LEN.
Referenced by ParseCodecHeader(), cSoftHdDevice::PlayVideoInternal(), and TEST_CASE().
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 407 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().
Implements cReassemblyBuffer.
Definition at line 147 of file pes.h.
References cPtsTrackingBuffer::GetSize(), cReassemblyBuffer::m_buffer, and cReassemblyBuffer::PopAvPacket().
Referenced by cSoftHdDevice::HandleStillPicture(), cSoftHdDevice::PlayVideoInternal(), and TEST_CASE().
Definition at line 155 of file pes.h.
Referenced by ParseCodecHeader().
Definition at line 156 of file pes.h.
Referenced by ParseCodecHeader().
Definition at line 154 of file pes.h.
Referenced by ParseCodecHeader().
|
staticconstexprprivate |
Definition at line 151 of file pes.h.
Referenced by HasLeadingZero(), and ParseCodecHeader().
Definition at line 152 of file pes.h.
Referenced by HasLeadingZero(), and ParseCodecHeader().