TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::PESHandlerInterface Class Reference

Abstract interface to be notified of PES packets using a PESDemux. More...

#include <tsPESHandlerInterface.h>

Inheritance diagram for ts::PESHandlerInterface:

Public Member Functions

virtual void handleAccessUnit (PESDemux &demux, const PESPacket &packet, uint8_t nal_unit_type, size_t offset, size_t size)
 This hook is invoked when an AVC, HEVC or VVC access unit (aka "NALunit") is found.
 
virtual void handleIntraImage (PESDemux &demux, const PESPacket &packet, size_t offset)
 This hook is invoked when an intra-code image is found.
 
virtual void handleInvalidPESPacket (PESDemux &demux, const DemuxedData &data)
 This hook is invoked when an invalid PES packet is encountered.
 
virtual void handleNewAC3Attributes (PESDemux &demux, const PESPacket &packet, const AC3Attributes &attr)
 This hook is invoked when new AC-3 attributes are found in an audio PID.
 
virtual void handleNewAVCAttributes (PESDemux &demux, const PESPacket &packet, const AVCAttributes &attr)
 This hook is invoked when new AVC attributes are found in a video PID.
 
virtual void handleNewHEVCAttributes (PESDemux &demux, const PESPacket &packet, const HEVCAttributes &attr)
 This hook is invoked when new HEVC attributes are found in a video PID.
 
virtual void handleNewMPEG2AudioAttributes (PESDemux &demux, const PESPacket &packet, const MPEG2AudioAttributes &attr)
 This hook is invoked when new audio attributes are found in an audio PID.
 
virtual void handleNewMPEG2VideoAttributes (PESDemux &demux, const PESPacket &packet, const MPEG2VideoAttributes &attr)
 This hook is invoked when new video attributes are found in a video PID.
 
virtual void handlePESPacket (PESDemux &demux, const PESPacket &packet)
 This hook is invoked when a complete PES packet is available.
 
virtual void handleSEI (PESDemux &demux, const PESPacket &packet, uint32_t sei_type, size_t offset, size_t size)
 This hook is invoked when an AVC, HEVC or VVC SEI (Supplemental Enhancement Information) is found.
 
virtual void handleVideoStartCode (PESDemux &demux, const PESPacket &packet, uint8_t start_code, size_t offset, size_t size)
 This hook is invoked when a video start code is encountered.
 

Detailed Description

Abstract interface to be notified of PES packets using a PESDemux.

All hooks are optional, ie. they have an empty default implementation.

Member Function Documentation

◆ handlePESPacket()

virtual void ts::PESHandlerInterface::handlePESPacket ( PESDemux demux,
const PESPacket packet 
)
virtual

This hook is invoked when a complete PES packet is available.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.

◆ handleInvalidPESPacket()

virtual void ts::PESHandlerInterface::handleInvalidPESPacket ( PESDemux demux,
const DemuxedData data 
)
virtual

This hook is invoked when an invalid PES packet is encountered.

Parameters
[in,out]demuxA reference to the PES demux.
[in]dataRaw elementary stream data between two PUSI, not recognized as a valid PES packet.

◆ handleVideoStartCode()

virtual void ts::PESHandlerInterface::handleVideoStartCode ( PESDemux demux,
const PESPacket packet,
uint8_t  start_code,
size_t  offset,
size_t  size 
)
virtual

This hook is invoked when a video start code is encountered.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]start_codeThe XX in start code (00 00 01 xx).
[in]offsetOffset of the start code (00 00 01 xx) in the PES packet payload
[in]sizeSize of the video payload (up to next start code).

◆ handleNewMPEG2VideoAttributes()

virtual void ts::PESHandlerInterface::handleNewMPEG2VideoAttributes ( PESDemux demux,
const PESPacket packet,
const MPEG2VideoAttributes attr 
)
virtual

This hook is invoked when new video attributes are found in a video PID.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]attrVideo attributes.

◆ handleAccessUnit()

virtual void ts::PESHandlerInterface::handleAccessUnit ( PESDemux demux,
const PESPacket packet,
uint8_t  nal_unit_type,
size_t  offset,
size_t  size 
)
virtual

This hook is invoked when an AVC, HEVC or VVC access unit (aka "NALunit") is found.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]nal_unit_typeNALunit type.
[in]offsetOffset of the start code (00 00 01 xx) in the PES packet payload.
[in]sizeSize of the video payload (up to next start code).

◆ handleSEI()

virtual void ts::PESHandlerInterface::handleSEI ( PESDemux demux,
const PESPacket packet,
uint32_t  sei_type,
size_t  offset,
size_t  size 
)
virtual

This hook is invoked when an AVC, HEVC or VVC SEI (Supplemental Enhancement Information) is found.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]sei_typeSEI type.
[in]offsetOffset of the SEI payload in the PES packet payload.
[in]sizeSize of the SEI payload.

◆ handleNewAVCAttributes()

virtual void ts::PESHandlerInterface::handleNewAVCAttributes ( PESDemux demux,
const PESPacket packet,
const AVCAttributes attr 
)
virtual

This hook is invoked when new AVC attributes are found in a video PID.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]attrVideo attributes.

◆ handleNewHEVCAttributes()

virtual void ts::PESHandlerInterface::handleNewHEVCAttributes ( PESDemux demux,
const PESPacket packet,
const HEVCAttributes attr 
)
virtual

This hook is invoked when new HEVC attributes are found in a video PID.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]attrVideo attributes.

◆ handleIntraImage()

virtual void ts::PESHandlerInterface::handleIntraImage ( PESDemux demux,
const PESPacket packet,
size_t  offset 
)
virtual

This hook is invoked when an intra-code image is found.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]offsetOffset in the PES packet payload where the image is found. This is informational only, the exact semantics depends on the video codec.

◆ handleNewMPEG2AudioAttributes()

virtual void ts::PESHandlerInterface::handleNewMPEG2AudioAttributes ( PESDemux demux,
const PESPacket packet,
const MPEG2AudioAttributes attr 
)
virtual

This hook is invoked when new audio attributes are found in an audio PID.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]attrAudio attributes.

◆ handleNewAC3Attributes()

virtual void ts::PESHandlerInterface::handleNewAC3Attributes ( PESDemux demux,
const PESPacket packet,
const AC3Attributes attr 
)
virtual

This hook is invoked when new AC-3 attributes are found in an audio PID.

Parameters
[in,out]demuxA reference to the PES demux.
[in]packetThe demultiplexed PES packet.
[in]attrAudio attributes.

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