TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsVersionInfo.h File Reference

Information about version identification of TSDuck. More...

Classes

class  ts::VersionInfo
 Information about version identification of TSDuck. More...
 

Namespaces

namespace  ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Macros

#define TS_LIBCHECK()
 A macro to use in application code to enforce the TSDuck library version.
 
#define TS_NO_GITHUB   1
 Macro to disable remote version checking on GitHub.
 

Variables

const int TSDUCK_LIBRARY_BITRATE_SYMBOL
 Generate a dependency on the bitrate implementation.
 
const int TSDUCK_LIBRARY_VERSION_SYMBOL
 Full version of the TSDuck library in the name of a symbol from the library.
 
const int tsduckLibraryVersionCommit
 Commit version of the TSDuck library as the int value of a symbol from the library.
 
const int tsduckLibraryVersionMajor
 Major version of the TSDuck library as the int value of a symbol from the library.
 
const int tsduckLibraryVersionMinor
 Minor version of the TSDuck library as the int value of a symbol from the library.
 

Detailed Description

Information about version identification of TSDuck.

Macro Definition Documentation

◆ TS_LIBCHECK

#define TS_LIBCHECK ( )

A macro to use in application code to enforce the TSDuck library version.

When this macro is used in an executable or shared library which uses the TSDuck library, it generates an external reference to a symbol name which contains the TSDuck library version number, at the time of the compilation of the application code. If the application is run later on a system with a TSDuck 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 TSDuck library which may fail if the version of the library is different.

◆ TS_NO_GITHUB

#define TS_NO_GITHUB   1

Macro to disable remote version checking on GitHub.

When this macro is defined on the compilation command line, no version check is performed on GitHub. The utility tsversion does not call GitHub, does not check, downlaod or upgrade new versions.

This macro is typically used by packagers of Linux distros who have the exclusive distribution of software packages. In that case, the packages for TSDuck shall be exclusively upgraded from the distro repositories, not using binaries from GitHub.

Variable Documentation

◆ TSDUCK_LIBRARY_VERSION_SYMBOL

const int TSDUCK_LIBRARY_VERSION_SYMBOL
extern

Full version of the TSDuck 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 TSDUCK_LIBRARY_VERSION_SYMBOL but this generates a reference to a symbol containing the actual version number.

Example:

$ nm -C tsVersionInfo.o | grep TSDUCK_LIBRARY_VERSION
00000000000008dc R TSDUCK_LIBRARY_VERSION_3_26_2289

◆ TSDUCK_LIBRARY_BITRATE_SYMBOL

const int TSDUCK_LIBRARY_BITRATE_SYMBOL
extern

Generate a dependency on the bitrate implementation.

Enforcing this dependency prevents mixing binaries which were compiled using different implementations of BitRate.