![]() |
TSDuck v3.41-4217
MPEG Transport Stream Toolkit
|
Version of the libtscore library. More...
Macros | |
#define | TS_LIBTSCORE_CHECK() |
A macro to use in application code to enforce the TSCore library version. | |
#define | TS_VERSION_INTEGER ((TS_VERSION_MAJOR * 10000000) + (TS_VERSION_MINOR * 100000) + TS_COMMIT) |
Define the TSDuck version as an integer, suitable for comparisons. | |
#define | TS_VERSION_STRING TS_STRINGIFY(TS_VERSION_MAJOR) "." TS_STRINGIFY(TS_VERSION_MINOR) "-" TS_STRINGIFY(TS_COMMIT) |
Define the TSDuck version as an 8-bit string literal. | |
#define | TS_VERSION_USTRING TS_USTRINGIFY(TS_VERSION_MAJOR) u"." TS_USTRINGIFY(TS_VERSION_MINOR) u"-" TS_USTRINGIFY(TS_COMMIT) |
Define the TSDuck version as a 16-bit string literal. | |
Variables | |
const int | LIBTSCORE_VERSION_SYMBOL |
Full version of the TSCore library in the name of a symbol from the library. | |
const int | tscoreLibraryVersionCommit |
Commit version of the TSCore library as the int value of a symbol from the library. | |
const int | tscoreLibraryVersionMajor |
Major version of the TSCore library as the int value of a symbol from the library. | |
const int | tscoreLibraryVersionMinor |
Minor version of the TSCore library as the int value of a symbol from the library. | |
Version of the libtscore library.
#define TS_LIBTSCORE_CHECK | ( | ) |
A macro to use in application code to enforce the TSCore library version.
When this macro is used in an executable or shared library which uses the TSCore library, it generates an external reference to a symbol name which contains the TSCore library version number, at the time of the compilation of the application code. If the application is run later on a system with a TSCore library with a different version, the reference won't be resolved and the application won't run.
If we don't do this, the initialization of application automatically calls complex "Register" constructors in the TSCore library which may fail if the version of the library is different.
|
extern |
Full version of the TSCore library in the name of a symbol from the library.
Can be used to force an undefined reference at run-time in case of version mismatch. The C++ application uses the name LIBTSCORE_VERSION_SYMBOL but this generates a reference to a symbol containing the actual version number.
Example: