VLC  3.0.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
bank.c File Reference
Include dependency graph for bank.c:

Functions

static module_tmodule_InitStatic (vlc_plugin_cb entry)
 Registers a statically-linked plug-in.
static void module_StoreBank (module_t *module)
static void module_InitStaticModules (void)
void module_InitBank (void)
 Init bank.
void module_EndBank (bool b_plugins)
 Unloads all unused plugin modules and empties the module bank in case of success.
size_t module_LoadPlugins (vlc_object_t *obj)
 Loads module descriptions for all available plugins.
void module_list_free (module_t **list)
 Frees the flat list of VLC modules.
module_t ** module_list_get (size_t *n)
 Gets the flat list of VLC modules.
static int modulecmp (const void *a, const void *b)
ssize_t module_list_cap (module_t ***restrict list, const char *cap)
 Builds a sorted list of all VLC modules with a given capability.
int module_Map (vlc_object_t *obj, module_t *module)
 Makes sure the module is loaded in memory.

Variables

struct {
   vlc_mutex_t   lock
   module_t *   head
   unsigned   usage
modules
vlc_plugin_cb vlc_static_modules []

Function Documentation

void module_EndBank ( bool  b_plugins)
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(), module_StoreBank(), modules, vlc_entry__core(), and vlc_mutex_lock().

Referenced by libvlc_InternalInit().

static module_t * module_InitStatic ( vlc_plugin_cb  entry)
static

Registers a statically-linked plug-in.

References module_t::b_loaded, module_t::b_unloadable, unlikely, and vlc_plugin_describe().

Referenced by module_InitBank(), and module_InitStaticModules().

static void module_InitStaticModules ( void  )
static
ssize_t module_list_cap ( module_t ***restrict  list,
const char *  cap 
)

Builds a sorted list of all VLC modules with a given capability.

The list is sorted from the highest module score to the lowest.

Parameters
listpointer to the table of modules [OUT]
capcapability of modules to look for
Returns
the number of matching found, or -1 on error (*list is then NULL).
Note
*list must be freed with module_list_free().

References module_provides(), modulecmp(), modules, module_t::next, module_t::submodule, and unlikely.

Referenced by config_ListModules(), and vlc_module_load().

void module_list_free ( module_t **  list)

Frees the flat list of VLC modules.

Parameters
listlist obtained by module_list_get()
lengthnumber of items on the list
Returns
nothing.

Referenced by config_LoadCmdLine(), config_ResetAll(), config_SaveConfigFile(), config_SortConfig(), ListModules(), module_find(), module_find_by_shortcut(), module_LoadPlugins(), Usage(), and vlc_module_load().

module_t** module_list_get ( size_t *  n)

Gets the flat list of VLC modules.

Parameters
n[OUT] pointer to the number of modules
Returns
table of module pointers (release with module_list_free()), or NULL in case of error (in that case, *n is zeroed).

References modules, module_t::next, module_t::submodule, and unlikely.

Referenced by config_LoadCmdLine(), config_ResetAll(), config_SaveConfigFile(), config_SortConfig(), ListModules(), module_find(), module_find_by_shortcut(), module_LoadPlugins(), and Usage().

size_t module_LoadPlugins ( vlc_object_t obj)

Loads module descriptions for all available plugins.

Fills the module bank structure with the plugin modules.

Parameters
p_thisvlc object structure
Returns
total number of modules in bank after loading all plug-ins

References config_SortConfig(), config_UnsortConfig(), count, list, module_InitStaticModules(), module_list_free(), module_list_get(), modules, msg_Dbg, and vlc_mutex_unlock().

int module_Map ( vlc_object_t obj,
module_t module 
)

Makes sure the module is loaded in memory.

Returns
0 on success, -1 on failure

References module_t::b_loaded, CacheMerge(), msg_Err, module_t::parent, module_t::psz_filename, and vlc_module_destroy().

Referenced by module_load().

static void module_StoreBank ( module_t module)
static
static int modulecmp ( const void *  a,
const void *  b 
)
static

References module_t::i_score.

Referenced by module_list_cap().

Variable Documentation

module_t* head

Referenced by module_EndBank(), and vout_BuildOSDEpg().

struct { ... } modules
unsigned usage
vlc_plugin_cb vlc_static_modules[]