TSDuck v3.38-3696
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::Muxer Class Reference

Implementation of the TS multiplexer. More...

#include <tsMuxer.h>

Inheritance diagram for ts::Muxer:
Collaboration diagram for ts::Muxer:

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.
 
Reportreport () 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Muxer()

ts::Muxer::Muxer ( 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).

◆ ~Muxer()

ts::Muxer::~Muxer ( )

Destructor.

It waits for termination of the session if it is running.

Member Function Documentation

◆ report()

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

Get a reference to the report object for the multiplexer.

Returns
A reference to the report object.

◆ start()

bool ts::Muxer::start ( const MuxerArgs args)

Start the multiplexer session.

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

◆ registerEventHandler()

void ts::PluginEventHandlerRegistry::registerEventHandler ( PluginEventHandlerInterface handler,
const Criteria criteria = Criteria::Any 
)
inherited

Register an event handler.

Note: calling this function while executing a plugin event hander does nothing.

Parameters
[in]handlerThe event handler to register.
[in]criteriaThe criteria for which the handler is to be called.

◆ unregisterEventHandler()

void ts::PluginEventHandlerRegistry::unregisterEventHandler ( PluginEventHandlerInterface handler = nullptr)
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.

Parameters
[in]handlerThe event handler to unregister. When null, all events are unregistered.

◆ callEventHandlers()

void ts::PluginEventHandlerRegistry::callEventHandlers ( const PluginEventContext context) const
inherited

Invoke all event handlers for a given event.

Parameters
[in]contextEvent context.

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