TSDuck Version 3.20-1627 (TSDuck - The MPEG Transport Stream Toolkit)
tsDuckExtension.h File Reference

Classes

class  ts::DuckExtension
 Definition of a TSDuck extension. More...
 

Namespaces

 ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Macros

#define TS_DECLARE_EXTENSION(...)
 Export the TSDuck extension out of the shared library. More...
 

Detailed Description

Definition of a TSDuck Extension.

Macro Definition Documentation

◆ TS_DECLARE_EXTENSION

#define TS_DECLARE_EXTENSION (   ...)
Value:
namespace { \
const ts::DuckExtension _TSDuckExtensionId(__VA_ARGS__); \
} \
extern "C" { \ \
TS_PUSH_WARNING() \
TS_LLVM_NOWARNING(missing-variable-declarations) \
TS_DLL_EXPORT \
ts::DuckExtension::ConstPointer TSDuckExtensionId = &_TSDuckExtensionId; \
TS_POP_WARNING() \ \
} \
typedef int TS_UNIQUE_NAME(unused_to_allow_semicolon)

Export the TSDuck extension out of the shared library.

All TSDuck extension shared libraries must invoke this macro once. The parameters are the same as the ts::DuckExtension constructor.

Sample usage, from one source file inside the extension library:

TS_DECLARE_EXTENSION(u"foo", u"Manipulate FOO tables", {u"fooinject", u"fooextract"}, {u"foogen"});
TS_DECLARE_EXTENSION
#define TS_DECLARE_EXTENSION(...)
Export the TSDuck extension out of the shared library.
Definition: tsDuckExtension.h:117
TS_UNIQUE_NAME
#define TS_UNIQUE_NAME(prefix)
This macro generates a unique name based on the source line number.
Definition: tsPlatform.h:577
ts::DuckExtension
Definition of a TSDuck extension.
Definition: tsDuckExtension.h:56