vdr-plugin-softhddevice-drm-gles 1.6.2
cPes Class Referenceabstract

PES Packet Parser. More...

#include <pes.h>

Public Member Functions

 cPes (const uint8_t *, int)
 Create a PES packet parser.
 
bool IsValid (void)
 Check if the PES packet is valid.
 
bool HasPts (void)
 Check if the PES packet contains a Presentation Time Stamp (PTS)
 
int64_t GetPts (void)
 Get the Presentation Time Stamp (PTS) from the PES header.
 
const uint8_tGetPayload (void)
 Get a pointer to the PES payload data.
 
int GetPayloadSize (void)
 Get the size of the PES payload.
 
int GetPacketLength (void)
 Get the total length of the PES packet.
 
uint8_t GetStreamId (void)
 

Protected Member Functions

virtual bool IsStreamIdValid (void)=0
 
void Init (void)
 Initialize and validate the PES packet.
 
bool IsHeaderValid (void)
 Check if the PES header is valid.
 

Protected Attributes

bool m_valid = false
 flag indicating if the PES packet is valid
 
const uint8_tm_data
 pointer to the raw PES packet data
 
int m_size
 size of the PES packet
 

Static Protected Attributes

static constexpr uint32_t PES_PACKET_START_CODE_PREFIX = 0x00'0001
 
static constexpr uint32_t PES_PACKET_START_CODE_PREFIX_LEN = 3
 

Detailed Description

PES Packet Parser.

This class parses PES (Packetized Elementary Stream) packets to extract header information, PTS, and payload data.

Definition at line 33 of file pes.h.

Member Function Documentation

◆ GetStreamId()

uint8_t cPes::GetStreamId ( void  )
inline

Definition at line 42 of file pes.h.

References m_data.

Referenced by Init(), cPesAudio::IsAudioStreamId(), cPesAudio::IsPrivateStreamId(), and cPesVideo::IsStreamIdValid().

◆ IsStreamIdValid()

virtual bool cPes::IsStreamIdValid ( void  )
protectedpure virtual

Implemented in cPesVideo, and cPesAudio.

Referenced by Init().

Member Data Documentation

◆ m_data

const uint8_t* cPes::m_data
protected

pointer to the raw PES packet data

Definition at line 50 of file pes.h.

Referenced by GetPacketLength(), GetPayload(), GetPayloadSize(), GetPts(), GetStreamId(), HasPts(), Init(), and IsHeaderValid().

◆ m_size

int cPes::m_size
protected

size of the PES packet

Definition at line 51 of file pes.h.

Referenced by GetPacketLength(), GetPayloadSize(), Init(), and IsHeaderValid().

◆ m_valid

bool cPes::m_valid = false
protected

flag indicating if the PES packet is valid

Definition at line 49 of file pes.h.

Referenced by Init(), and IsValid().

◆ PES_PACKET_START_CODE_PREFIX

constexpr uint32_t cPes::PES_PACKET_START_CODE_PREFIX = 0x00'0001
staticconstexprprotected

Definition at line 55 of file pes.h.

Referenced by IsHeaderValid().

◆ PES_PACKET_START_CODE_PREFIX_LEN

constexpr uint32_t cPes::PES_PACKET_START_CODE_PREFIX_LEN = 3
staticconstexprprotected

Definition at line 56 of file pes.h.


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