vdr-plugin-softhddevice-drm-gles 1.4.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cReassemblyBuffer Class Referenceabstract

Base class for stream reassembly buffers. More...

#include <pes.h>

Collaboration diagram for cReassemblyBuffer:
Collaboration graph
[legend]

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. More...
 
AVCodecID GetCodec ()
 

Protected Member Functions

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

Protected Attributes

AVCodecID m_codec = AV_CODEC_ID_NONE
 detected codec ID More...
 
cPtsTrackingBuffer m_buffer
 fragmentation buffer More...
 
int64_t m_lastPoppedPts = AV_NOPTS_VALUE
 PTS of the last popped AVPacket. More...
 

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 121 of file pes.h.

Constructor & Destructor Documentation

◆ cReassemblyBuffer()

cReassemblyBuffer::cReassemblyBuffer ( const char *  identifier)
inlineprotected

Definition at line 130 of file pes.h.

Member Function Documentation

◆ GetCodec()

AVCodecID cReassemblyBuffer::GetCodec ( )
inline

Definition at line 128 of file pes.h.

References m_codec.

Referenced by cSoftHdDevice::PlayAudio(), cSoftHdDevice::PlayVideoInternal(), and TEST_CASE().

◆ GetSize()

size_t cReassemblyBuffer::GetSize ( )
inline

Definition at line 126 of file pes.h.

References cPtsTrackingBuffer::GetSize(), and m_buffer.

Referenced by TEST_CASE().

◆ IsEmpty()

bool cReassemblyBuffer::IsEmpty ( )
inline

Definition at line 125 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 364 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 629 of file pes.cpp.

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

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

Member Data Documentation

◆ m_buffer

cPtsTrackingBuffer cReassemblyBuffer::m_buffer
protected

◆ m_codec

AVCodecID cReassemblyBuffer::m_codec = AV_CODEC_ID_NONE
protected

detected codec ID

Definition at line 132 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 134 of file pes.h.

Referenced by PopAvPacket(), and Reset().


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