QtlMovie 1.12 (A specialized FFmpeg front-end)
QtsPesDemux Class Reference

This class extracts PES packets from TS packets. More...

Inheritance diagram for QtsPesDemux:
QtsDemux QtsTeletextDemux

Classes

struct  PidContext
 This internal structure contains the analysis context for one PID. More...
 

Public Member Functions

 QtsPesDemux (QtsPesHandlerInterface *handler=0, const QtsPidSet &pidFilter=QtsAllPids)
 Constructor. More...
 
virtual void reset () Q_DECL_OVERRIDE
 Reset the analysis context (partially built PES packets). More...
 
virtual void resetPid (QtsPid pid) Q_DECL_OVERRIDE
 Reset the analysis context for one single PID. More...
 
void setPesHandler (QtsPesHandlerInterface *handler)
 Set the PES packet handler. More...
 
- Public Member Functions inherited from QtsDemux
 QtsDemux (const QtsPidSet &pidFilter=QtsAllPids)
 Constructor. More...
 
virtual ~QtsDemux ()
 Virtual destructor. More...
 
virtual void addPid (QtsPid pid)
 Add a PID to filter. More...
 
void feedPacket (const QtsTsPacket &packet)
 Feed the demux with a TS packet. More...
 
int filteredPidCount () const
 Get the number of PID's which are filtered by the demux. More...
 
qint64 lastPcr () const
 Get the last PCR found in the stream. More...
 
QtsPacketCounter packetCount () const
 Get the number of process TS packets. More...
 
virtual void removePid (QtsPid pid)
 Remove a PID to filter. More...
 
void resetPacketCount ()
 Reset the number of process TS packets. More...
 
virtual void setPidFilter (const QtsPidSet &pidFilter)
 Set the list of PID's to filter. More...
 

Protected Member Functions

virtual void handlePesPacket (const QtsPesPacket &packet)
 This hook is invoked when a complete PES packet is available. More...
 

Private Types

typedef QMap< QtsPid, PidContextPidContextMap
 Map of PID analysis contexts, indexed by PID value. More...
 

Private Member Functions

 QtsPesDemux () Q_DECL_EQ_DELETE
 
void processPesPacket (QtsPid pid, PidContext &pc)
 Process a complete PES packet. More...
 
virtual void processTsPacket (const QtsTsPacket &packet) Q_DECL_OVERRIDE
 Feed the demux with a TS packet (PID already filtered). More...
 

Private Attributes

bool _inHandler
 True when in the context of a handler. More...
 
QtsPesHandlerInterface_pesHandler
 User handler. More...
 
QtsPid _pidInHandler
 PID which is currently processed by handler. More...
 
PidContextMap _pids
 Map of PID analysis contexts. More...
 
bool _resetPending
 Delayed reset(). More...
 

Detailed Description

This class extracts PES packets from TS packets.

Member Typedef Documentation

◆ PidContextMap

Map of PID analysis contexts, indexed by PID value.

Constructor & Destructor Documentation

◆ QtsPesDemux() [1/2]

QtsPesDemux::QtsPesDemux ( QtsPesHandlerInterface handler = 0,
const QtsPidSet pidFilter = QtsAllPids 
)
explicit

Constructor.

Parameters
[in]handlerUser handler for PES packet notification.
[in]pidFilterSet of PID's to filter.

◆ QtsPesDemux() [2/2]

QtsPesDemux::QtsPesDemux ( )
private

Member Function Documentation

◆ setPesHandler()

void QtsPesDemux::setPesHandler ( QtsPesHandlerInterface handler)
inline

Set the PES packet handler.

Parameters
[in]handlerThe PES packet handler.

◆ reset()

void QtsPesDemux::reset ( )
virtual

Reset the analysis context (partially built PES packets).

Useful when the transport stream changes. The PID filter and the handlers are not modified.

Reimplemented from QtsDemux.

Reimplemented in QtsTeletextDemux.

◆ resetPid()

void QtsPesDemux::resetPid ( QtsPid  pid)
virtual

Reset the analysis context for one single PID.

Parameters
[in]pidPID to reset.

Reimplemented from QtsDemux.

Reimplemented in QtsTeletextDemux.

◆ handlePesPacket()

void QtsPesDemux::handlePesPacket ( const QtsPesPacket packet)
protectedvirtual

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

Can be overloaded by subclasses to add intermediate processing.

Parameters
[in]packetThe PES packet.

Reimplemented in QtsTeletextDemux.

◆ processTsPacket()

void QtsPesDemux::processTsPacket ( const QtsTsPacket packet)
privatevirtual

Feed the demux with a TS packet (PID already filtered).

Parameters
[in]packetThe TS packet to process.

Implements QtsDemux.

◆ processPesPacket()

void QtsPesDemux::processPesPacket ( QtsPid  pid,
PidContext pc 
)
private

Process a complete PES packet.

Parameters
[in]pidThe source PID.
[in,out]pcThe PID analysis context.

Member Data Documentation

◆ _pesHandler

QtsPesHandlerInterface* QtsPesDemux::_pesHandler
private

User handler.

◆ _pids

PidContextMap QtsPesDemux::_pids
private

Map of PID analysis contexts.

◆ _inHandler

bool QtsPesDemux::_inHandler
private

True when in the context of a handler.

◆ _pidInHandler

QtsPid QtsPesDemux::_pidInHandler
private

PID which is currently processed by handler.

◆ _resetPending

bool QtsPesDemux::_resetPending
private

Delayed reset().


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