![]() |
TSDuck
v3.35-3218
MPEG Transport Stream Toolkit
|
Core of the TSP Transport Stream Processor. More...
Public Member Functions | |
TSProcessor (Report &report) | |
Constructor. More... | |
~TSProcessor () | |
Destructor. More... | |
void | abort () |
Abort the processing. More... | |
void | callEventHandlers (const PluginEventContext &context) const |
Invoke all event handlers for a given event. More... | |
bool | isStarted () |
Check if the TS processing is started. More... | |
void | registerEventHandler (PluginEventHandlerInterface *handler, const Criteria &criteria=Criteria()) |
Register an event handler. More... | |
Report & | report () const |
Get a reference to the report object for the TS processor. More... | |
bool | start (const TSProcessorArgs &args) |
Start the TS processing. More... | |
void | unregisterEventHandler (PluginEventHandlerInterface *handler=nullptr) |
Unregister all occurences of an event handler. More... | |
void | waitForTermination () |
Suspend the calling thread until TS processing is completed. | |
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.
ts::TSProcessor::TSProcessor | ( | Report & | report | ) |
Constructor.
[in,out] | report | Where 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). |
ts::TSProcessor::~TSProcessor | ( | ) |
Destructor.
It waits for termination of the TS processing if it is running.
|
inline |
Get a reference to the report object for the TS processor.
bool ts::TSProcessor::start | ( | const TSProcessorArgs & | args | ) |
Start the TS processing.
[in] | args | Arguments and options. |
bool ts::TSProcessor::isStarted | ( | ) |
Check if the TS processing is started.
void ts::TSProcessor::abort | ( | ) |
Abort the processing.
The method can be invoked from any thread, including an interrupt handler for instance.
|
inherited |
Register an event handler.
Note: calling this function while executing a plugin event hander does nothing.
[in] | handler | The event handler to register. |
[in] | criteria | The criteria for which the handler is to be called. |
|
inherited |
Unregister all occurences of an event handler.
Note: calling this function while executing a plugin event hander does nothing. This is typically used in the destructor of an event handler.
[in] | handler | The event handler to unregister. When null, all events are unregistered. |
|
inherited |
Invoke all event handlers for a given event.
[in] | context | Event context. |