VLC
3.0.15
|
Go to the source code of this file.
Macros | |
#define | vlc_module_load(o, c, n, s, ...) vlc_module_load(VLC_OBJECT(o),c,n,s,__VA_ARGS__) |
#define | vlc_module_unload(o, m, d, ...) vlc_module_unload(VLC_OBJECT(o),m,d,__VA_ARGS__) |
#define | module_need(a, b, c, d) module_need(VLC_OBJECT(a),b,c,d) |
#define | module_unneed(a, b) module_unneed(VLC_OBJECT(a),b) |
#define | module_start(o, m) module_start(VLC_OBJECT(o),m) |
#define | module_stop(o, m) module_stop(VLC_OBJECT(o),m) |
#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, va_list args) |
typedef void(* | vlc_deactivate_t) (void *func, va_list args) |
Functions | |
module_t * | vlc_module_load (vlc_object_t *obj, const char *cap, const char *name, bool strict, vlc_activate_t probe,...) |
Finds and instantiates the best module of a certain type. More... | |
void | vlc_module_unload (vlc_object_t *obj, module_t *, vlc_deactivate_t deinit,...) |
Deinstantiates a module. More... | |
module_t * | module_need (vlc_object_t *, const char *, const char *, bool) |
void | module_unneed (vlc_object_t *, module_t *) |
bool | module_exists (const char *) |
Tell if a module exists. More... | |
module_t * | module_find (const char *) |
Get a pointer to a module_t given it's name. More... | |
int | module_start (vlc_object_t *, const module_t *) |
void | module_stop (vlc_object_t *, const module_t *) |
module_config_t * | module_config_get (const module_t *, unsigned *) |
void | module_config_free (module_config_t *) |
Release the configuration. 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) |
Get the internal name of a module. More... | |
const char * | module_get_name (const module_t *m, bool long_name) |
Get the human-friendly name of a module. More... | |
const char * | module_get_help (const module_t *m) |
Get the help for a module. More... | |
const char * | module_get_capability (const module_t *m) |
Gets the capability of a module. More... | |
int | module_get_score (const module_t *m) |
Get the score for a module. More... | |
const char * | module_gettext (const module_t *, const char *) |
Translate 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) |
#define module_start | ( | o, | |
m | |||
) | module_start(VLC_OBJECT(o),m) |
#define module_stop | ( | o, | |
m | |||
) | module_stop(VLC_OBJECT(o),m) |
#define module_unneed | ( | a, | |
b | |||
) | module_unneed(VLC_OBJECT(a),b) |
#define vlc_module_load | ( | o, | |
c, | |||
n, | |||
s, | |||
... | |||
) | vlc_module_load(VLC_OBJECT(o),c,n,s,__VA_ARGS__) |
#define vlc_module_unload | ( | o, | |
m, | |||
d, | |||
... | |||
) | vlc_module_unload(VLC_OBJECT(o),m,d,__VA_ARGS__) |
typedef int(* vlc_activate_t) (void *func, va_list args) |
typedef void(* vlc_deactivate_t) (void *func, va_list args) |
void module_config_free | ( | module_config_t * | config | ) |
module_config_t* module_config_get | ( | const module_t * | , |
unsigned * | |||
) |
bool module_exists | ( | const char * | psz_name | ) |
Tell if a module exists.
psz_name | th name of the module |
References module_find(), and psz_name.
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(), name, module_t::pp_shortcuts, and unlikely.
Referenced by module_exists().
const char* module_get_capability | ( | const module_t * | m | ) |
Gets the capability 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 | ) |
|
inlinestatic |
const char* module_get_name | ( | const module_t * | m, |
bool | long_name | ||
) |
Get the human-friendly name of a module.
m | the module |
long_name | TRUE to have the long name of the module |
References module_get_object(), module_t::psz_longname, and module_t::psz_shortname.
Referenced by filter_chain_AppendInner().
const char* module_get_object | ( | const module_t * | m | ) |
Get the internal name of a module.
m | the module |
References module_t::i_shortcuts, module_t::pp_shortcuts, and unlikely.
Referenced by config_SaveConfigFile(), ListModules(), module_get_name(), module_is_main(), module_unneed(), and vlc_module_load().
int module_get_score | ( | const module_t * | m | ) |
Get the score for 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 * | str | ||
) |
Translate a string using the module's text domain.
m | the module |
str | the American English ASCII string to localize |
References module_t::plugin, vlc_plugin_t::textdomain, and unlikely.
Referenced by ListModules(), and print_section().
|
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 |
References list.
Referenced by 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, unlikely, and vlc_plugins.
Referenced by ListModules(), module_find(), and module_LoadPlugins().
module_t* module_need | ( | vlc_object_t * | , |
const char * | , | ||
const char * | , | ||
bool | |||
) |
References generic_start(), name, and vlc_module_load().
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 |
References module_get_capability().
int module_start | ( | vlc_object_t * | , |
const module_t * | |||
) |
< No error
References module_t::pf_activate, and VLC_SUCCESS.
void module_stop | ( | vlc_object_t * | , |
const module_t * | |||
) |
References module_t::pf_deactivate.
void module_unneed | ( | vlc_object_t * | , |
module_t * | |||
) |
References generic_stop(), module_get_object(), msg_Dbg, and vlc_module_unload().
module_t* vlc_module_load | ( | vlc_object_t * | obj, |
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.
obj | VLC object |
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 |
< No error
< Timeout
< No error
< Timeout
References vlc_common_members::force, likely, module_get_object(), module_get_score(), module_list_cap(), module_list_free(), module_load(), module_match_name(), msg_Dbg, name, vlc_object_t::obj, strcasecmp(), unlikely, var_InheritString, VLC_ETIMEOUT, vlc_object_set_name, and VLC_SUCCESS.
Referenced by module_need().
void vlc_module_unload | ( | vlc_object_t * | obj, |
module_t * | module, | ||
vlc_deactivate_t | deinit, | ||
... | |||
) |
Deinstantiates a module.
module | the module pointer as returned by vlc_module_load() |
deinit | deactivation callback |
References module_t::pf_deactivate, and vlc_objres_clear().
Referenced by module_unneed().