vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
cReassemblyBuffer Class Referenceabstract

Base class for stream reassembly buffers. More...

#include <pes.h>

Public Member Functions

virtual void Push (const uint8_t *data, int size, int64_t pts)
 
virtual AVPacket * PopAvPacket ()=0
 
bool IsEmpty ()
 
size_t GetSize ()
 
void Reset ()
 Reset the reassembly buffer.
 
AVCodecID GetCodec ()
 

Protected Member Functions

 cReassemblyBuffer (const char *identifier)
 
AVPacket * PopAvPacket (int)
 Pop an AVPacket from the reassembly buffer.
 

Protected Attributes

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.
 

Detailed Description

Base class for stream reassembly buffers.

Reassembles fragmented elementary streams into complete AVPackets. Handles codec detection and PTS tracking across fragments.

Definition at line 119 of file pes.h.

Constructor & Destructor Documentation

◆ cReassemblyBuffer()

cReassemblyBuffer::cReassemblyBuffer ( const char *  identifier)
inlineprotected

Definition at line 128 of file pes.h.

Member Function Documentation

◆ GetCodec()

AVCodecID cReassemblyBuffer::GetCodec ( )
inline

◆ GetSize()

size_t cReassemblyBuffer::GetSize ( )
inline

Definition at line 124 of file pes.h.

References cPtsTrackingBuffer::GetSize(), and m_buffer.

Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().

◆ IsEmpty()

bool cReassemblyBuffer::IsEmpty ( )
inline

Definition at line 123 of file pes.h.

References cPtsTrackingBuffer::GetSize(), and m_buffer.

Referenced by cSoftHdDevice::PlayVideoInternal().

◆ PopAvPacket() [1/2]

virtual AVPacket * cReassemblyBuffer::PopAvPacket ( )
pure virtual

◆ PopAvPacket() [2/2]

AVPacket * cReassemblyBuffer::PopAvPacket ( int  size)
protected

Pop an AVPacket from the reassembly buffer.

Creates an AVPacket containing the specified amount of data from the buffer.

Parameters
sizeNumber of bytes to pop from the buffer
Returns
Allocated AVPacket with data, or nullptr if size is 0

Definition at line 351 of file pes.cpp.

References AV_NOPTS_VALUE, cPtsTrackingBuffer::Erase(), cPtsTrackingBuffer::GetPts(), LOGFATAL, m_buffer, m_lastPoppedPts, and cPtsTrackingBuffer::Peek().

◆ Push()

virtual void cReassemblyBuffer::Push ( const uint8_t *  data,
int  size,
int64_t  pts 
)
inlinevirtual

◆ Reset()

void cReassemblyBuffer::Reset ( )

Reset the reassembly buffer.

Clears all buffered data, PTS tracking, and resets codec detection state.

Definition at line 616 of file pes.cpp.

References AV_NOPTS_VALUE, m_buffer, m_codec, m_lastPoppedPts, and cPtsTrackingBuffer::Reset().

Referenced by cSoftHdDevice::Clear(), cSoftHdDevice::ClearAudio(), cSoftHdDevice::OnEnteringState(), cSoftHdDevice::PlayAudio(), cSoftHdDevice::PlayVideoInternal(), and cSoftHdDevice::ResetPipStream().

Member Data Documentation

◆ m_buffer

◆ m_codec

AVCodecID cReassemblyBuffer::m_codec = AV_CODEC_ID_NONE
protected

detected codec ID

Definition at line 130 of file pes.h.

Referenced by GetCodec(), cReassemblyBufferVideo::ParseCodecHeader(), cReassemblyBufferAudio::PopAvPacket(), and Reset().

◆ m_lastPoppedPts

int64_t cReassemblyBuffer::m_lastPoppedPts = AV_NOPTS_VALUE
protected

PTS of the last popped AVPacket.

Definition at line 132 of file pes.h.

Referenced by PopAvPacket(), and Reset().


The documentation for this class was generated from the following files: