VLC 4.0.0-dev
|
Functions | |
bool | module_provides (const module_t *m, const char *cap) |
Checks whether a module implements a capability. | |
const char * | module_get_object (const module_t *m) |
Gets the internal name of a module. | |
const char * | module_get_name (const module_t *m, bool long_name) |
Gets the human-friendly name of a module. | |
const char * | module_get_help (const module_t *m) |
Gets the help text for a module. | |
const char * | module_get_help_html (const module_t *m) |
Gets the help HTML for a module. | |
const char * | module_get_capability (const module_t *m) |
Gets the capability string of a module. | |
int | module_get_score (const module_t *m) |
Gets the precedence of a module. | |
const char * | module_gettext (const module_t *m, const char *str) |
Translates a string using the module's text domain. | |
static bool | module_match_name (const module_t *m, const char *name, size_t len) |
ssize_t | vlc_module_match (const char *capability, const char *names, bool strict, module_t ***restrict modules, size_t *restrict strict_matches) |
Finds the candidate modules for given criteria. | |
void * | vlc_module_map (vlc_logger_t *log, module_t *module) |
Maps a module in memory. | |
module_t *() | vlc_module_load (struct vlc_logger *log, const char *capability, const char *name, bool strict, vlc_activate_t probe,...) |
Finds and instantiates the best module of a certain type. | |
static int | generic_start (void *func, bool forced, va_list ap) |
module_t * | module_need (vlc_object_t *obj, const char *cap, const char *name, bool strict) |
void | module_unneed (vlc_object_t *obj, module_t *module) |
module_t * | module_find (const char *name) |
Get a pointer to a module_t given it's name. | |
module_config_t * | module_config_get (const module_t *module, unsigned *restrict psize) |
Gets the table of module configuration items. | |
void | module_config_free (module_config_t *config) |
Releases a configuration items table. | |
|
static |
References vlc_object_t::force, vlc_objres_clear(), and VLC_SUCCESS.
void module_config_free | ( | module_config_t * | tab | ) |
Releases a configuration items table.
tab | base address of a table returned by module_config_get() |
References config.
module_config_t * module_config_get | ( | const module_t * | module, |
unsigned *restrict | psize | ||
) |
Gets the table of module configuration items.
module | the module |
psize | the size of the configuration returned |
References vlc_plugin_t::conf, config, vlc_param::i, vlc_param::internal, vlc_param::item, vlc_param::obsolete, vlc_plugin_t::params, vlc_plugin_t::size, and vlc_alloc().
module_t * module_find | ( | const char * | name | ) |
Get a pointer to a module_t given it's name.
name | the name of the module |
References count, list, module_list_free(), module_list_get(), name, and unlikely.
Referenced by module_exists(), and module_get_main().
const char * module_get_capability | ( | const module_t * | m | ) |
Gets the capability string of a module.
m | the module |
References module_t::psz_capability.
Referenced by module_provides(), module_unneed(), vlc_filter_UnloadModule(), and vlc_module_store().
const char * module_get_help | ( | const module_t * | m | ) |
Gets the help text for a module.
m | the module |
References module_t::psz_help.
const char * module_get_help_html | ( | const module_t * | m | ) |
Gets the help HTML for a module.
m | the module |
References module_t::psz_help_html.
const char * module_get_name | ( | const module_t * | m, |
bool | longname | ||
) |
Gets the human-friendly name of a module.
m | the module |
longname | TRUE to have the long name of the module |
References module_get_object(), module_t::psz_longname, and module_t::psz_shortname.
Referenced by vlc_rtp_pt_instantiate().
const char * module_get_object | ( | const module_t * | m | ) |
Gets the internal name of a module.
m | the module |
References module_t::i_shortcuts, module_t::pp_shortcuts, and unlikely.
Referenced by config_ListModules(), config_SaveConfigFile(), demux_NewAdvanced(), ListModules(), module_get_name(), module_is_main(), module_match(), module_need(), module_unneed(), Usage(), vlc_filter_LoadModule(), vlc_filter_UnloadModule(), vlc_module_load(), and vout_display_New().
int module_get_score | ( | const module_t * | m | ) |
Gets the precedence of a module.
m | the module return the score for the capability |
References module_t::i_score.
Referenced by vlc_module_match().
const char * module_gettext | ( | const module_t * | m, |
const char * | s | ||
) |
Translates a string using the module's text domain.
m | the module |
s | the American English ASCII string to localize |
References module_t::plugin, vlc_plugin_t::textdomain, and unlikely.
Referenced by config_ListModules(), ListModules(), print_item(), print_section(), and Usage().
|
static |
References module_t::i_shortcuts, name, and module_t::pp_shortcuts.
Referenced by vlc_module_match().
module_t * module_need | ( | vlc_object_t * | obj, |
const char * | cap, | ||
const char * | name, | ||
bool | strict | ||
) |
References vlc_object_t::force, module_get_object(), var_Create(), var_SetString(), and VLC_VAR_STRING.
bool module_provides | ( | const module_t * | m, |
const char * | cap | ||
) |
Checks whether a module implements a capability.
m | the module |
cap | the capability to check |
true | if the module has the capability |
false | if the module has another capability |
References module_get_capability().
void module_unneed | ( | vlc_object_t * | obj, |
module_t * | module | ||
) |
References module_t::deactivate, module_get_capability(), module_get_object(), msg_Dbg, var_Destroy(), and vlc_objres_clear().
module_t *() vlc_module_load | ( | struct vlc_logger * | log, |
const char * | cap, | ||
const char * | name, | ||
bool | strict, | ||
vlc_activate_t | probe, | ||
... | |||
) |
Finds and instantiates the best module of a certain type.
All candidates modules having the specified capability and name will be sorted in decreasing order of priority. Then the probe callback will be invoked for each module, until it succeeds (returns 0), or all candidate module failed to initialize.
The probe callback first parameter is the address of the module entry point. Further parameters are passed as an argument list; it corresponds to the variable arguments passed to this function. This scheme is meant to support arbitrary prototypes for the module entry point.
log | logger for debugging (or NULL to ignore) |
cap | capability, i.e. class of module |
name | name of the module asked, if any |
strict | if true, do not fallback to plugin with a different name but the same capability |
probe | module probe callback |
References module_get_object(), name, unlikely, vlc_debug, VLC_EGENERIC, VLC_ETIMEOUT, vlc_module_map(), vlc_module_match(), and VLC_SUCCESS.
Referenced by demux_NewAdvanced(), vlc_gl_Create(), vlc_gl_CreateOffscreen(), vlc_LogModuleCreate(), vlc_tracer_Create(), and vlc_window_New().
void * vlc_module_map | ( | struct vlc_logger * | log, |
module_t * | mod | ||
) |
Maps a module in memory.
This function attempts to map a given module in memory, if it is not already mapped. If it is already mapped, this function does nothing.
log | message logger |
mod | module to map |
References module_t::plugin, and vlc_plugin_Map().
Referenced by libvlc_AutoRun(), vlc_CPU_functions_init(), vlc_filter_LoadModule(), vlc_module_load(), vlc_rtp_pt_instantiate(), vlc_tls_ClientCreate(), vlc_tls_ServerCreate(), and vout_display_New().
ssize_t vlc_module_match | ( | const char * | capability, |
const char * | names, | ||
bool | strict, | ||
module_t ***restrict | modules, | ||
size_t *restrict | strict_matches | ||
) |
Finds the candidate modules for given criteria.
All candidates modules having the specified capability and name will be sorted in decreasing order of priority and returned in a heap-allocated table.
capability | capability, i.e. class of module |
names | string of comma-separated requested module shortcut names, or NULL for defaults |
strict | whether to exclude modules with no unmatching shortcut names |
modules | storage location for the base address of a sorted table of candidate modules (NULL on error) [OUT] |
strict_matches | storage location for the count of strictly matched modules [OUT] |
References module_get_score(), module_list_cap(), module_match_name(), modules, and unlikely.
Referenced by libvlc_AutoRun(), vlc_CPU_functions_init(), vlc_filter_LoadModule(), vlc_module_load(), vlc_rtp_pt_instantiate(), vlc_tls_ClientCreate(), vlc_tls_ServerCreate(), and vout_display_New().