TSDuck v3.40-4033
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::DuckExtensionRepository Class Reference

A repository of TSDuck extensions. More...

#include <tsDuckExtensionRepository.h>

Classes

class  Register
 A class to register extension. More...
 

Public Member Functions

size_t extensionCount () const
 Get the number of loaded extensions.
 
UString listExtensions (Report &report)
 List all loaded extensions.
 

Static Public Member Functions

static DuckExtensionRepositoryInstance ()
 Get the instance of the singleton of this class.
 

Detailed Description

A repository of TSDuck extensions.

This class is a singleton. Use static Instance() method to access the single instance.

A TSDuck Extension is a dynamically loaded shared library. It is typically provided by some third party. Unlike tsp plugins, a TSDuck extension shared library has no callable interface. Instead, it statically registers hooks inside the TSDuck library, when the TSDuck extension shared library is loaded.

The extensions repository is responsible for statically loading all available extensions. The extension shared libraries are all shared libraries named "tslibext_*", using the same search rules as tsp plugins.

Since this operation occurs before entering the main code of any executable using the TSDuck library, the application has no control over the loading of extensions. The following environment variables can be defined to alter the loading of extensions:

  • TSLIBEXT_DEBUG : If defined and not empty, display debug messages on the standard error.
  • TSLIBEXT_NONE : If defined and not empty, do not load any extension.
  • TSLIBEXT_IGNORE : A comma-separated list of extensions to ignore (useful when one extension creates problems when loaded).

Member Function Documentation

◆ Instance()

static DuckExtensionRepository & ts::DuckExtensionRepository::Instance ( )
inlinestatic

Get the instance of the singleton of this class.

Returns
The instance of the singleton of this class.

◆ extensionCount()

size_t ts::DuckExtensionRepository::extensionCount ( ) const
inline

Get the number of loaded extensions.

Returns
The number of loaded extensions.

◆ listExtensions()

UString ts::DuckExtensionRepository::listExtensions ( Report report)

List all loaded extensions.

This function is typically used to implement the tsversion --list-extensions option.

Parameters
[in,out]reportWhere to report errors. Used to get verbosity level.
Returns
The text to display.

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