TSDuck v3.40-4033
MPEG Transport Stream Toolkit
|
A repository of TSP plugins, either statically or dynamically linked. More...
#include <tsPluginRepository.h>
Classes | |
class | Register |
A class to register plugins. More... | |
Public Types | |
using | InputPluginFactory = InputPlugin *(*)(TSP *tsp) |
Profile of a function which creates an input plugin. | |
enum | ListFlags { LIST_INPUT = 0x0001 , LIST_PACKET = 0x0002 , LIST_OUTPUT = 0x0004 , LIST_COMPACT = 0x0010 , LIST_NAMES = 0x0020 , LIST_ALL = LIST_INPUT | LIST_PACKET | LIST_OUTPUT } |
Flags for listPlugins(). More... | |
using | OutputPluginFactory = OutputPlugin *(*)(TSP *tsp) |
Profile of a function which creates an output plugin. | |
using | ProcessorPluginFactory = ProcessorPlugin *(*)(TSP *tsp) |
Profile of a function which creates a packet processor plugin. | |
Public Member Functions | |
InputPluginFactory | getInput (const UString &name, Report &report) |
Get an input plugin by name. | |
OutputPluginFactory | getOutput (const UString &name, Report &report) |
Get an output plugin by name. | |
ProcessorPluginFactory | getProcessor (const UString &name, Report &report) |
Get a packet processor plugin by name. | |
size_t | inputCount () const |
Get the number of registered input plugins. | |
UStringList | inputNames () const |
Get the names of all registered input plugins. | |
UString | listPlugins (bool loadAll, Report &report, int flags=LIST_ALL) |
List all tsp processors. | |
void | loadAllPlugins (Report &report) |
Load all available tsp processors. | |
size_t | outputCount () const |
Get the number of registered output plugins. | |
UStringList | outputNames () const |
Get the names of all registered output plugins. | |
size_t | processorCount () const |
Get the number of registered processor plugins. | |
UStringList | processorNames () const |
Get the names of all registered packet processor plugins. | |
void | registerInput (const UString &name, InputPluginFactory allocator) |
Register an input plugin. | |
void | registerOutput (const UString &name, OutputPluginFactory allocator) |
Register an output plugin. | |
void | registerProcessor (const UString &name, ProcessorPluginFactory allocator) |
Register a packet processor plugin. | |
void | setSharedLibraryAllowed (bool allowed) |
Allow or disallow the loading of plugins from shareable objects. | |
Static Public Member Functions | |
static PluginRepository & | Instance () |
Get the instance of the singleton of this class. | |
Static Public Attributes | |
static const Enumeration | ListProcessorEnum |
Convenient command line options for "list processor" option. | |
A repository of TSP plugins, either statically or dynamically linked.
This class is a singleton. Use static Instance() method to access the single instance.
using ts::PluginRepository::InputPluginFactory = InputPlugin* (*)(TSP* tsp) |
Profile of a function which creates an input plugin.
[in] | tsp | Associated callback to tsp. |
using ts::PluginRepository::OutputPluginFactory = OutputPlugin* (*)(TSP* tsp) |
Profile of a function which creates an output plugin.
[in] | tsp | Associated callback to tsp. |
using ts::PluginRepository::ProcessorPluginFactory = ProcessorPlugin* (*)(TSP* tsp) |
Profile of a function which creates a packet processor plugin.
[in] | tsp | Associated callback to tsp. |
Flags for listPlugins().
Enumerator | |
---|---|
LIST_INPUT | List input plugins. |
LIST_PACKET | List packet processor plugins. |
LIST_OUTPUT | List output plugins. |
LIST_COMPACT | Compact output. |
LIST_NAMES | Names only. |
LIST_ALL | List all plugins. |
|
inlinestatic |
Get the instance of the singleton of this class.
|
inline |
Allow or disallow the loading of plugins from shareable objects.
When disabled, only statically registered plugins are allowed. Loading is initially enabled by default.
[in] | allowed | When true, dynamically loading plugins is allowed. |
void ts::PluginRepository::registerInput | ( | const UString & | name, |
InputPluginFactory | allocator | ||
) |
void ts::PluginRepository::registerProcessor | ( | const UString & | name, |
ProcessorPluginFactory | allocator | ||
) |
void ts::PluginRepository::registerOutput | ( | const UString & | name, |
OutputPluginFactory | allocator | ||
) |
InputPluginFactory ts::PluginRepository::getInput | ( | const UString & | name, |
Report & | report | ||
) |
ProcessorPluginFactory ts::PluginRepository::getProcessor | ( | const UString & | name, |
Report & | report | ||
) |
OutputPluginFactory ts::PluginRepository::getOutput | ( | const UString & | name, |
Report & | report | ||
) |
|
inline |
Get the number of registered input plugins.
|
inline |
Get the number of registered processor plugins.
|
inline |
Get the number of registered output plugins.
UStringList ts::PluginRepository::inputNames | ( | ) | const |
Get the names of all registered input plugins.
UStringList ts::PluginRepository::processorNames | ( | ) | const |
Get the names of all registered packet processor plugins.
UStringList ts::PluginRepository::outputNames | ( | ) | const |
Get the names of all registered output plugins.
void ts::PluginRepository::loadAllPlugins | ( | Report & | report | ) |
Load all available tsp processors.
Does nothing when dynamic loading of plugins is disabled.
[in,out] | report | Where to report errors. |
List all tsp processors.
This function is typically used to implement the tsp --list-processors
option.
[in] | loadAll | When true, all available plugins are loaded first. Ignored when dynamic loading of plugins is disabled. |
[in,out] | report | Where to report errors. |
[in] | flags | List options, an or'ed mask of ListFlags values. |