This file defines functions for modules in vlc. More...
Go to the source code of this file.
Defines | |
| #define | vlc_module_load(o, c, n, s,...) vlc_module_load(VLC_OBJECT(o),c,n,s,__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 | |
| VLC_API module_t * | vlc_module_load (vlc_object_t *obj, const char *cap, const char *name, bool strict, vlc_activate_t probe,...) VLC_USED |
| Finds and instantiates the best module of a certain type. | |
| VLC_API void | vlc_module_unload (module_t *, vlc_deactivate_t deinit,...) |
| Deinstantiates a module. | |
| VLC_API module_t * | module_need (vlc_object_t *, const char *, const char *, bool) VLC_USED |
| VLC_API void | module_unneed (vlc_object_t *, module_t *) |
| VLC_API bool | module_exists (const char *) VLC_USED |
| Tell if a module exists and release it in thic case. | |
| VLC_API module_t * | module_find (const char *) VLC_USED |
| Get a pointer to a module_t given it's name. | |
| int | module_start (vlc_object_t *, const module_t *) |
| void | module_stop (vlc_object_t *, const module_t *) |
| VLC_API module_config_t * | module_config_get (const module_t *, unsigned *) VLC_USED |
| VLC_API void | module_config_free (module_config_t *) |
| Release the configuration. | |
| VLC_API void | module_list_free (module_t **) |
| Frees the flat list of VLC modules. | |
| VLC_API module_t ** | module_list_get (size_t *n) VLC_USED |
| Gets the flat list of VLC modules. | |
| VLC_API bool | module_provides (const module_t *m, const char *cap) |
| Checks whether a module implements a capability. | |
| VLC_API const char * | module_get_object (const module_t *m) VLC_USED |
| Get the internal name of a module. | |
| VLC_API const char * | module_get_name (const module_t *m, bool long_name) VLC_USED |
| Get the human-friendly name of a module. | |
| VLC_API const char * | module_get_help (const module_t *m) VLC_USED |
| Get the help for a module. | |
| VLC_API const char * | module_get_capability (const module_t *m) VLC_USED |
| Get the capability for a module. | |
| VLC_API int | module_get_score (const module_t *m) VLC_USED |
| Get the score for a module. | |
| VLC_API const char * | module_gettext (const module_t *, const char *) VLC_USED |
| Translate a string using the module's text domain. | |
| static VLC_USED module_t * | module_get_main (void) |
| static VLC_USED 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(), aout_InputNew(), aout_MixerNew(), aout_OutputNew(), CreateDecoder(), CreateEncoder(), CreateFilter(), demux_New(), demux_PacketizerNew(), FetchMeta(), filter_chain_AppendFilterInternal(), filter_ConfigureBlend(), FindArt(), FindFilter(), input_item_WriteMeta(), InputSourceMeta(), intf_Create(), libvlc_InternalInit(), osd_ParserLoad(), playlist_Export(), sout_AccessOutNew(), sout_MuxNew(), sout_StreamNew(), SpuRenderCreateAndLoadScale(), SpuRenderCreateAndLoadText(), sql_Create(), stream_FilterNew(), video_splitter_New(), vlc_gl_Create(), vlc_inhibit_Create(), vlc_probe(), vlc_sd_Start(), vlc_tls_ServerCreate(), vlm_ControlMediaAdd(), vout_display_New(), xml_Create(), and xml_ReaderCreate().
| #define module_start | ( | o, | ||
| m | ||||
| ) | module_start(VLC_OBJECT(o),m) |
Referenced by xml_ReaderReset().
| #define module_stop | ( | o, | ||
| m | ||||
| ) | module_stop(VLC_OBJECT(o),m) |
Referenced by xml_ReaderDelete(), and xml_ReaderReset().
| #define module_unneed | ( | a, | ||
| b | ||||
| ) | module_unneed(VLC_OBJECT(a),b) |
Referenced by access_Delete(), aout_FiltersDestroyPipeline(), aout_InputNew(), aout_MixerDelete(), aout_OutputDelete(), aout_OutputNew(), decoder_New(), DeleteDecoder(), DeleteEncoder(), DeleteFilter(), demux_Delete(), demux_PacketizerDestroy(), FetchMeta(), filter_chain_AppendFilterInternal(), filter_chain_DeleteFilterInternal(), filter_ConfigureBlend(), filter_DeleteBlend(), FilterRelease(), FindArt(), input_DecoderDelete(), input_DecoderSetCcState(), input_item_WriteMeta(), InputSourceMeta(), intf_Create(), intf_DestroyAll(), libvlc_InternalCleanup(), libvlc_InternalInit(), osd_ParserUnload(), playlist_Export(), sout_AccessOutDelete(), sout_MuxDelete(), sout_StreamDelete(), sql_Destroy(), StreamDelete(), video_splitter_Delete(), vlc_gl_Destroy(), vlc_inhibit_Destroy(), vlc_probe(), vlc_sd_Stop(), vlc_tls_ServerDelete(), vlm_Delete(), vout_display_Delete(), and xml_Delete().
| #define vlc_module_load | ( | o, | ||
| c, | ||||
| n, | ||||
| s, | ||||
| ... | ||||
| ) | vlc_module_load(VLC_OBJECT(o),c,n,s,__VA_ARGS__) |
Referenced by module_need(), vlc_tls_ClientCreate(), and vout_window_New().
| typedef int(* vlc_activate_t)(void *func, va_list args) |
| typedef void(* vlc_deactivate_t)(void *func, va_list args) |
| VLC_API void module_config_free | ( | module_config_t * | config | ) |
Release the configuration.
| the | configuration |
| VLC_API module_config_t* module_config_get | ( | const module_t * | , | |
| unsigned * | ||||
| ) |
| VLC_API bool module_exists | ( | const char * | psz_name | ) |
Tell if a module exists and release it in thic case.
| psz_name | th name of the module |
References module_find().
Referenced by aout_New().
| VLC_API 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 module_t::i_shortcuts, list, module_list_free(), module_list_get(), module_t::pp_shortcuts, and unlikely.
Referenced by module_exists(), module_get_main(), and vout_EnableFilter().
| VLC_API const char* module_get_capability | ( | const module_t * | m | ) |
Get the capability for a module.
| m | the module return the capability |
References module_t::psz_capability.
| VLC_API const char* module_get_help | ( | const module_t * | m | ) |
| static VLC_USED module_t* module_get_main | ( | void | ) | [inline, static] |
References module_find().
| VLC_API 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_AppendFilterInternal(), and services_discovery_GetLocalizedName().
| VLC_API 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 ListModules(), module_get_name(), module_is_main(), module_unneed(), SaveConfigFile(), Usage(), and vlc_module_load().
| VLC_API 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.
| VLC_API 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::domain, module_t::parent, and unlikely.
Referenced by ListModules(), print_help_section(), and Usage().
| static VLC_USED bool module_is_main | ( | const module_t * | p_module | ) | [inline, static] |
References module_get_object().
| VLC_API 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_AutoSaveConfigFile(), config_LoadCmdLine(), config_ResetAll(), config_SortConfig(), ListModules(), module_find(), module_find_by_shortcut(), module_list_get(), module_LoadPlugins(), SaveConfigFile(), Usage(), and vlc_module_load().
| VLC_API module_t** module_list_get | ( | size_t * | n | ) |
Gets the flat list of VLC modules.
| n | [OUT] pointer to the number of modules or NULL |
References module_list_free(), and modules.
Referenced by config_AutoSaveConfigFile(), config_LoadCmdLine(), config_ResetAll(), config_SortConfig(), ListModules(), module_find(), module_find_by_shortcut(), module_LoadPlugins(), SaveConfigFile(), Usage(), and vlc_module_load().
| VLC_API module_t* module_need | ( | vlc_object_t * | , | |
| const char * | , | |||
| const char * | , | |||
| bool | ||||
| ) |
References generic_start(), and vlc_module_load.
| VLC_API 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_t::psz_capability, and unlikely.
Referenced by vlc_module_load(), and vout_EnableFilter().
| int module_start | ( | vlc_object_t * | , | |
| const module_t * | ||||
| ) |
References module_t::pf_activate.
| void module_stop | ( | vlc_object_t * | , | |
| const module_t * | ||||
| ) |
References module_t::pf_deactivate.
| VLC_API void module_unneed | ( | vlc_object_t * | , | |
| module_t * | ||||
| ) |
References generic_stop(), module_get_object(), msg_Dbg, and vlc_module_unload().
| VLC_API module_t* vlc_module_load | ( | vlc_object_t * | p_this, | |
| const char * | psz_capability, | |||
| const char * | psz_name, | |||
| bool | b_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.
| p_this | VLC object | |
| psz_capability | capability, i.e. class of module | |
| psz_name | name name of the module asked, if any | |
| b_strict | if true, do not fallback to plugin with a different name but the same capability | |
| probe | module probe callback |
References ap, module_list_t::b_force, count, module_list_t::i_score, module_t::i_score, module_t::i_shortcuts, likely, module_get_object(), module_list_free(), module_list_get(), module_Map(), module_provides(), modulecmp(), msg_Dbg, name, module_list_t::p_module, module_t::pf_activate, module_t::pp_shortcuts, strcasecmp(), strdup(), strncasecmp(), va_end(), va_start(), var_CreateGetString, VLC_ETIMEOUT, vlc_object_set_name, and VLC_SUCCESS.
| VLC_API void vlc_module_unload | ( | module_t * | module, | |
| vlc_deactivate_t | deinit, | |||
| ... | ||||
| ) |
Deinstantiates a module.
| module | the module pointer as returned by vlc_module_load() | |
| deinit | deactivation callback |
References ap, module_t::pf_deactivate, va_end(), and va_start().
Referenced by module_unneed(), vlc_tls_ClientCreate(), vlc_tls_ClientDelete(), and vout_window_Delete().
1.7.1