VLC  4.0.0-dev
Data Structures | Functions
entry.c File Reference
Include dependency graph for entry.c:

Data Structures

struct  vlc_plugin_symbol
 

Functions

module_tvlc_module_create (vlc_plugin_t *plugin)
 
void vlc_module_destroy (module_t *module)
 Destroys a module. More...
 
vlc_plugin_tvlc_plugin_create (void)
 
void vlc_plugin_destroy (vlc_plugin_t *plugin)
 Destroys a plug-in. More...
 
static module_config_tvlc_config_create (vlc_plugin_t *plugin, int type)
 
static int vlc_plugin_desc_cb (void *ctx, void *tgt, int propid,...)
 Plug-in descriptor callback. More...
 
vlc_plugin_tvlc_plugin_describe (vlc_plugin_cb entry)
 Runs a plug-in descriptor. More...
 
static int vlc_plugin_symbol_compare (const void *a, const void *b)
 
static int vlc_plugin_gpa_cb (void *ctx, void *tgt, int propid,...)
 Plug-in symbols callback. More...
 
static void * vlc_plugin_get_symbols (vlc_plugin_cb entry)
 Gets the symbols of a plugin. More...
 
static void vlc_plugin_free_symbols (void *root)
 
static int vlc_plugin_get_symbol (void *root, const char *name, void **restrict addrp)
 
int vlc_plugin_resolve (vlc_plugin_t *plugin, vlc_plugin_cb entry)
 

Function Documentation

◆ vlc_config_create()

static module_config_t* vlc_config_create ( vlc_plugin_t plugin,
int  type 
)
static

◆ vlc_module_create()

module_t* vlc_module_create ( vlc_plugin_t plugin)

◆ vlc_module_destroy()

void vlc_module_destroy ( module_t module)

Destroys a module.

References module_t::next, and module_t::pp_shortcuts.

Referenced by vlc_plugin_destroy().

◆ vlc_plugin_create()

vlc_plugin_t* vlc_plugin_create ( void  )

◆ vlc_plugin_desc_cb()

static int vlc_plugin_desc_cb ( void *  ctx,
void *  tgt,
int  propid,
  ... 
)
static

Plug-in descriptor callback.

This callback populates modules, configuration items and properties of a plug-in from the plug-in descriptor.

References module_t::activate_name, module_config_t::b_internal, module_config_t::b_removed, module_config_t::b_safe, module_config_t::b_unsaveable, CONFIG_ITEM, module_t::deactivate, module_t::deactivate_name, module_value_t::f, module_value_t::i, module_config_t::i, module_t::i_score, module_config_t::i_short, module_t::i_shortcuts, module_config_t::i_type, IsConfigFloatType, IsConfigIntegerType, IsConfigStringType, module_config_t::list, module_config_t::list_count, module_config_t::list_text, module_config_t::max, module_config_t::min, vlc_plugin_t::module, MODULE_SHORTCUT_MAX, name, module_config_t::orig, module_t::pf_activate, module_t::pp_shortcuts, module_value_t::psz, module_config_t::psz, module_t::psz_capability, module_t::psz_help, module_t::psz_longname, module_config_t::psz_longtext, module_config_t::psz_name, module_t::psz_shortname, module_config_t::psz_text, module_config_t::psz_type, strdup(), vlc_plugin_t::textdomain, unlikely, module_config_t::value, VLC_CONFIG_CAPABILITY, VLC_CONFIG_CREATE, vlc_config_create(), VLC_CONFIG_DESC, VLC_CONFIG_LIST, VLC_CONFIG_NAME, VLC_CONFIG_PRIVATE, VLC_CONFIG_RANGE, VLC_CONFIG_REMOVED, VLC_CONFIG_SAFE, VLC_CONFIG_SHORTCUT, VLC_CONFIG_VALUE, VLC_CONFIG_VOLATILE, VLC_MODULE_CAPABILITY, VLC_MODULE_CB_CLOSE, VLC_MODULE_CB_OPEN, VLC_MODULE_CREATE, vlc_module_create(), VLC_MODULE_DESCRIPTION, VLC_MODULE_HELP, VLC_MODULE_NAME, VLC_MODULE_NO_UNLOAD, VLC_MODULE_SCORE, VLC_MODULE_SHORTCUT, VLC_MODULE_SHORTNAME, VLC_MODULE_TEXTDOMAIN, and xmalloc().

Referenced by vlc_plugin_describe().

◆ vlc_plugin_describe()

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().

◆ vlc_plugin_destroy()

void vlc_plugin_destroy ( vlc_plugin_t plugin)

Destroys a plug-in.

Warning
If the plug-in was dynamically loaded in memory, the library handle and associated memory mappings and linker resources will be leaked.

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().

◆ vlc_plugin_free_symbols()

static void vlc_plugin_free_symbols ( void *  root)
static

References tdestroy().

Referenced by vlc_plugin_resolve().

◆ vlc_plugin_get_symbol()

static int vlc_plugin_get_symbol ( void *  root,
const char *  name,
void **restrict  addrp 
)
static

◆ vlc_plugin_get_symbols()

static void* vlc_plugin_get_symbols ( vlc_plugin_cb  entry)
static

Gets the symbols of a plugin.

This function generates a list of symbol names and addresses for a given plugin descriptor. The result can be used with vlc_plugin_get_symbol() to resolve a symbol name to an address.

The result must be freed with vlc_plugin_free_symbols(). The result is only meaningful until the plugin is unloaded.

References tdestroy(), and vlc_plugin_gpa_cb().

Referenced by vlc_plugin_resolve().

◆ vlc_plugin_gpa_cb()

static int vlc_plugin_gpa_cb ( void *  ctx,
void *  tgt,
int  propid,
  ... 
)
static

Plug-in symbols callback.

This callback generates a mapping of plugin symbol names to symbol addresses.

References vlc_plugin_symbol::addr, vlc_plugin_symbol::name, name, tsearch(), unlikely, VLC_MODULE_CB_CLOSE, VLC_MODULE_CB_OPEN, and vlc_plugin_symbol_compare().

Referenced by vlc_plugin_get_symbols().

◆ vlc_plugin_resolve()

int vlc_plugin_resolve ( vlc_plugin_t plugin,
vlc_plugin_cb  entry 
)

◆ vlc_plugin_symbol_compare()

static int vlc_plugin_symbol_compare ( const void *  a,
const void *  b 
)
static