TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::TSProcessor Class Reference

#include <tsTSProcessor.h>

Inheritance diagram for ts::TSProcessor:
Collaboration diagram for ts::TSProcessor:

Public Member Functions

 TSProcessor (Report &report)
 ~TSProcessor ()
void abort ()
 delete (self)
 Explicitly free the underlying C++ object.
bool isStarted ()
 registerEventHandler (self, handler, event_code)
 Register an event handler by event code.
 registerInputEventHandler (self, handler)
 Register an event handler for all events from the input plugin.
 registerOutputEventHandler (self, handler)
 Register an event handler for all events from the output plugin.
Report & report () const
bool start (const TSProcessorArgs &args)
void waitForTermination ()

Protected Member Functions

 _getNative (self)
 Get the native object.
 _setNative (self, obj)
 Set the native object.

Detailed Description

Core of the TSP Transport Stream Processor. This class is used by the tsp utility. It can also be used in other applications to run a chain of plugins.

Constructor & Destructor Documentation

◆ TSProcessor()

ts::TSProcessor::TSProcessor ( Report & report)

Constructor.

Parameters
[in,out]reportWhere to report errors, logs, etc. This object will be used concurrently by all plugin execution threads. Consequently, it must be thread-safe. For performance reasons, it should be asynchronous (see for instance class AsyncReport).

◆ ~TSProcessor()

ts::TSProcessor::~TSProcessor ( )

Destructor. It waits for termination of the TS processing if it is running.

Member Function Documentation

◆ report()

Report & ts::TSProcessor::report ( ) const
inline

Get a reference to the report object for the TS processor.

Returns
A reference to the report object for the TS processor.

◆ start()

bool ts::TSProcessor::start ( const TSProcessorArgs & args)

Start the TS processing.

Parameters
[in]argsArguments and options.
Returns
True on success, false on failure to start.

◆ isStarted()

bool ts::TSProcessor::isStarted ( )

Check if the TS processing is started.

Returns
True if the processing is in progress, false otherwise.

◆ abort()

void ts::TSProcessor::abort ( )

Abort the processing. The method can be invoked from any thread, including an interrupt handler for instance.

◆ waitForTermination()

void ts::TSProcessor::waitForTermination ( )

Suspend the calling thread until TS processing is completed.

◆ registerEventHandler()

tsduck.PluginEventHandlerRegistry.registerEventHandler ( self,
handler,
event_code )
inherited

Register an event handler by event code.

Parameters
handlerAn instance of AbstractPluginEventHandler.
event_codeThe code of the events to handle.
Returns
None.

◆ registerInputEventHandler()

tsduck.PluginEventHandlerRegistry.registerInputEventHandler ( self,
handler )
inherited

Register an event handler for all events from the input plugin.

Parameters
handlerAn instance of AbstractPluginEventHandler.
Returns
None.

◆ registerOutputEventHandler()

tsduck.PluginEventHandlerRegistry.registerOutputEventHandler ( self,
handler )
inherited

Register an event handler for all events from the output plugin.

Parameters
handlerAn instance of AbstractPluginEventHandler.
Returns
None.

◆ delete()

tsduck.NativeObject.delete ( self)
inherited

Explicitly free the underlying C++ object.

After this call, the object becomes unusable. Most usages are unpredictable but most likely will do nothing.

Returns
None.

Reimplemented in tsduck.AbstractPluginEventHandler, tsduck.AsyncReport, tsduck.DuckContext, tsduck.InputSwitcher, tsduck.SectionFile, tsduck.SystemMonitor, and tsduck.TSProcessor.

◆ _setNative()

tsduck.NativeObject._setNative ( self,
obj )
protectedinherited

Set the native object.

This is typically done by subclass constructors.

Parameters
objAddress of the C++ native object to store.

◆ _getNative()

tsduck.NativeObject._getNative ( self)
protectedinherited

Get the native object.

This is typically used by subclasses.

Returns
Address of the C++ native object.

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