TSDuck v3.38-3691
MPEG Transport Stream Toolkit
No Matches
ts::DuckExtensionRepository Class Reference

A repository of TSDuck extensions. More...

#include <tsDuckExtensionRepository.h>


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

Get the instance of the singleton of this class.

The instance of the singleton of this class.

◆ extensionCount()

size_t ts::DuckExtensionRepository::extensionCount ( ) const

Get the number of loaded extensions.

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.

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

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