TSDuck v3.38-3699
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::PluginThread Class Referenceabstract

Base class for threads executing a tsp plugin. More...

#include <tsPluginThread.h>

Inheritance diagram for ts::PluginThread:
Collaboration diagram for ts::PluginThread:

Public Member Functions

 PluginThread (Report *report, const UString &appName, PluginType type, const PluginOptions &options, const ThreadAttributes &attributes)
 Constructor.
 
virtual ~PluginThread () override
 Destructor.
 
virtual bool aborting () const override
 Check for aborting application.
 
BitRate bitrate () const
 Get the current input bitrate in bits/seconds.
 
BitRateConfidence bitrateConfidence () const
 Get the plugin bitrate confidence.
 
bool debug () const
 Check if debugging is active.
 
template<class... Args>
void debug (const UChar *fmt, Args &&... args)
 Report a debug message with a printf-like interface.
 
void debug (const UChar *msg)
 Report a debug message.
 
template<class... Args>
void debug (const UString &fmt, Args &&... args)
 Report a debug message with a printf-like interface.
 
void debug (const UString &msg)
 Report a debug message.
 
ReportdelegateReport (Report *report)
 Delegate message logging to another report object.
 
template<class... Args>
void error (const UChar *fmt, Args &&... args)
 Report an error message with a printf-like interface.
 
void error (const UChar *msg)
 Report an error message.
 
template<class... Args>
void error (const UString &fmt, Args &&... args)
 Report an error message with a printf-like interface.
 
void error (const UString &msg)
 Report an error message.
 
template<class... Args>
void fatal (const UChar *fmt, Args &&... args)
 Report a fatal error message with a printf-like interface.
 
void fatal (const UChar *msg)
 Report a fatal error message.
 
template<class... Args>
void fatal (const UString &fmt, Args &&... args)
 Report a fatal error message with a printf-like interface.
 
void fatal (const UString &msg)
 Report a fatal error message.
 
void getAttributes (ThreadAttributes &attributes)
 Get a copy of the attributes of the thread.
 
UString getTypeName () const
 Get an implementation-specific name of the object class.
 
bool gotErrors () const
 Check if errors (or worse) were reported through this object.
 
template<class... Args>
void info (const UChar *fmt, Args &&... args)
 Report an informational message with a printf-like interface.
 
void info (const UChar *msg)
 Report an informational message.
 
template<class... Args>
void info (const UString &fmt, Args &&... args)
 Report an informational message with a printf-like interface.
 
void info (const UString &msg)
 Report an informational message.
 
bool isCurrentThread () const
 Check if the caller is running in the context of this thread.
 
virtual void jointTerminate ()=0
 Signaling "joint termination".
 
template<class... Args>
void log (int severity, const UChar *fmt, Args &&... args)
 Report a message with an explicit severity and a printf-like interface.
 
template<class... Args>
void log (int severity, const UString &fmt, Args &&... args)
 Report a message with an explicit severity and a printf-like interface.
 
void log (int severity, const UString &msg)
 Report a message with an explicit severity.
 
virtual void main ()=0
 This hook is invoked in the context of the thread.
 
int maxSeverity () const
 Get maximum severity level.
 
virtual Pluginplugin () const override
 Access the shared library through the plugin interface.
 
virtual size_t pluginCount () const =0
 Get the number of plugins in the processing chain.
 
virtual size_t pluginIndex () const =0
 Get the plugin index in the processing chain.
 
virtual UString pluginName () const override
 Get the plugin name.
 
PacketCounter pluginPackets () const
 Get total number of packets previously processed in the plugin object.
 
void raiseMaxSeverity (int level, bool delegated=false)
 Raise maximum severity level.
 
bool realtime () const
 Check if the current plugin environment should use defaults for real-time.
 
UString reportPrefix () const
 Get the current prefix to display.
 
void resetErrors ()
 Reset the error indicator.
 
bool setAttributes (const ThreadAttributes &attributes)
 Set new attributes to the thread.
 
void setLogName (const UString &name)
 Set the plugin name as displayed in log messages.
 
void setMaxSeverity (int level, bool delegated=false)
 Set maximum severity level.
 
void setPacketTimeout (cn::milliseconds timeout)
 Set a timeout for the reception of packets by the current plugin.
 
void setReportPrefix (const UString &prefix)
 Set the prefix to display before each message.
 
template<class... Args>
void severe (const UChar *fmt, Args &&... args)
 Report a severe error message with a printf-like interface.
 
void severe (const UChar *msg)
 Report a severe error message.
 
template<class... Args>
void severe (const UString &fmt, Args &&... args)
 Report a severe error message with a printf-like interface.
 
void severe (const UString &msg)
 Report a severe error message.
 
virtual void signalPluginEvent (uint32_t event_code, Object *plugin_data=nullptr) const =0
 Signal a plugin event.
 
bool start ()
 Start the thread.
 
virtual bool thisJointTerminated () const =0
 Check if the calling plugin has already declared "joint termination".
 
PacketCounter totalPacketsInThread () const
 Get total number of packets in the execution of the plugin thread.
 
virtual bool useJointTermination () const =0
 Check if the calling plugin uses "joint termination".
 
virtual void useJointTermination (bool on)=0
 Activates or deactivates "joint termination".
 
bool verbose () const
 Check if verbose reporting is active.
 
template<class... Args>
void verbose (const UChar *fmt, Args &&... args)
 Report a verbose message with a printf-like interface.
 
void verbose (const UChar *msg)
 Report a verbose message.
 
template<class... Args>
void verbose (const UString &fmt, Args &&... args)
 Report a verbose message with a printf-like interface.
 
void verbose (const UString &msg)
 Report a verbose message.
 
bool waitForTermination ()
 Wait for thread termination.
 
template<class... Args>
void warning (const UChar *fmt, Args &&... args)
 Report a warning message with a printf-like interface.
 
void warning (const UChar *msg)
 Report a warning error message.
 
template<class... Args>
void warning (const UString &fmt, Args &&... args)
 Report a warning message with a printf-like interface.
 
void warning (const UString &msg)
 Report a warning error message.
 

Static Public Member Functions

static void Yield ()
 Yield execution of the current thread.
 

Static Public Attributes

static constexpr size_t STACK_SIZE_OVERHEAD = 32 * 1024
 Plugin stack size overhead.
 

Protected Member Functions

void addNonPluginPackets (size_t incr)
 Account for more processed packets in this plugin thread, but excluded from plugin object.
 
void addPluginPackets (size_t incr)
 Account for more processed packets in this plugin object.
 
void restartPluginSession ()
 Restart accounting for plugin session.
 
void setTypeName (const UString &name=UString())
 Set the type name.
 
virtual void writeLog (int severity, const UString &msg)
 Actual message reporting method.
 

Protected Attributes

volatile bool _tsp_aborting = false
 TSP is currently aborting.
 
BitRate _tsp_bitrate = 0
 TSP input bitrate.
 
BitRateConfidence _tsp_bitrate_confidence = BitRateConfidence::LOW
 TSP input bitrate confidence.
 
cn::milliseconds _tsp_timeout = cn::milliseconds(-1)
 Timeout when waiting for packets, infinite if negative.
 
bool _use_realtime = false
 The plugin should use realtime defaults.
 

Detailed Description

Base class for threads executing a tsp plugin.

The subclasses shall implement the TSP interface.

Constructor & Destructor Documentation

◆ PluginThread()

ts::PluginThread::PluginThread ( Report report,
const UString appName,
PluginType  type,
const PluginOptions options,
const ThreadAttributes attributes 
)

Constructor.

Parameters
[in,out]reportInitial report object. The report object is used to forward messages which are sent to this PluginThread instance (PluginThread is a subclass of Report through TSP).
[in]appNameApplication name, for help messages.
[in]typePlugin type.
[in]optionsCommand line options for this plugin.
[in]attributesCreation attributes for the thread executing this plugin.

Member Function Documentation

◆ setLogName()

void ts::PluginThread::setLogName ( const UString name)

Set the plugin name as displayed in log messages.

By default, used the real plugin name.

Parameters
[in]nameThe name to use in log messages. When empty, revert to the real plugin name.

◆ pluginName()

virtual UString ts::PluginThread::pluginName ( ) const
overridevirtual

Get the plugin name.

Returns
The plugin name. This is typically the name which is used in the commmand line.

Implements ts::TSP.

◆ plugin()

virtual Plugin * ts::PluginThread::plugin ( ) const
overridevirtual

Access the shared library through the plugin interface.

Returns
Address of the plugin interface.

Implements ts::TSP.

◆ setAttributes()

bool ts::Thread::setAttributes ( const ThreadAttributes attributes)
inherited

Set new attributes to the thread.

New attributes can be set as long as the thread is not started, i.e. as long as start() is not invoked.

Parameters
[in]attributesNew attributes to set.
Returns
True on success, false on error (if the thread is already started).

◆ getAttributes()

void ts::Thread::getAttributes ( ThreadAttributes attributes)
inherited

Get a copy of the attributes of the thread.

Parameters
[out]attributesAttributes of the thread.

◆ getTypeName()

UString ts::Thread::getTypeName ( ) const
inherited

Get an implementation-specific name of the object class.

Returns
An implementation-specific name of the object class. The result may be not portable. The returned value may be empty before start().

◆ start()

bool ts::Thread::start ( )
inherited

Start the thread.

The operating system thread is created and started. The code which is executed in the context of this thread is in the method main().

Returns
True on success, false on error (operating system error or the thread is already started).

◆ waitForTermination()

bool ts::Thread::waitForTermination ( )
inherited

Wait for thread termination.

The thread which invokes this method is blocked until the execution of this thread object completes.

Only one waiter thread is allowed. If several threads concurrently invoke waitForTermination() on the same Thread object, only the first one will wait. The method waitForTermination() returns an error to all other threads.

This method is automatically invoked in the destructor. Thus, when a Thread object is declared in a control block and the thread has been started, the end of the control block hangs as long as the thread is not terminated. If the thread has not been started, however, the destructor does not wait (otherwise it would hang for ever).

Important: When a subclass of Thread has non-static members, its destructor shall invoke waitForTermination(). Thus, it prevents its members from being destructed until the thread terminates. If the destructor of the subclass does not invoke waitForTermination() and the Thread object goes out of scope before the termination of the thread, the subclass part of the object is destroyed. Any attempt to access non-static members from the main() method in the context of the thread will give unexpected results. Most of the time, this will result in an error similar to "pure virtual method called". To avoid this:

class MyThread: public ts::Thread
{
public:
virtual ~MyThread()
{
waitForTermination();
}
...
};
Base class for threads.
Definition tsThread.h:39

Do not use this method if the thread was created with the delete when terminated flag (ts::ThreadAttributes::setDeleteWhenTerminated).

Returns
True on success, false on error. Errors include operating system errors, the thread is not yet started, the caller thread is this thread (waiting for ourself would result in a dead-lock).

◆ isCurrentThread()

bool ts::Thread::isCurrentThread ( ) const
inherited

Check if the caller is running in the context of this thread.

Returns
True if the caller of isCurrentThread() is running in the context of this thread.

◆ main()

virtual void ts::Thread::main ( )
pure virtualinherited

This hook is invoked in the context of the thread.

Concrete thread classes shall implement this pure virtual method. This method is invoked in the context of the created thread when it is started.

◆ Yield()

static void ts::Thread::Yield ( )
staticinherited

Yield execution of the current thread.

Execution is passed to another thread, if any is waiting for execution. This should not change the behaviour of correctly-written applications.

◆ setTypeName()

void ts::Thread::setTypeName ( const UString name = UString())
protectedinherited

Set the type name.

Parameters
[in]nameThe type name to set. If empty, the subclass type name is used.

◆ bitrate()

BitRate ts::TSP::bitrate ( ) const
inlineinherited

Get the current input bitrate in bits/seconds.

Returns
The current input bitrate in bits/seconds or zero if unknown.

◆ bitrateConfidence()

BitRateConfidence ts::TSP::bitrateConfidence ( ) const
inlineinherited

Get the plugin bitrate confidence.

Returns
The level of confidence of the bitrate value as returned by the previous call to bitrate().

◆ pluginIndex()

virtual size_t ts::TSP::pluginIndex ( ) const
pure virtualinherited

Get the plugin index in the processing chain.

Returns
The plugin index. For a TS processor, this is typically 0 for the input plugin and the number of plugins minus one for the output plugin. For an input switcher, this is in input index for input plugins and the number of plugins minus one for the output plugin.

◆ pluginCount()

virtual size_t ts::TSP::pluginCount ( ) const
pure virtualinherited

Get the number of plugins in the processing chain.

Returns
The number of plugins in the processing chain.

◆ pluginPackets()

PacketCounter ts::TSP::pluginPackets ( ) const
inlineinherited

Get total number of packets previously processed in the plugin object.

For input and output plugins, this is the number of successfully read or written packets. For processor plugins, this is the number of packets which were submitted to the plugin object (ie. excluding previously dropped packets but including packets which were dropped by the current plugin).

Returns
The total number of packets in this plugin object.

◆ totalPacketsInThread()

PacketCounter ts::TSP::totalPacketsInThread ( ) const
inlineinherited

Get total number of packets in the execution of the plugin thread.

This includes the number of extra stuffing or dropped packets.

Returns
The total number of packets in this plugin thread.

◆ realtime()

bool ts::TSP::realtime ( ) const
inlineinherited

Check if the current plugin environment should use defaults for real-time.

Returns
True if the current plugin environment should use defaults for real-time.

◆ setPacketTimeout()

void ts::TSP::setPacketTimeout ( cn::milliseconds  timeout)
inlineinherited

Set a timeout for the reception of packets by the current plugin.

For input plugins, this is the timeout for the availability of free space in input buffer.

When the timeout is triggered, the method handlePacketTimeout() is invoked in the plugin. If the method returns true, the application continues waiting for packets. If the method returns false, the plugin is aborted.

Parameters
[in]timeoutMaximum number of milliseconds to wait for packets in the buffer. Infinite timeout when negative. The default timeout is infinite.

◆ aborting()

virtual bool ts::TSP::aborting ( ) const
overridevirtualinherited

Check for aborting application.

The plugin may invoke this method to check if the application is aborting for some reason (user interrupt for instance).

Returns
True if the tsp application is currently aborting.

Implements ts::AbortInterface.

◆ signalPluginEvent()

virtual void ts::TSP::signalPluginEvent ( uint32_t  event_code,
Object plugin_data = nullptr 
) const
pure virtualinherited

Signal a plugin event.

If the application has registered plugin events for this kind of events, they will be invoked.

Parameters
[in]event_codeA plugin-defined 32-bit code describing the event type. There is no predefined list of event codes. Plugin should define their own codes.
[in]plugin_dataAddress of optional plugin-specific data. It can be a null pointer. Each plugin may defined subclasses of Object to pass specific data to application handlers which are aware of this plugin.

◆ useJointTermination() [1/2]

virtual void ts::TSP::useJointTermination ( bool  on)
pure virtualinherited

Activates or deactivates "joint termination".

This method activates or deactivates "joint termination" for the calling plugin. It should be invoked during the plugin's start().

Parameters
[in]onTrue to activate or false to deactivate joint termination.

◆ useJointTermination() [2/2]

virtual bool ts::TSP::useJointTermination ( ) const
pure virtualinherited

Check if the calling plugin uses "joint termination".

Returns
True if the calling plugin uses "joint termination".

◆ jointTerminate()

virtual void ts::TSP::jointTerminate ( )
pure virtualinherited

Signaling "joint termination".

This method is used by the plugin to declare that its execution is potentially terminated in the context of "joint termination". After invoking this method, any packet which is processed by the plugin may be ignored by tsp.

◆ thisJointTerminated()

virtual bool ts::TSP::thisJointTerminated ( ) const
pure virtualinherited

Check if the calling plugin has already declared "joint termination".

Returns
True if the calling plugin has already declared "joint termination".

◆ addPluginPackets()

void ts::TSP::addPluginPackets ( size_t  incr)
inlineprotectedinherited

Account for more processed packets in this plugin object.

Parameters
[in]incrAdd this number of processed packets in the plugin object.

◆ addNonPluginPackets()

void ts::TSP::addNonPluginPackets ( size_t  incr)
inlineprotectedinherited

Account for more processed packets in this plugin thread, but excluded from plugin object.

Parameters
[in]incrAdd this number of processed packets in the plugin thread.

◆ restartPluginSession()

void ts::TSP::restartPluginSession ( )
inlineprotectedinherited

Restart accounting for plugin session.

Typically invoked when the plugin is restarted.

◆ setMaxSeverity()

void ts::Report::setMaxSeverity ( int  level,
bool  delegated = false 
)
inherited

Set maximum severity level.

Messages with higher severities are not reported.

Parameters
[in]levelSet report to that level.
[in]delegatedPropagate the severity to delegated reports.

◆ raiseMaxSeverity()

void ts::Report::raiseMaxSeverity ( int  level,
bool  delegated = false 
)
inherited

Raise maximum severity level.

The severity can only be increased (more verbose, more debug), never decreased.

Parameters
[in]levelSet report at least to that level.
[in]delegatedPropagate the severity to delegated reports.

◆ maxSeverity()

int ts::Report::maxSeverity ( ) const
inlineinherited

Get maximum severity level.

Returns
Current maximum debug level.

◆ gotErrors()

bool ts::Report::gotErrors ( ) const
inlineinherited

Check if errors (or worse) were reported through this object.

Errors which were reported through delegated reports are ignored.

Returns
True if errors (or worse) were reported through this object.

◆ resetErrors()

void ts::Report::resetErrors ( )
inlineinherited

Reset the error indicator.

See also
gotErrors()

◆ setReportPrefix()

void ts::Report::setReportPrefix ( const UString prefix)
inlineinherited

Set the prefix to display before each message.

Parameters
[in]prefixThe prefix to prepend to all messages.

◆ reportPrefix()

UString ts::Report::reportPrefix ( ) const
inlineinherited

Get the current prefix to display.

Returns
The current prefix to display.

◆ delegateReport()

Report * ts::Report::delegateReport ( Report report)
inherited

Delegate message logging to another report object.

Parameters
[in]reportNew report object to which messages are delegated. Use nullptr to remove the delegation and return to normal logging.
Returns
Previous delegate report, return a null pointer if there was no previous delegate.

◆ debug() [1/5]

bool ts::Report::debug ( ) const
inlineinherited

Check if debugging is active.

Returns
True if current reporting level is Debug or higher.

◆ debug() [2/5]

void ts::Report::debug ( const UChar msg)
inlineinherited

Report a debug message.

Parameters
[in]msgMessage line.

◆ debug() [3/5]

void ts::Report::debug ( const UString msg)
inlineinherited

Report a debug message.

Parameters
[in]msgMessage line.

◆ debug() [4/5]

template<class... Args>
void ts::Report::debug ( const UChar fmt,
Args &&...  args 
)
inlineinherited

Report a debug message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ debug() [5/5]

template<class... Args>
void ts::Report::debug ( const UString fmt,
Args &&...  args 
)
inlineinherited

Report a debug message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ verbose() [1/5]

bool ts::Report::verbose ( ) const
inlineinherited

Check if verbose reporting is active.

Returns
True if current reporting level is Verbose or higher.

◆ verbose() [2/5]

void ts::Report::verbose ( const UChar msg)
inlineinherited

Report a verbose message.

Parameters
[in]msgMessage line.

◆ verbose() [3/5]

void ts::Report::verbose ( const UString msg)
inlineinherited

Report a verbose message.

Parameters
[in]msgMessage line.

◆ verbose() [4/5]

template<class... Args>
void ts::Report::verbose ( const UChar fmt,
Args &&...  args 
)
inlineinherited

Report a verbose message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ verbose() [5/5]

template<class... Args>
void ts::Report::verbose ( const UString fmt,
Args &&...  args 
)
inlineinherited

Report a verbose message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ log() [1/3]

void ts::Report::log ( int  severity,
const UString msg 
)
inherited

Report a message with an explicit severity.

Parameters
[in]severityMessage severity.
[in]msgMessage line.

◆ log() [2/3]

template<class... Args>
void ts::Report::log ( int  severity,
const UChar fmt,
Args &&...  args 
)
inlineinherited

Report a message with an explicit severity and a printf-like interface.

Parameters
[in]severityMessage severity.
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ log() [3/3]

template<class... Args>
void ts::Report::log ( int  severity,
const UString fmt,
Args &&...  args 
)
inlineinherited

Report a message with an explicit severity and a printf-like interface.

Parameters
[in]severityMessage severity.
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ fatal() [1/4]

void ts::Report::fatal ( const UChar msg)
inlineinherited

Report a fatal error message.

Parameters
[in]msgMessage line.

◆ fatal() [2/4]

void ts::Report::fatal ( const UString msg)
inlineinherited

Report a fatal error message.

Parameters
[in]msgMessage line.

◆ fatal() [3/4]

template<class... Args>
void ts::Report::fatal ( const UChar fmt,
Args &&...  args 
)
inlineinherited

Report a fatal error message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ fatal() [4/4]

template<class... Args>
void ts::Report::fatal ( const UString fmt,
Args &&...  args 
)
inlineinherited

Report a fatal error message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ severe() [1/4]

void ts::Report::severe ( const UChar msg)
inlineinherited

Report a severe error message.

Parameters
[in]msgMessage line.

◆ severe() [2/4]

void ts::Report::severe ( const UString msg)
inlineinherited

Report a severe error message.

Parameters
[in]msgMessage line.

◆ severe() [3/4]

template<class... Args>
void ts::Report::severe ( const UChar fmt,
Args &&...  args 
)
inlineinherited

Report a severe error message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ severe() [4/4]

template<class... Args>
void ts::Report::severe ( const UString fmt,
Args &&...  args 
)
inlineinherited

Report a severe error message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ error() [1/4]

void ts::Report::error ( const UChar msg)
inlineinherited

Report an error message.

Parameters
[in]msgMessage line.

◆ error() [2/4]

void ts::Report::error ( const UString msg)
inlineinherited

Report an error message.

Parameters
[in]msgMessage line.

◆ error() [3/4]

template<class... Args>
void ts::Report::error ( const UChar fmt,
Args &&...  args 
)
inlineinherited

Report an error message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ error() [4/4]

template<class... Args>
void ts::Report::error ( const UString fmt,
Args &&...  args 
)
inlineinherited

Report an error message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ warning() [1/4]

void ts::Report::warning ( const UChar msg)
inlineinherited

Report a warning error message.

Parameters
[in]msgMessage line.

◆ warning() [2/4]

void ts::Report::warning ( const UString msg)
inlineinherited

Report a warning error message.

Parameters
[in]msgMessage line.

◆ warning() [3/4]

template<class... Args>
void ts::Report::warning ( const UChar fmt,
Args &&...  args 
)
inlineinherited

Report a warning message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ warning() [4/4]

template<class... Args>
void ts::Report::warning ( const UString fmt,
Args &&...  args 
)
inlineinherited

Report a warning message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ info() [1/4]

void ts::Report::info ( const UChar msg)
inlineinherited

Report an informational message.

Parameters
[in]msgMessage line.

◆ info() [2/4]

void ts::Report::info ( const UString msg)
inlineinherited

Report an informational message.

Parameters
[in]msgMessage line.

◆ info() [3/4]

template<class... Args>
void ts::Report::info ( const UChar fmt,
Args &&...  args 
)
inlineinherited

Report an informational message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ info() [4/4]

template<class... Args>
void ts::Report::info ( const UString fmt,
Args &&...  args 
)
inlineinherited

Report an informational message with a printf-like interface.

Parameters
[in]fmtFormat string with embedded '%' sequences.
[in]argsList of arguments to substitute in the format string.
See also
UString::format()

◆ writeLog()

virtual void ts::Report::writeLog ( int  severity,
const UString msg 
)
protectedvirtualinherited

Actual message reporting method.

The method is called only when a message passed the severity filter. It is not necessary to recheck the maximum severity inside the method. By default, does nothing.

Parameters
[in]severityMessage severity.
[in]msgMessage text.

Reimplemented in ts::Args, ts::ReportBuffer< SAFETY >, ts::ReportFile< SAFETY >, ts::TelnetConnection, ts::CerrReport, and ts::NullReport.

Member Data Documentation

◆ STACK_SIZE_OVERHEAD

constexpr size_t ts::PluginThread::STACK_SIZE_OVERHEAD = 32 * 1024
staticconstexpr

Plugin stack size overhead.

Each plugin defines its own usage of the stack. The PluginThread class and its subclasses have their own additional stack usage.


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