![]() |
libgpac
Documentation of the core library of GPAC
|
Library configuration. More...
Collaboration diagram for Library configuration:Enumerations | |
| enum | GF_MemTrackerType { GF_MemTrackerNone = 0 , GF_MemTrackerSimple , GF_MemTrackerBackTrace } |
| enum | GF_ConsoleCodes { GF_CONSOLE_RESET =0 , GF_CONSOLE_RED , GF_CONSOLE_GREEN , GF_CONSOLE_BLUE , GF_CONSOLE_YELLOW , GF_CONSOLE_CYAN , GF_CONSOLE_WHITE , GF_CONSOLE_MAGENTA , GF_CONSOLE_CLEAR , GF_CONSOLE_SAVE , GF_CONSOLE_RESTORE , GF_CONSOLE_BOLD = 1<<16 , GF_CONSOLE_ITALIC = 1<<17 , GF_CONSOLE_UNDERLINED = 1<<18 , GF_CONSOLE_STRIKE = 1<<19 } |
Functions | |
| GF_Err | gf_sys_init (GF_MemTrackerType mem_tracker_type, const char *profile) |
| System setup. | |
| void | gf_sys_close () |
| System closing. | |
| GF_Err | gf_sys_set_args (s32 argc, const char **argv) |
| System arguments. | |
| u32 | gf_sys_get_argc () |
| Get number of args. | |
| const char ** | gf_sys_get_argv () |
| Get program arguments. | |
| const char * | gf_sys_get_arg (u32 arg) |
| Get number of args. | |
| const char * | gf_sys_find_global_arg (const char *arg) |
| Locate a global filter arg. | |
| void | gf_sys_mark_arg_used (s32 arg_idx, Bool used) |
| Mark arg as used. | |
| Bool | gf_sys_is_arg_used (s32 arg_idx) |
| Check if arg is marked as used. | |
| Bool | gf_sys_is_test_mode () |
| checks if test mode is enabled | |
| Bool | gf_sys_old_arch_compat () |
| checks if compatibility with old arch is enabled | |
| u32 | gf_sys_is_quiet () |
| checks if running in quiet mode | |
| const char * | gf_sys_features (Bool disabled) |
| Bool | gf_sys_solve_path (const char *tpl_path, char szPath[GF_MAX_PATH]) |
| GF_Err | gf_sys_enable_rmtws (Bool start) |
| GF_Err | gf_sys_enable_userws (Bool start) |
| void * | gf_sys_get_rmtws () |
| void * | gf_sys_get_userws () |
| void | gf_sys_set_console_code (FILE *std, GF_ConsoleCodes code) |
| const char * | gf_opts_get_key (const char *secName, const char *keyName) |
| GF_Err | gf_opts_set_key (const char *secName, const char *keyName, const char *keyValue) |
| void | gf_opts_del_section (const char *secName) |
| u32 | gf_opts_get_section_count () |
| const char * | gf_opts_get_section_name (u32 secIndex) |
| u32 | gf_opts_get_key_count (const char *secName) |
| const char * | gf_opts_get_key_name (const char *secName, u32 keyIndex) |
| Bool | gf_opts_get_bool (const char *secName, const char *keyName) |
| u32 | gf_opts_get_int (const char *secName, const char *keyName) |
| const char * | gf_opts_get_key_restricted (const char *secName, const char *keyName) |
| GF_Err | gf_opts_discard_changes () |
| GF_Err | gf_opts_save () |
| const char * | gf_opts_get_filename () |
| Bool | gf_opts_default_shared_directory (char path_buffer[GF_MAX_PATH]) |
| GF_Err | gf_creds_check_password (const char *username, char *password) |
| Bool | gf_creds_check_membership (const char *username, const char *users, const char *groups) |
Library configuration.
These functions are used to initialize, shutdown and configure libgpac.
The library shall be initialized using gf_sys_init and terminated using gf_sys_close
The library can usually be configured from command line if your program uses gf_sys_set_args.
The library can also be configured from your program using gf_opts_set_key and related functions right after initializing the library.
For more information on configuration options, see
and https://wiki.gpac.io/Filters/core_options
For more information on filters configuration options, see https://wiki.gpac.io/Filters/Filters
| enum GF_MemTrackerType |
| enum GF_ConsoleCodes |
GPAC Log tools
Describes the color code for console print
| GF_Err gf_sys_init | ( | GF_MemTrackerType | mem_tracker_type, |
| const char * | profile | ||
| ) |
System setup.
Inits system tools (GPAC global config, high-resolution clock if any, CPU usage manager, random number, ...).
You MUST call this function before calling any libgpac function, typically only once at startup.
The profile allows using a different global config file than the default, and may be a name (without / or \) or point to an existing config file.
| mem_tracker_type | memory tracking mode |
| profile | name of the profile to load, NULL for default. |
Here is the call graph for this function:
Here is the caller graph for this function:| void gf_sys_close | ( | ) |
System closing.
Closes allocated system resources opened by gf_sys_init.
Here is the call graph for this function:
Here is the caller graph for this function:System arguments.
Sets the user app arguments (used by GUI mode)
| argc | Number of arguments |
| argv | Array of arguments - the first string is ignored (considered to be the executable name) |
Here is the call graph for this function:
Here is the caller graph for this function:| u32 gf_sys_get_argc | ( | ) |
Get number of args.
Gets the number of argument of the user application if any
Here is the caller graph for this function:| const char ** gf_sys_get_argv | ( | ) |
Get program arguments.
Gets the arguments of the user application if any
Here is the caller graph for this function:| const char * gf_sys_get_arg | ( | u32 | arg | ) |
Get number of args.
Gets the number of argument of the user application if any
| arg | Index of argument to retrieve |
Here is the caller graph for this function:| const char * gf_sys_find_global_arg | ( | const char * | arg | ) |
Locate a global filter arg.
Looks for a filter option specified as global argument
| arg | name of option to search, without "--" or "-+" specififers |
Here is the caller graph for this function:Mark arg as used.
Marks the argument at given index as used. By default all args are marked as not used when assigning args
| arg_idx | Index of argument to mark |
| used | flag to set |
Here is the caller graph for this function:Check if arg is marked as used.
Marks the argument at given index as used
| arg_idx | Index of argument to mark |
Here is the caller graph for this function:| Bool gf_sys_is_test_mode | ( | ) |
checks if test mode is enabled
Checks if test mode is enabled (no date nor GPAC version should be written).
Here is the caller graph for this function:| Bool gf_sys_old_arch_compat | ( | ) |
checks if compatibility with old arch is enabled
Checks if compatibility with old arch is enabled - this function will be removed when master will be moved to filters branch
Here is the caller graph for this function:| u32 gf_sys_is_quiet | ( | ) |
checks if running in quiet mode
Checks if quiet mode is enabled
Here is the caller graph for this function:| const char * gf_sys_features | ( | Bool | disabled | ) |
gets GPAC feature list in this GPAC build
| disabled | if GF_TRUE, gets disabled features, otherwise gets enabled features |
Here is the call graph for this function:
Here is the caller graph for this function:| Bool gf_sys_solve_path | ( | const char * | tpl_path, |
| char | szPath[GF_MAX_PATH] | ||
| ) |
solves path starting with replacement keywords:
| tpl_path | url to translate, must start with $GDOCS or $GCFG |
| szPath | path to store the result |
Here is the call graph for this function:
Here is the caller graph for this function:Enables or disables the rmt websocket monitoring server
| start | If true starts the webserver, if false stops it |
Here is the call graph for this function:
Here is the caller graph for this function:Enables or disables the rmt websocket user server
| start | If true starts the webserver, if false stops it |
Here is the call graph for this function:
Here is the caller graph for this function:| void * gf_sys_get_rmtws | ( | ) |
Returns the monitoring websocket server handler
| void * gf_sys_get_userws | ( | ) |
Returns the user websocket server handler
| void gf_sys_set_console_code | ( | FILE * | std, |
| GF_ConsoleCodes | code | ||
| ) |
sets console code
| std | the output stream (stderr or stdout) |
| code | the console code to set |
Here is the call graph for this function:
Here is the caller graph for this function:| const char * gf_opts_get_key | ( | const char * | secName, |
| const char * | keyName | ||
| ) |
gets a global config key value from its section and name.
| secName | the desired key parent section name |
| keyName | the desired key name |
Here is the call graph for this function:
Here is the caller graph for this function:| GF_Err gf_opts_set_key | ( | const char * | secName, |
| const char * | keyName, | ||
| const char * | keyValue | ||
| ) |
sets a global config key value from its section and name.
| secName | the desired key parent section name |
| keyName | the desired key name |
| keyValue | the desired key value |
Here is the call graph for this function:
Here is the caller graph for this function:| void gf_opts_del_section | ( | const char * | secName | ) |
removes all entries in the given section of the global config
| secName | the target section |
Here is the call graph for this function:
Here is the caller graph for this function:| u32 gf_opts_get_section_count | ( | ) |
gets the number of sections in the global config
Here is the call graph for this function:
Here is the caller graph for this function:| const char * gf_opts_get_section_name | ( | u32 | secIndex | ) |
gets a section name based on its index in the global config
| secIndex | 0-based index of the section to query |
Here is the call graph for this function:
Here is the caller graph for this function:| u32 gf_opts_get_key_count | ( | const char * | secName | ) |
gets the number of keys in a section of the global config
| secName | the target section |
Here is the call graph for this function:
Here is the caller graph for this function:| const char * gf_opts_get_key_name | ( | const char * | secName, |
| u32 | keyIndex | ||
| ) |
gets the number of keys in a section of the global config
| secName | the target section |
| keyIndex | 0-based index of the key in the section |
Here is the call graph for this function:
Here is the caller graph for this function:| Bool gf_opts_get_bool | ( | const char * | secName, |
| const char * | keyName | ||
| ) |
gets a global config boolean value from its section and name.
| secName | the desired key parent section name |
| keyName | the desired key name |
Here is the call graph for this function:
Here is the caller graph for this function:| u32 gf_opts_get_int | ( | const char * | secName, |
| const char * | keyName | ||
| ) |
gets a global config integer value from its section and name.
| secName | the desired key parent section name |
| keyName | the desired key name |
Here is the call graph for this function:
Here is the caller graph for this function:| const char * gf_opts_get_key_restricted | ( | const char * | secName, |
| const char * | keyName | ||
| ) |
gets a global config key value from its section and name.
| secName | the desired key parent section name |
| keyName | the desired key name |
Here is the call graph for this function:
Here is the caller graph for this function:| GF_Err gf_opts_discard_changes | ( | ) |
Do not save modification to global options
Here is the call graph for this function:
Here is the caller graph for this function:| GF_Err gf_opts_save | ( | ) |
Force immediate write of config
Here is the call graph for this function:
Here is the caller graph for this function:| const char * gf_opts_get_filename | ( | ) |
Returns file name of global config
Here is the call graph for this function:
Here is the caller graph for this function:| Bool gf_opts_default_shared_directory | ( | char | path_buffer[GF_MAX_PATH] | ) |
Gets GPAC shared directory (gui, shaders, etc ..)
| path_buffer | GF_MAX_PATH buffer to store output |
Here is the call graph for this function:
Here is the caller graph for this function:| GF_Err gf_creds_check_password | ( | const char * | username, |
| char * | password | ||
| ) |
Checks given user and password are valid
| username | user name |
| password | password |
Here is the call graph for this function:
Here is the caller graph for this function:| Bool gf_creds_check_membership | ( | const char * | username, |
| const char * | users, | ||
| const char * | groups | ||
| ) |
Checks given user belongs to list of users or groups.
| username | user name |
| users | comma-seprated list of users to check, may be NULL |
| groups | comma-seprated list of groups to check, may be NULL |
Here is the call graph for this function:
Here is the caller graph for this function: