TSDuck v3.40-4033
MPEG Transport Stream Toolkit
|
Implementation of the TS multiplexer. More...
#include <tsMuxer.h>
Public Member Functions | |
Muxer (Report &report) | |
Constructor. | |
~Muxer () | |
Destructor. | |
void | callEventHandlers (const PluginEventContext &context) const |
Invoke all event handlers for a given event. | |
void | registerEventHandler (PluginEventHandlerInterface *handler, const Criteria &criteria=Criteria::Any) |
Register an event handler. | |
Report & | report () const |
Get a reference to the report object for the multiplexer. | |
bool | start (const MuxerArgs &args) |
Start the multiplexer session. | |
void | stop () |
Stop the multiplexer. | |
void | unregisterEventHandler (PluginEventHandlerInterface *handler=nullptr) |
Unregister all occurences of an event handler. | |
void | waitForTermination () |
Suspend the calling thread until the multiplexer is completed. | |
Implementation of the TS multiplexer.
This class is used by the tsmux utility. It can also be used in other applications to multiplex input streams.
ts::Muxer::Muxer | ( | 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::Muxer::~Muxer | ( | ) |
Destructor.
It waits for termination of the session if it is running.
|
inline |
Get a reference to the report object for the multiplexer.
bool ts::Muxer::start | ( | const MuxerArgs & | args | ) |
Start the multiplexer session.
[in] | args | Arguments and options. |
|
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. |