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

This class extracts PSI/SI sections and tables from TS packets. More...

Inheritance diagram for QtsSectionDemux:
QtsDemux QtsStandaloneTableDemux

Classes

struct  EtidContext
 This internal structure contains the analysis context for one TID/TIDext into one PID. More...
 
struct  PidContext
 This internal structure contains the analysis context for one PID. More...
 
struct  Status
 Demux status information. More...
 

Public Member Functions

 QtsSectionDemux (QtsTableHandlerInterface *tableHandler=0, QtsSectionHandlerInterface *sectionHandler=0, const QtsPidSet &pidFilter=QtsNoPid)
 Constructor. More...
 
void getStatus (Status &status) const
 Get the current status of the demux. More...
 
bool hasErrors () const
 Check if the demux has errors. More...
 
virtual void reset () Q_DECL_OVERRIDE
 Reset the analysis context (partially built sections and tables). More...
 
virtual void resetPid (QtsPid pid) Q_DECL_OVERRIDE
 Reset the analysis context for one single PID. More...
 
void setSectionHandler (QtsSectionHandlerInterface *handler)
 Set the section handler. More...
 
void setTableHandler (QtsTableHandlerInterface *handler)
 Set the table 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...
 

Private Types

typedef QMap< QtsExtTableId, EtidContextEtidContextMap
 Map of EtidContext index by ETID. More...
 
typedef QMap< QtsPid, PidContextPidContextMap
 Map of PidContext index by PID. More...
 

Private Member Functions

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 table/section handler. More...
 
QtsPid _pidInHandler
 PID which is currently processed by handler. More...
 
PidContextMap _pids
 State of the PID's analysis. More...
 
bool _resetPending
 Delayed reset(). More...
 
QtsSectionHandlerInterface_sectionHandler
 Handler to invoke for each section. More...
 
Status _status
 State of the demux. More...
 
QtsTableHandlerInterface_tableHandler
 Handler to invoke for each new table. More...
 

Detailed Description

This class extracts PSI/SI sections and tables from TS packets.

General notes:

  • Long sections are validated against their CRC32. Corrupted sections are not reported.
  • Sections with the 'next' indicator are ignored. Only sections with the 'current' indicator are reported.
  • Tables with long sections are reported only when a new version is available.

Member Typedef Documentation

◆ EtidContextMap

Map of EtidContext index by ETID.

◆ PidContextMap

Map of PidContext index by PID.

Constructor & Destructor Documentation

◆ QtsSectionDemux()

QtsSectionDemux::QtsSectionDemux ( QtsTableHandlerInterface tableHandler = 0,
QtsSectionHandlerInterface sectionHandler = 0,
const QtsPidSet pidFilter = QtsNoPid 
)

Constructor.

Parameters
[in]tableHandlerHandler to invoke for each new table. Default: none.
[in]sectionHandlerHandler to invoke for each section. Default: none.
[in]pidFilterSet of PID's to filter. Default: none.

Member Function Documentation

◆ setTableHandler()

void QtsSectionDemux::setTableHandler ( QtsTableHandlerInterface handler)
inline

Set the table handler.

Parameters
[in]handlerThe table handler.

◆ setSectionHandler()

void QtsSectionDemux::setSectionHandler ( QtsSectionHandlerInterface handler)
inline

Set the section handler.

Parameters
[in]handlerThe section handler.

◆ reset()

void QtsSectionDemux::reset ( )
virtual

Reset the analysis context (partially built sections and tables).

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

Reimplemented from QtsDemux.

Reimplemented in QtsStandaloneTableDemux.

◆ resetPid()

void QtsSectionDemux::resetPid ( QtsPid  pid)
virtual

Reset the analysis context for one single PID.

Parameters
[in]pidPID to reset.

Reimplemented from QtsDemux.

Reimplemented in QtsStandaloneTableDemux.

◆ getStatus()

void QtsSectionDemux::getStatus ( Status status) const
inline

Get the current status of the demux.

Parameters
[out]statusReceives the current status of the demux.

◆ hasErrors()

bool QtsSectionDemux::hasErrors ( ) const
inline

Check if the demux has errors.

Returns
True if any error was found.

◆ processTsPacket()

void QtsSectionDemux::processTsPacket ( const QtsTsPacket packet)
privatevirtual

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

Parameters
[in]packetThe TS packet to process.

Implements QtsDemux.

Member Data Documentation

◆ _tableHandler

QtsTableHandlerInterface* QtsSectionDemux::_tableHandler
private

Handler to invoke for each new table.

◆ _sectionHandler

QtsSectionHandlerInterface* QtsSectionDemux::_sectionHandler
private

Handler to invoke for each section.

◆ _pids

PidContextMap QtsSectionDemux::_pids
private

State of the PID's analysis.

◆ _status

Status QtsSectionDemux::_status
private

State of the demux.

◆ _inHandler

bool QtsSectionDemux::_inHandler
private

True when in the context of a table/section handler.

◆ _pidInHandler

QtsPid QtsSectionDemux::_pidInHandler
private

PID which is currently processed by handler.

◆ _resetPending

bool QtsSectionDemux::_resetPending
private

Delayed reset().


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