![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsAbstractDemux.h>

Public Member Functions | |
| virtual | ~AbstractDemux () |
| virtual void | addPID (PID pid) |
| virtual void | addPIDs (const PIDSet &pids) |
| int | demuxId () const |
| DuckContext & | duck () |
| virtual void | feedPacket (const TSPacket &pkt) |
| virtual bool | isFilteredPID (PID pid) const |
| virtual size_t | pidCount () const |
| PacketCounter | processedPackets () const |
| virtual void | removePID (PID pid) |
| Report & | report () |
| virtual void | reset () |
| virtual void | resetPID (PID pid) |
| void | setDemuxId (int id) |
| virtual void | setPIDFilter (const PIDSet &pid_filter) |
| PacketCounter | totalPackets () const |
Protected Member Functions | |
| AbstractDemux (DuckContext &duck, const PIDSet &pid_filter=NoPID()) | |
| bool | afterCallingHandler (bool execute_delayed_operations=true) |
| void | beforeCallingHandler (PID pid=PID_NULL) |
| virtual void | immediateReset () |
| virtual void | immediateResetPID (PID pid) |
Abstract base class for all sorts of demux from TS packets.
The application sets a number of PID's to filter. What is extracted from those PID's and how they are reported to the application depend on the concrete demux class.
|
virtual |
Destructor.
|
explicitprotected |
Constructor for subclasses.
| [in,out] | duck | TSDuck execution context. The reference is kept inside the demux. |
| [in] | pid_filter | The initial set of PID's to demux. |
|
inline |
|
inline |
Get the associated TSDuck execution context.
|
virtual |
The following method feeds the demux with a TS packet.
| [in] | pkt | A TS packet. |
Reimplemented in ts::ContinuityAnalyzer, ts::MPEDemux, ts::PESDemux, ts::SectionDemux, ts::T2MIDemux, and ts::TimeTrackerDemux.
|
virtual |
Replace the list of PID's to filter. The method resetPID() is invoked on each removed PID.
| [in] | pid_filter | The list of PID's to filter. |
|
inlinevirtual |
|
inlinevirtual |
Add several PID's to filter.
| [in] | pids | The list of new PID's to filter. |
Reimplemented in ts::MPEDemux.
|
virtual |
Remove one PID to filter. The method resetPID() is invoked on pid.
| [in] | pid | The PID to no longer filter. |
Reimplemented in ts::MPEDemux.
|
inlinevirtual |
|
inline |
Get the current total number of TS packets which were processed by the demux.
|
inline |
Get the number of processed TS packets in filtered PIDs.
|
inlinevirtual |
|
virtual |
Reset the demux.
Useful when the transport stream changes. The PID filter and the handlers are not modified.
If invoked in an application-handler, the operation is delayed until the handler terminates. For subclass implementers, see beforeCallingHandler() and override immediateReset() instead of reset().
Reimplemented in ts::StandaloneTableDemux.
|
virtual |
Reset the demuxing context for one single PID. Forget all previous partially demuxed data on this PID.
If invoked in an application-handler, the operation is delayed until the handler terminates. For subclass implementers, see beforeCallingHandler() and override immediateResetPID() instead of resetPID().
| [in] | pid | The PID to reset. |
Reimplemented in ts::StandaloneTableDemux.
|
inline |
Set some arbitrary "demux id" value. This value is chosen and set by the application. It can be retrieved later if a table or section handler is used by several demux. The demux id is not interpreted by the demux, it is only stored for the application. The initial value of a demux id is zero.
| [in] | id | Application-defined demux id to assign. |
|
inline |
Get the "demux id" value, as previously stored by the application.
Helper for subclass, before invoking an application-defined handler.
The idea is to protect the integrity of the demux during the execution of an application-defined handler. The handler is invoked in the middle of an operation but the handler may call reset() or resetPID(). Executing the reset in the middle of an operation may be problematic. By using beforeCallingHandler() and afterCallingHandler(), all reset operations in between are delayed after the execution of the handler.
Example:
| [in] | pid | The PID for which the handler will be called. All reset operations on this PID will be delayed until afterCallingHandler(). |
|
protected |
Helper for subclass, after invoking an application-defined handler.
| [in] | execute_delayed_operations | When true (the default), execute all pending reset operations. |
|
protectedvirtual |
Reset the demux immediately.
Reimplemented in ts::ContinuityAnalyzer, ts::MPEDemux, ts::PESDemux, ts::SectionDemux, ts::T2MIDemux, ts::TeletextDemux, and ts::TimeTrackerDemux.
|
protectedvirtual |
Reset the demuxing context for one single PID immediately.
| [in] | pid | The PID to reset. |
Reimplemented in ts::ContinuityAnalyzer, ts::PESDemux, ts::SectionDemux, ts::T2MIDemux, ts::TeletextDemux, and ts::TimeTrackerDemux.