VLC
3.0.21
|
Go to the source code of this file.
Data Structures | |
struct | vlc_plugin_t |
VLC plugin. More... | |
struct | module_t |
Internal module descriptor. More... | |
Macros | |
#define | MODULE_SHORTCUT_MAX 20 |
#define | module_LoadPlugins(a) module_LoadPlugins(VLC_OBJECT(a)) |
Typedefs | |
typedef void * | module_handle_t |
The plugin handle type. More... | |
typedef struct vlc_plugin_t | vlc_plugin_t |
VLC plugin. More... | |
typedef int(* | vlc_plugin_cb) (int(*) (void *, void *, int,...), void *) |
Plugin entry point prototype. More... | |
Functions | |
int | vlc_entry__core (int(*)(void *, void *, int,...), void *) |
Core module. More... | |
vlc_plugin_t * | vlc_plugin_create (void) |
void | vlc_plugin_destroy (vlc_plugin_t *) |
Destroys a plug-in. More... | |
module_t * | vlc_module_create (vlc_plugin_t *) |
void | vlc_module_destroy (module_t *) |
Destroys a module. More... | |
vlc_plugin_t * | vlc_plugin_describe (vlc_plugin_cb) |
Runs a plug-in descriptor. More... | |
int | vlc_plugin_resolve (vlc_plugin_t *, vlc_plugin_cb) |
void | module_InitBank (void) |
Init bank. More... | |
size_t | module_LoadPlugins (vlc_object_t *) |
Loads module descriptions for all available plugins. More... | |
void | module_EndBank (bool) |
Unloads all unused plugin modules and empties the module bank in case of success. More... | |
int | module_Map (vlc_object_t *, vlc_plugin_t *) |
ssize_t | module_list_cap (module_t ***, const char *) |
int | vlc_bindtextdomain (const char *) |
int | module_Load (vlc_object_t *, const char *, module_handle_t *, bool) |
Load a dynamically linked library using a system dependent method. More... | |
void * | module_Lookup (module_handle_t, const char *) |
Looks up a symbol from a dynamically loaded library. More... | |
void | module_Unload (module_handle_t) |
CloseModule: unload a dynamic library. More... | |
vlc_plugin_t * | vlc_cache_load (vlc_object_t *, const char *, block_t **) |
vlc_plugin_t * | vlc_cache_lookup (vlc_plugin_t **, const char *relpath) |
void | CacheSave (vlc_object_t *, const char *, vlc_plugin_t *const *, size_t) |
Variables | |
struct vlc_plugin_t * | vlc_plugins |
List of all plug-ins. More... | |
#define module_LoadPlugins | ( | a | ) | module_LoadPlugins(VLC_OBJECT(a)) |
#define MODULE_SHORTCUT_MAX 20 |
typedef void* module_handle_t |
The plugin handle type.
typedef int(* vlc_plugin_cb) (int(*)(void *, void *, int,...), void *) |
Plugin entry point prototype.
typedef struct vlc_plugin_t vlc_plugin_t |
VLC plugin.
void CacheSave | ( | vlc_object_t * | , |
const char * | , | ||
vlc_plugin_t *const * | , | ||
size_t | |||
) |
void module_EndBank | ( | bool | ) |
Unloads all unused plugin modules and empties the module bank in case of success.
References block_ChainRelease(), caches, caps_tree, config_UnsortConfig(), module_Unmap(), modules, vlc_plugin_t::next, tdestroy(), vlc_modcap_free(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_plugin_destroy(), and vlc_plugins.
Referenced by libvlc_InternalCleanup(), and libvlc_InternalInit().
void module_InitBank | ( | void | ) |
Init bank.
Creates a module bank structure which will be filled later on with all the modules found.
References config_SortConfig(), likely, module_InitStatic(), modules, vlc_entry__core(), vlc_mutex_lock(), and vlc_plugin_store().
Referenced by libvlc_InternalInit().
ssize_t module_list_cap | ( | module_t *** | , |
const char * | |||
) |
int module_Load | ( | vlc_object_t * | p_this, |
const char * | path, | ||
module_handle_t * | p_handle, | ||
bool | lazy | ||
) |
Load a dynamically linked library using a system dependent method.
p_this | vlc object |
psz_file | library file |
p_handle | the module handle returned |
p_this | vlc object |
path | library file |
p_handle | the module handle returned |
References GetWindowsError(), LoadLibraryFlags, msg_Warn, and ToLocaleDup.
size_t module_LoadPlugins | ( | vlc_object_t * | obj | ) |
Loads module descriptions for all available plugins.
Fills the module bank structure with the plugin modules.
p_this | vlc object structure |
References config_SortConfig(), config_UnsortConfig(), count, list, module_InitStaticModules(), module_list_free(), module_list_get(), modules, msg_Dbg, twalk(), vlc_modcap_sort(), and vlc_mutex_unlock().
void* module_Lookup | ( | module_handle_t | handle, |
const char * | psz_function | ||
) |
Looks up a symbol from a dynamically loaded library.
This function queries a loaded library for a symbol specified in a string, and returns a pointer to it. We don't check for dlerror() or similar functions, since we want a non-NULL symbol anyway.
handle | handle to the module |
psz_function | function name |
int module_Map | ( | vlc_object_t * | , |
vlc_plugin_t * | |||
) |
Referenced by config_GetIntChoices(), config_GetPszChoices(), and module_load().
void module_Unload | ( | module_handle_t | handle | ) |
CloseModule: unload a dynamic library.
This function unloads a previously opened dynamically linked library using a system dependent method. No return value is taken in consideration, since some libraries sometimes refuse to close properly.
handle | handle of the library |
References RUNNING_ON_VALGRIND.
int vlc_bindtextdomain | ( | const char * | ) |
References asprintf(), config_GetDataDir(), DIR_SEP, ToLocaleDup, and unlikely.
Referenced by libvlc_InternalInit().
vlc_plugin_t* vlc_cache_load | ( | vlc_object_t * | , |
const char * | , | ||
block_t ** | |||
) |
vlc_plugin_t* vlc_cache_lookup | ( | vlc_plugin_t ** | , |
const char * | relpath | ||
) |
int vlc_entry__core | ( | int(*)(void *, void *, int,...) | , |
void * | |||
) |
Core module.
Referenced by module_InitBank().
module_t* vlc_module_create | ( | vlc_plugin_t * | ) |
References module_t::activate_name, module_t::deactivate_name, module_t::i_score, module_t::i_shortcuts, vlc_plugin_t::module, vlc_plugin_t::modules_count, module_t::next, module_t::pf_activate, module_t::pf_deactivate, module_t::plugin, module_t::pp_shortcuts, module_t::psz_capability, module_t::psz_help, module_t::psz_longname, and module_t::psz_shortname.
Referenced by vlc_plugin_desc_cb().
void vlc_module_destroy | ( | module_t * | ) |
Destroys a module.
References module_t::next, and module_t::pp_shortcuts.
Referenced by vlc_plugin_destroy().
vlc_plugin_t* vlc_plugin_create | ( | void | ) |
vlc_plugin_t* vlc_plugin_describe | ( | vlc_plugin_cb | entry | ) |
Runs a plug-in descriptor.
This loads the plug-in meta-data in memory.
References unlikely, vlc_plugin_create(), vlc_plugin_desc_cb(), and vlc_plugin_destroy().
Referenced by module_InitStatic().
void vlc_plugin_destroy | ( | vlc_plugin_t * | plugin | ) |
Destroys a plug-in.
References vlc_plugin_t::conf, config_Free(), vlc_plugin_t::items, vlc_plugin_t::module, vlc_plugin_t::size, and vlc_module_destroy().
Referenced by module_EndBank(), and vlc_plugin_describe().
int vlc_plugin_resolve | ( | vlc_plugin_t * | , |
vlc_plugin_cb | |||
) |
References vlc_plugin_t::conf, module_config_t::i_cb, module_config_t::i_type, IsConfigIntegerType, IsConfigStringType, vlc_plugin_t::items, module_config_t::list, module_config_t::list_cb_name, vlc_plugin_t::module, module_t::next, module_config_t::psz_cb, vlc_plugin_t::size, vlc_plugin_free_symbols(), vlc_plugin_get_symbol(), and vlc_plugin_get_symbols().
struct vlc_plugin_t* vlc_plugins |
List of all plug-ins.
Referenced by config_LoadCmdLine(), config_SaveConfigFile(), module_EndBank(), module_list_get(), and vlc_plugin_store().