VLC
4.0.0-dev
|
This file defines functions for modules in vlc. More...
Go to the source code of this file.
Macros | |
#define | vlc_module_load(ctx, cap, name, strict, ...) |
#define | module_need(a, b, c, d) module_need(VLC_OBJECT(a),b,c,d) |
#define | module_need_var(a, b, c) module_need_var(VLC_OBJECT(a),b,c) |
#define | module_unneed(a, b) module_unneed(VLC_OBJECT(a),b) |
#define | module_GetLongName(m) module_get_name( m, true ) |
#define | module_get_main(a) module_get_main() |
Typedefs | |
typedef int(* | vlc_activate_t) (void *func, bool forced, va_list args) |
Functions | |
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. More... | |
module_t * | module_need (vlc_object_t *, const char *, const char *, bool) |
static module_t * | module_need_var (vlc_object_t *obj, const char *cap, const char *varname) |
void | module_unneed (vlc_object_t *, module_t *) |
bool | module_exists (const char *) |
Checks if a module exists. More... | |
module_t * | module_find (const char *name) |
Get a pointer to a module_t given it's name. More... | |
module_config_t * | module_config_get (const module_t *module, unsigned *restrict psize) |
Gets the table of module configuration items. More... | |
void | module_config_free (module_config_t *tab) |
Releases the configuration items table. More... | |
void | module_list_free (module_t **) |
Frees the flat list of VLC modules. More... | |
module_t ** | module_list_get (size_t *n) |
Gets the flat list of VLC modules. More... | |
bool | module_provides (const module_t *m, const char *cap) |
Checks whether a module implements a capability. More... | |
const char * | module_get_object (const module_t *m) |
Gets the internal name of a module. More... | |
const char * | module_get_name (const module_t *m, bool longname) |
Gets the human-friendly name of a module. More... | |
const char * | module_get_help (const module_t *m) |
Gets the help text for a module. More... | |
const char * | module_get_capability (const module_t *m) |
Gets the capability string of a module. More... | |
int | module_get_score (const module_t *m) |
Gets the precedence of a module. More... | |
const char * | module_gettext (const module_t *m, const char *s) |
Translates a string using the module's text domain. More... | |
static module_t * | module_get_main (void) |
static bool | module_is_main (const module_t *p_module) |
This file defines functions for modules in vlc.
#define module_get_main | ( | a | ) | module_get_main() |
#define module_GetLongName | ( | m | ) | module_get_name( m, true ) |
#define module_need | ( | a, | |
b, | |||
c, | |||
d | |||
) | module_need(VLC_OBJECT(a),b,c,d) |
Referenced by access_New(), addons_manager_WriteCatalog(), aout_volume_SetFormat(), CreateConverter(), CreateEncoder(), CreateFilter(), demux_FilterNew(), demux_PacketizerNew(), filter_chain_AppendInner(), filter_ConfigureBlend(), FinderThread(), fingerprinter_Create(), input_item_WriteMeta(), InputSourceMeta(), installOrRemoveAddon(), intf_Create(), InvokeModule(), keystore_create(), libvlc_MlCreate(), LoadLocalStorage(), module_need_var(), sout_AccessOutNew(), sout_MuxNew(), sout_StreamNew(), SpuRenderCreateAndLoadScale(), StreamExtractorAttach(), video_splitter_New(), vlc_inhibit_Create(), vlc_playlist_Export(), vlc_probe(), vlc_rd_new(), vlc_sd_Create(), vlc_stream_FilterNew(), xml_Create(), and xml_ReaderCreate().
#define module_need_var | ( | a, | |
b, | |||
c | |||
) | module_need_var(VLC_OBJECT(a),b,c) |
Referenced by aout_New(), CreateDecoder(), LoadDecoder(), and SpuRenderCreateAndLoadText().
#define module_unneed | ( | a, | |
b | |||
) | module_unneed(VLC_OBJECT(a),b) |
Referenced by addons_manager_WriteCatalog(), aout_Destroy(), aout_FiltersPipelineDestroy(), aout_volume_Delete(), aout_volume_SetFormat(), AppendFilter(), decoder_Clean(), DeleteConverter(), DeleteEncoder(), demux_DestroyDemux(), demux_PacketizerDestroy(), filter_chain_DeleteFilter(), filter_ConfigureBlend(), filter_DeleteBlend(), FilterRelease(), FinderThread(), fingerprinter_Destroy(), input_item_WriteMeta(), InputSourceMeta(), installOrRemoveAddon(), intf_Create(), intf_DestroyAll(), InvokeModule(), libvlc_MlRelease(), LoadLocalStorage(), se_Release(), sout_AccessOutDelete(), sout_MuxDelete(), sout_StreamDelete(), StreamDelete(), video_splitter_Delete(), vlc_access_Destroy(), vlc_inhibit_Destroy(), vlc_keystore_release(), vlc_playlist_Export(), vlc_probe(), vlc_rd_release(), vlc_sd_Destroy(), xml_Delete(), and xml_ReaderDelete().
#define vlc_module_load | ( | ctx, | |
cap, | |||
name, | |||
strict, | |||
... | |||
) |
Referenced by demux_NewAdvanced(), vlc_decoder_device_Create(), vlc_gl_Create(), vlc_LogModuleCreate(), vlc_tls_ClientCreate(), vlc_tls_ServerCreate(), vout_display_New(), and vout_window_New().
typedef int(* vlc_activate_t) (void *func, bool forced, va_list args) |
void module_config_free | ( | module_config_t * | tab | ) |
Releases the configuration items table.
tab | base address of a table returned by module_config_get() |
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 module_config_t::b_internal, module_config_t::b_removed, vlc_plugin_t::conf, config, vlc_plugin_t::items, vlc_plugin_t::module, module_t::plugin, vlc_plugin_t::size, and vlc_alloc().
bool module_exists | ( | const char * | ) |
Checks if a module exists.
name | name of the module |
true | if the module exists |
false | if the module does not exist (in the running installation) |
References module_find().
Referenced by aout_New().
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, module_t::i_shortcuts, list, module_list_free(), module_list_get(), module_t::pp_shortcuts, 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(), 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.
|
inlinestatic |
References module_find().
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 config_ListModules(), demux_filter_enable_disable(), and filter_chain_AppendInner().
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(), ListModules(), module_get_name(), module_is_main(), module_match(), module_need(), module_unneed(), Usage(), and vlc_module_load().
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_load().
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().
|
inlinestatic |
References module_get_object().
void module_list_free | ( | module_t ** | list | ) |
Frees the flat list of VLC modules.
list | list obtained by module_list_get() |
length | number of items on the list |
Referenced by config_ListModules(), ListModules(), module_find(), module_LoadPlugins(), and vlc_module_load().
module_t** module_list_get | ( | size_t * | n | ) |
Gets the flat list of VLC modules.
n | [OUT] pointer to the number of modules |
References vlc_plugin_t::next, module_t::next, and unlikely.
Referenced by ListModules(), module_find(), and module_LoadPlugins().
module_t* module_need | ( | vlc_object_t * | , |
const char * | , | ||
const char * | , | ||
bool | |||
) |
|
inlinestatic |
References list, module_need, and var_InheritString().
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 * | , |
module_t * | |||
) |
References module_t::deactivate, module_get_object(), msg_Dbg, var_Destroy(), and vlc_objres_clear().
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.
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) |
capability | 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 |
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 (or NULL to ignore) |
capability | 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(), module_get_score(), module_list_cap(), module_list_free(), module_load(), module_match_name(), name, strcasecmp(), vlc_debug, VLC_ETIMEOUT, and VLC_SUCCESS.
Referenced by module_need().