TSDuck Version 3.32-2769 (TSDuck - The MPEG Transport Stream Toolkit)
ts::VersionInfo Class Reference

Information about version identification of TSDuck. More...

Inheritance diagram for ts::VersionInfo:
Collaboration diagram for ts::VersionInfo:

Public Types

enum  Format {
  Format::SHORT,
  Format::LONG,
  Format::INTEGER,
  Format::DATE,
  Format::COMPILER,
  Format::SYSTEM,
  Format::BITRATE,
  Format::NSIS,
  Format::DEKTEC,
  Format::HTTP,
  Format::SRT,
  Format::RIST,
  Format::ALL
}
 Types of version formatting, for predefined option --version. More...
 

Public Member Functions

 VersionInfo (Report &report)
 Default constructor. More...
 
virtual ~VersionInfo () override
 Destructor.
 
void startNewVersionDetection ()
 Start a thread which checks the availability of a new TSDuck version. More...
 

Static Public Member Functions

static int CompareVersions (const UString &v1, const UString &v2)
 Compare two version strings. More...
 
static UString GetVersion (Format format=Format::SHORT, const UString &applicationName=UString())
 Get the TSDuck formatted version number. More...
 

Static Public Attributes

static const Enumeration FormatEnum
 Enumeration description of class Format. More...
 

Detailed Description

Information about version identification of TSDuck.

Member Enumeration Documentation

◆ Format

Types of version formatting, for predefined option --version.

Enumerator
SHORT 

Short format X.Y-R.

LONG 

Full explanatory format.

INTEGER 

Integer format XXYYRRRRR.

DATE 

Build date.

COMPILER 

Version of the compiler which was used to build the code.

SYSTEM 

Type of system and platform.

BITRATE 

Representation of bitrate values.

NSIS 

Output NSIS !define directives.

DEKTEC 

Version of embedded Dektec DTAPI and detected Dektec drivers.

HTTP 

Version of HTTP library which is used.

SRT 

Version of SRT library which is used.

RIST 

Version of RIST library which is used.

ALL 

Multi-line output with full details.

Constructor & Destructor Documentation

◆ VersionInfo()

ts::VersionInfo::VersionInfo ( Report report)

Default constructor.

Parameters
[in,out]reportReference to the report object through which new versions will be reported.

Member Function Documentation

◆ startNewVersionDetection()

void ts::VersionInfo::startNewVersionDetection ( )

Start a thread which checks the availability of a new TSDuck version.

If a new version is found, it is reported through the Report object that was specified in the constructor. This can be done only once, further calls are ignored. The destructor of this object waits for the completion of the thread.

If the environment variable TSDUCK_NO_VERSION_CHECK is not empty, do not start the new version check. To debug new version checking, define the environment variable TS_DEBUG_NEW_VERSION to any non-empty value; debug and errors messages will be reported through the same Report object.

◆ GetVersion()

static UString ts::VersionInfo::GetVersion ( Format  format = Format::SHORT,
const UString applicationName = UString() 
)
static

Get the TSDuck formatted version number.

Parameters
[in]formatType of output, short by default.
[in]applicationNameName of the application to prepend to the long format.
Returns
The formatted version string.

◆ CompareVersions()

static int ts::VersionInfo::CompareVersions ( const UString v1,
const UString v2 
)
static

Compare two version strings.

Parameters
[in]v1First version string.
[in]v2First version string.
Returns
One of -1, 0, 1 when v1 < v2, v1 == v2, v1 > v2.

Member Data Documentation

◆ FormatEnum

const Enumeration ts::VersionInfo::FormatEnum
static

Enumeration description of class Format.

Typically used to implement the --version command line option.


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