TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Define a standard main() function with appropriate checks. More...
Macros | |
#define | TS_MAIN(func) |
A macro which expands to a main() program. | |
Functions | |
int | MainWrapper (int(*func)(int argc, char *argv[]), int argc, char *argv[]) |
A function to wrap the entry point of an application. | |
Define a standard main() function with appropriate checks.
#define TS_MAIN | ( | func | ) |
A macro which expands to a main() program.
An explicit reference is made to the TSDuck library version to check that the compilation and runtime versions are identical.
func | The actual main function with the same profile as main(). |
int MainWrapper | ( | int(*)(int argc, char *argv[]) | func, |
int | argc, | ||
char * | argv[] | ||
) |
A function to wrap the entry point of an application.
The application code should use the macro TS_MAIN instead of directly calling this function.
Uncaught exceptions are displayed. On Windows, the COM environment and IP networking are initialized. The Windows console is set to UTF-8 mode and restored to its previous value on exit.
[in] | func | The actual main function with the same profile as main(). |
[in] | argc | Command line parameter count. |
[in] | argv | Command line parameters. |