VLC  4.0.0-dev
Macros | Functions
cmdline.c File Reference
Include dependency graph for cmdline.c:

Macros

#define b_ignore_errors   (pindex == NULL)
 

Functions

int config_LoadCmdLine (vlc_object_t *p_this, int i_argc, const char *ppsz_argv[], int *pindex)
 Parse command line for configuration options. More...
 

Macro Definition Documentation

◆ b_ignore_errors

#define b_ignore_errors   (pindex == NULL)

Function Documentation

◆ config_LoadCmdLine()

int config_LoadCmdLine ( vlc_object_t p_this,
int  i_argc,
const char *  ppsz_argv[],
int *  pindex 
)

Parse command line for configuration options.

Now that the module_bank has been initialized, we can dynamically generate the longopts structure used by getops. We have to do it this way because we don't know (and don't want to know) in advance the configuration options used (ie. exported) by each module.

Parameters
p_thisobject to write command line options as variables to
i_argcnumber of command line arguments
ppsz_argscommandl ine arguments [IN/OUT]
pindexNULL to ignore unknown options, otherwise index of the first non-option argument [OUT]
Returns
0 on success, -1 on error.

References asprintf(), b_ignore_errors, CONFIG_CLASS, config_FindConfig(), CONFIG_ITEM, CONFIG_ITEM_BOOL, CONFIG_ITEM_FLOAT, CONFIG_ITEM_INTEGER, CONFIG_ITEM_STRING, container_of, module_value_t::f, vlc_option::flag, vlc_option::has_arg, module_value_t::i, vlc_param::i, module_config_t::i_type, i_type, vlc_param::item, module_config_t::max, module_config_t::min, vlc_option::name, name, vlc_param::obsolete, p, module_config_t::psz_name, psz_name, vlc_param::shortname, state, strdup(), strtoll(), us_atof(), vlc_option::val, var_Change(), var_Create(), var_SetBool(), var_SetFloat(), var_SetInteger(), var_SetString(), vlc_alloc(), vlc_getopt_long(), vlc_plugins, VLC_VAR_BOOL, VLC_VAR_FLOAT, VLC_VAR_INTEGER, VLC_VAR_SETMINMAX, and VLC_VAR_STRING.