VLC  4.0.0-dev
modules.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * modules.h : Module management functions.
3  *****************************************************************************
4  * Copyright (C) 2001-2016 VLC authors and VideoLAN
5  *
6  * Authors: Samuel Hocevar <sam@zoy.org>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22 
23 #ifndef LIBVLC_MODULES_H
24 # define LIBVLC_MODULES_H 1
25 
26 # include <stdatomic.h>
27 
28 /** VLC plugin */
29 typedef struct vlc_plugin_t
30 {
31  struct vlc_plugin_t *next;
33  unsigned modules_count;
34 
35  const char *textdomain; /**< gettext domain (or NULL) */
36 
37  /**
38  * Variables set by the module to store its config options
39  */
40  struct
41  {
42  module_config_t *items; /**< Table of configuration items */
43  size_t size; /**< Total count of all items */
44  size_t count; /**< Count of real options (excludes hints) */
45  size_t booleans; /**< Count of options that are of boolean type */
46  } conf;
47 
48 #ifdef HAVE_DYNAMIC_PLUGINS
49  bool unloadable; /**< Whether the plug-in can be unloaded safely */
50  atomic_uintptr_t handle; /**< Run-time linker handle (or nul) */
51  char *abspath; /**< Absolute path */
52 
53  char *path; /**< Relative path (within plug-in directory) */
54  int64_t mtime; /**< Last modification time */
55  uint64_t size; /**< File size */
56 #endif
57 } vlc_plugin_t;
58 
59 /**
60  * List of all plug-ins.
61  */
62 extern struct vlc_plugin_t *vlc_plugins;
63 
64 #define MODULE_SHORTCUT_MAX 20
65 
66 /** Plugin entry point prototype */
67 typedef int (*vlc_plugin_cb) (int (*)(void *, void *, int, ...), void *);
68 
69 /** Plugin deactivation callback */
70 typedef void (*vlc_deactivate_cb)(vlc_object_t*);
71 
72 /** Core module */
73 int vlc_entry__core (int (*)(void *, void *, int, ...), void *);
74 
75 /**
76  * Internal module descriptor
77  */
78 struct module_t
79 {
80  vlc_plugin_t *plugin; /**< Plug-in/library containing the module */
82 
83  /** Shortcuts to the module */
84  unsigned i_shortcuts;
85  const char **pp_shortcuts;
86 
87  /*
88  * Variables set by the module to identify itself
89  */
90  const char *psz_shortname; /**< Module name */
91  const char *psz_longname; /**< Module descriptive name */
92  const char *psz_help; /**< Long help string for "special" modules */
93 
94  const char *psz_capability; /**< Capability */
95  int i_score; /**< Score for the capability */
96 
97  /* Callbacks */
98  const char *activate_name;
99  const char *deactivate_name;
100  void *pf_activate;
102 };
103 
108 
111 
112 void module_InitBank (void);
114 #define module_LoadPlugins(a) module_LoadPlugins(VLC_OBJECT(a))
115 void module_EndBank (bool);
116 int vlc_plugin_Map(struct vlc_logger *, vlc_plugin_t *);
117 void *vlc_plugin_Symbol(struct vlc_logger *, vlc_plugin_t *, const char *name);
118 
119 /**
120  * Lists of all VLC modules with a given capability.
121  *
122  * The list is sorted by decreasing module score.
123  *
124  * @param list pointer to the table of modules [OUT]
125  * @param name name of capability of modules to look for
126  * @return the number of modules in the list (possibly zero)
127  */
128 size_t module_list_cap(module_t *const **, const char *);
129 
130 int vlc_bindtextdomain (const char *);
131 
132 /* Low-level OS-dependent handler */
133 
134 /**
135  * Loads a dynamically linked library.
136  *
137  * \param path library file path
138  * \param lazy whether to resolve the symbols lazily
139  * \return a module handle on success, or NULL on error.
140  */
141 void *vlc_dlopen(const char *path, bool) VLC_USED;
142 
143 /**
144  * Unloads a dynamic library.
145  *
146  * This function unloads a previously opened dynamically linked library
147  * using a system dependent method.
148  * \param handle handle of the library
149  * \retval 0 on success
150  * \retval -1 on error (none are defined though)
151  */
152 int vlc_dlclose(void *);
153 
154 /**
155  * Looks up a symbol from a dynamically loaded library
156  *
157  * This function looks for a named symbol within a loaded library.
158  *
159  * \param handle handle to the library
160  * \param name function name
161  * \return the address of the symbol on success, or NULL on error
162  *
163  * \note If the symbol address is NULL, errors cannot be detected. However,
164  * normal symbols such as function or global variables cannot have NULL as
165  * their address.
166  */
167 void *vlc_dlsym(void *handle, const char *) VLC_USED;
168 
169 /**
170  * Formats an error message for vlc_dlopen() or vlc_dlsym().
171  *
172  * \return a heap-allocated nul-terminated error string, or NULL.
173  */
174 char *vlc_dlerror(void) VLC_USED;
175 
176 /* Plugins cache */
177 vlc_plugin_t *vlc_cache_load(vlc_object_t *, const char *, block_t **);
178 vlc_plugin_t *vlc_cache_lookup(vlc_plugin_t **, const char *relpath);
179 
180 void CacheSave(vlc_object_t *, const char *, vlc_plugin_t *const *, size_t);
181 
182 #endif /* !LIBVLC_MODULES_H */
vlc_plugin_cb
int(* vlc_plugin_cb)(int(*)(void *, void *, int,...), void *)
Plugin entry point prototype.
Definition: modules.h:67
module_config_t::psz_name
const char * psz_name
Option name.
Definition: vlc_configuration.h:86
vlc_module_match
ssize_t vlc_module_match(const char *capability, const char *names, bool strict, module_t ***restrict modules, size_t *restrict strict_matches)
Finds the candidate modules for given criteria.
Definition: modules.c:105
caches
block_t * caches
Definition: bank.c:97
vlc_readdir
const char * vlc_readdir(DIR *dir)
Reads the next file name from an open directory.
Definition: filesystem.c:126
vlc_plugins
struct vlc_plugin_t * vlc_plugins
List of all plug-ins.
Definition: bank.c:102
count
size_t count
Definition: core.c:401
sout_AccessOutControl
noreturn int sout_AccessOutControl(sout_access_out_t *out, int query,...)
Definition: missing.c:45
xml_reader_t::p_stream
stream_t * p_stream
Definition: vlc_xml.h:71
VLC_MODULE_SCORE
@ VLC_MODULE_SCORE
Definition: vlc_plugin.h:43
VLC_MODULE_SHORTCUT
@ VLC_MODULE_SHORTCUT
Definition: vlc_plugin.h:41
var_Create
int() var_Create(vlc_object_t *p_this, const char *psz_name, int i_type)
Creates a VLC object variable.
Definition: variables.c:291
vlc_config_create
static module_config_t * vlc_config_create(vlc_plugin_t *plugin, int type)
Definition: entry.c:140
vlc_memstream
In-memory stream object.
Definition: vlc_memstream.h:41
block_ChainRelease
static void block_ChainRelease(block_t *p_block)
Definition: vlc_block.h:358
VLC_CONFIG_LIST
@ VLC_CONFIG_LIST
Definition: vlc_plugin.h:101
realpath
char * realpath(const char *restrict pathname, char *restrict resolved_path)
leaf
@ leaf
Definition: vlc_fixups.h:505
var_InheritBool
static bool var_InheritBool(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:675
module_list_get
module_t ** module_list_get(size_t *n)
Gets the flat list of VLC modules.
Definition: bank.c:765
xml_Create
xml_t * xml_Create(vlc_object_t *p_this)
Definition: xml.c:39
update_Download
noreturn void update_Download(update_t *u, const char *dir)
Download the file given in the update_t.
Definition: missing.c:265
strcasecmp
int strcasecmp(const char *, const char *)
psz_name
const char * psz_name
Definition: text_style.c:53
vlc_stat
int vlc_stat(const char *filename, struct stat *buf)
Finds file/inode information - like stat().
Definition: filesystem.c:173
sout_AccessOutNew
sout_access_out_t * sout_AccessOutNew(vlc_object_t *obj, const char *access, const char *name)
Definition: missing.c:58
vlc_plugin_t::conf
struct vlc_plugin_t::@96 conf
Variables set by the module to store its config options.
vlc_cleanup_t
struct vlc_cleanup_t vlc_cleanup_t
Definition: vlc_threads.h:784
vlc_plugin_Map
int vlc_plugin_Map(struct vlc_logger *log, vlc_plugin_t *plugin)
Definition: bank.c:620
libvlc_int_t
Definition: vlc_objects.h:114
vlc_plugin_symbol
Definition: entry.c:456
VLC_PKG_LIB_DIR
@ VLC_PKG_LIB_DIR
Package-specific architecture-dependent read-only data directory (e.g.
Definition: vlc_configuration.h:275
VLC_MODULE_DESCRIPTION
@ VLC_MODULE_DESCRIPTION
Definition: vlc_plugin.h:49
module_t::plugin
vlc_plugin_t * plugin
Plug-in/library containing the module.
Definition: modules.h:80
vlc_plugin_t::textdomain
const char * textdomain
gettext domain (or NULL)
Definition: modules.h:55
unlikely
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:227
VLC_CONFIG_DESC
@ VLC_CONFIG_DESC
Definition: vlc_plugin.h:92
vlc_common.h
vlc_module_destroy
void vlc_module_destroy(module_t *)
Destroys a module.
Definition: entry.c:82
vlc_vlm.h
vlc_plugin_create
vlc_plugin_t * vlc_plugin_create(void)
Definition: entry.c:94
module_t::pp_shortcuts
const char ** pp_shortcuts
Definition: modules.h:85
vlm_MessageNew
vlm_message_t * vlm_MessageNew(const char *a, const char *fmt,...)
Definition: missing.c:222
VLC_CONFIG_CAPABILITY
@ VLC_CONFIG_CAPABILITY
Definition: vlc_plugin.h:80
vlc_plugin_symbol_compare
static int vlc_plugin_symbol_compare(const void *a, const void *b)
Definition: entry.c:462
module_get_capability
const char * module_get_capability(const module_t *m)
Gets the capability string of a module.
Definition: modules.c:72
vlc_logger
Definition: messages.c:54
module_config_t::psz_text
const char * psz_text
Short comment on the configuration option.
Definition: vlc_configuration.h:87
module_t::activate_name
const char * activate_name
Definition: modules.h:98
module_get_object
const char * module_get_object(const module_t *m)
Gets the internal name of a module.
Definition: modules.c:50
DIR_SEP
#define DIR_SEP
Definition: vlc_common.h:1221
module_config_t::list_text
const char ** list_text
Human-readable names for list values.
Definition: vlc_configuration.h:102
module_gettext
const char * module_gettext(const module_t *m, const char *str)
Translates a string using the module's text domain.
Definition: modules.c:82
VLC_CONFIG_CREATE
@ VLC_CONFIG_CREATE
Definition: vlc_plugin.h:36
vlc_mutex_assert
#define vlc_mutex_assert(m)
Asserts that a mutex is locked by the calling thread.
Definition: vlc_threads.h:328
sout_stream_t
Definition: vlc_sout.h:184
module_unneed
void module_unneed(vlc_object_t *obj, module_t *module)
Definition: modules.c:298
IsConfigIntegerType
#define IsConfigIntegerType(type)
Definition: configuration.h:47
vlm_Delete
noreturn void vlm_Delete(vlm_t *vlm)
Definition: missing.c:188
block_t::i_buffer
size_t i_buffer
Payload length.
Definition: vlc_block.h:122
VLC_CONFIG_VOLATILE
@ VLC_CONFIG_VOLATILE
Definition: vlc_plugin.h:68
vlc_plugin_t
VLC plugin.
Definition: modules.h:29
vlc_object_t::logger
struct vlc_logger * logger
Definition: vlc_objects.h:45
vlc_activate_t
int(* vlc_activate_t)(void *func, bool forced, va_list args)
Definition: vlc_modules.h:32
module_need
module_t * module_need(vlc_object_t *obj, const char *cap, const char *name, bool strict)
Definition: modules.c:282
sout_AccessOutDelete
noreturn void sout_AccessOutDelete(sout_access_out_t *out)
Definition: missing.c:51
sout_MuxFlush
noreturn void sout_MuxFlush(sout_mux_t *mux, sout_input_t *input)
Definition: missing.c:147
update_NeedUpgrade
noreturn bool update_NeedUpgrade(update_t *u)
Definition: missing.c:259
module_list_cap
size_t module_list_cap(module_t *const **, const char *)
Lists of all VLC modules with a given capability.
VLC_CONFIG_RANGE
@ VLC_CONFIG_RANGE
Definition: vlc_plugin.h:62
module_config_t::i
const int * i
Table of possible integer choices.
Definition: vlc_configuration.h:100
vlc_plugin_destroy
void vlc_plugin_destroy(vlc_plugin_t *)
Destroys a plug-in.
Definition: entry.c:122
VLC_MODULE_TEXTDOMAIN
@ VLC_MODULE_TEXTDOMAIN
Definition: vlc_plugin.h:51
module_t::i_shortcuts
unsigned i_shortcuts
Shortcuts to the module.
Definition: modules.h:84
sout_input_t
Definition: vlc_sout.h:140
module_config_t::b_internal
unsigned b_internal
Hidden from preferences and help.
Definition: vlc_configuration.h:80
VLC_CONFIG_PRIVATE
@ VLC_CONFIG_PRIVATE
Definition: vlc_plugin.h:74
module_config_t::orig
module_value_t orig
Default value.
Definition: vlc_configuration.h:91
vlc_plugin_t::module
module_t * module
Definition: modules.h:52
module_list_free
void module_list_free(module_t **list)
Frees the flat list of VLC modules.
Definition: bank.c:754
vlc_plugin_Map
int vlc_plugin_Map(struct vlc_logger *, vlc_plugin_t *)
Definition: bank.c:620
module_EndBank
void module_EndBank(bool b_plugins)
Unloads all unused plugin modules and empties the module bank in case of success.
Definition: bank.c:677
vlc_spawnp
int vlc_spawnp(pid_t *pid, const char *path, const int *fds, const char *const *args)
Spawn a child process.
Definition: missing.c:299
module_LoadPlugins
#define module_LoadPlugins(a)
Definition: modules.h:114
module_exists
bool module_exists(const char *psz_name)
Checks if a module exists.
Definition: modules.c:332
sout_AccessOutWrite
noreturn ssize_t sout_AccessOutWrite(sout_access_out_t *out, block_t *block)
Definition: missing.c:78
update_Delete
noreturn void update_Delete(update_t *u)
Delete an update_t struct.
Definition: missing.c:247
modules
static struct @95 modules
vlc_modcap_sort
static void vlc_modcap_sort(const void *node, const VISIT which, const int depth)
Definition: bank.c:82
MODULE_SHORTCUT_MAX
#define MODULE_SHORTCUT_MAX
Definition: modules.h:64
module_value_t::psz
char * psz
Definition: vlc_configuration.h:62
vlm_ExecuteCommand
noreturn int vlm_ExecuteCommand(vlm_t *vlm, const char *cmd, vlm_message_t **pm)
Definition: missing.c:194
module_InitBank
void module_InitBank(void)
Init bank.
Definition: bank.c:645
msg_Dbg
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:106
vlc_plugin_describe
vlc_plugin_t * vlc_plugin_describe(vlc_plugin_cb)
Runs a plug-in descriptor.
Definition: entry.c:442
vlc_dlerror
char * vlc_dlerror(void) VLC_USED
Formats an error message for vlc_dlopen() or vlc_dlsym().
Definition: plugin.c:65
vlc_plugin_resolve
int vlc_plugin_resolve(vlc_plugin_t *, vlc_plugin_cb)
Definition: entry.c:580
module_provides
bool module_provides(const module_t *m, const char *cap)
Checks whether a module implements a capability.
Definition: modules.c:45
postorder
@ postorder
Definition: vlc_fixups.h:503
vlc_viewpoint_t
Viewpoints.
Definition: vlc_viewpoint.h:41
sout_StreamChainDelete
noreturn void sout_StreamChainDelete(sout_stream_t *first, sout_stream_t *end)
Definition: missing.c:153
vlc_threads.h
VLC_EGENERIC
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:474
VLC_MODULE_SHORTNAME
@ VLC_MODULE_SHORTNAME
Definition: vlc_plugin.h:48
IsConfigStringType
#define IsConfigStringType(type)
Definition: configuration.h:45
vlc_plugin_destroy
void vlc_plugin_destroy(vlc_plugin_t *plugin)
Destroys a plug-in.
Definition: entry.c:122
VLC_CONFIG_REMOVED
@ VLC_CONFIG_REMOVED
Definition: vlc_plugin.h:77
vlc_modcap::modc
size_t modc
Definition: bank.c:80
VLC_VAR_STRING
#define VLC_VAR_STRING
Definition: vlc_variables.h:51
getenv
static char * getenv(const char *name)
Definition: vlc_fixups.h:292
VLC_CONFIG_NAME
@ VLC_CONFIG_NAME
Definition: vlc_plugin.h:56
sout_access_out_t
Stream output access_output.
Definition: vlc_sout.h:53
vlc_module_store
static int vlc_module_store(module_t *mod)
Adds a module to the bank.
Definition: bank.c:107
vlm_New
vlm_t * vlm_New(libvlc_int_t *obj, const char *file)
Definition: missing.c:230
VLC_MODULE_NAME
@ VLC_MODULE_NAME
Definition: vlc_plugin.h:47
VLC_STATIC_MUTEX
#define VLC_STATIC_MUTEX
Static initializer for (static) mutex.
Definition: vlc_threads.h:249
vlm_MessageSimpleNew
vlm_message_t * vlm_MessageSimpleNew(const char *a)
Definition: missing.c:216
sout_MuxNew
noreturn sout_mux_t * sout_MuxNew(sout_access_out_t *out, const char *mux)
Definition: missing.c:134
var_Destroy
void() var_Destroy(vlc_object_t *p_this, const char *psz_name)
Destroys a VLC object variable.
Definition: variables.c:382
asprintf
int asprintf(char **, const char *,...)
vlc_module_map
void * vlc_module_map(vlc_logger_t *log, module_t *module)
Maps a module in memory.
Definition: modules.c:185
VLC_CONFIG_SHORTCUT
@ VLC_CONFIG_SHORTCUT
Definition: vlc_plugin.h:83
vlc_mutex_t
Mutex.
Definition: vlc_threads.h:225
update_Check
noreturn void update_Check(update_t *u, void(*cb)(void *, bool), void *opaque)
Check for updates.
Definition: missing.c:253
module_get_score
int module_get_score(const module_t *m)
Gets the precedence of a module.
Definition: modules.c:77
VLC_CONFIG_VALUE
@ VLC_CONFIG_VALUE
Definition: vlc_plugin.h:59
vlc_plugin_Unmap
static void vlc_plugin_Unmap(vlc_plugin_t *plugin)
Definition: bank.c:626
vlc_plugin_t::booleans
size_t booleans
Count of options that are of boolean type.
Definition: modules.h:65
sout_MuxAddStream
noreturn sout_input_t * sout_MuxAddStream(sout_mux_t *mux, const es_format_t *fmt)
Definition: missing.c:109
vlc_sdp_Start
int vlc_sdp_Start(struct vlc_memstream *sdp, vlc_object_t *obj, const char *cfg, const struct sockaddr *src, size_t srclen, const struct sockaddr *addr, size_t addrlen)
Definition: missing.c:168
vlc_waitpid
int vlc_waitpid(pid_t pid)
Waits for a child process.
Definition: missing.c:307
config_SortConfig
int config_SortConfig(void)
Index the configuration items by name for faster lookups.
Definition: core.c:407
msg_Warn
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:104
module_t::psz_help
const char * psz_help
Long help string for "special" modules.
Definition: modules.h:92
module_config_t::owner
void * owner
Origin run-time linker module handle.
Definition: vlc_configuration.h:103
vlc_assert_unreachable
#define vlc_assert_unreachable()
Impossible branch assertion.
Definition: vlc_common.h:253
vlc_fopen
FILE * vlc_fopen(const char *filename, const char *mode)
Opens a FILE pointer.
Definition: filesystem.c:49
vlc_modcap::modv
module_t ** modv
Definition: bank.c:79
block_t::p_next
block_t * p_next
Definition: vlc_block.h:119
update_release_t
Describes an update VLC release number.
Definition: vlc_update.h:40
var_SetString
static int var_SetString(vlc_object_t *p_obj, const char *psz_name, const char *psz_string)
Set the value of a string variable.
Definition: vlc_variables.h:345
module_t::i_score
int i_score
Score for the capability.
Definition: modules.h:95
sout_AccessOutRead
noreturn ssize_t sout_AccessOutRead(sout_access_out_t *out, block_t *block)
Definition: missing.c:66
vlc_error
#define vlc_error(logger,...)
Definition: vlc_messages.h:140
usage
unsigned usage
Definition: bank.c:99
vlc_plugins
vlc_plugin_t * vlc_plugins
List of all plug-ins.
Definition: bank.c:102
VLC_ETIMEOUT
#define VLC_ETIMEOUT
Timeout.
Definition: vlc_common.h:478
module_InitStatic
static vlc_plugin_t * module_InitStatic(vlc_plugin_cb entry)
Registers a statically-linked plug-in.
Definition: bank.c:161
module_config_t::b_unsaveable
unsigned b_unsaveable
Not stored in configuration.
Definition: vlc_configuration.h:81
vlc_plugin_create
vlc_plugin_t * vlc_plugin_create(void)
Definition: entry.c:94
module_t
Internal module descriptor.
Definition: modules.h:78
vlc_entry__core
DLL_SYMBOL int CDECL_SYMBOL vlc_entry__core(vlc_set_cb vlc_set, void *opaque)
Core module.
Definition: libvlc-module.c:1533
es_format_t
Definition: vlc_es.h:617
vlc_plugin_t
struct vlc_plugin_t vlc_plugin_t
VLC plugin.
sout_StreamChainNew
noreturn sout_stream_t * sout_StreamChainNew(vlc_object_t *sout, const char *chain, sout_stream_t *next)
Definition: missing.c:160
module_config_t::max
module_value_t max
Maximum value (for scalars only)
Definition: vlc_configuration.h:93
module_t::pf_activate
void * pf_activate
Definition: modules.h:100
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
vlm_t
Definition: vlm_internal.h:77
vlc_dlsym
void * vlc_dlsym(void *handle, const char *) VLC_USED
Looks up a symbol from a dynamically loaded library.
Definition: plugin.c:57
sout_AnnounceUnRegister
noreturn void sout_AnnounceUnRegister(vlc_object_t *obj, session_descriptor_t *d)
Definition: missing.c:95
PATH_SEP
#define PATH_SEP
Definition: vlc_common.h:1223
xml_t::p_module
module_t * p_module
Definition: vlc_xml.h:42
block_FilePath
block_t * block_FilePath(const char *path, bool write)
Maps a file in memory.
Definition: block.c:433
module_t::psz_longname
const char * psz_longname
Module descriptive name.
Definition: modules.h:91
vlc_plugin_desc_cb
static int vlc_plugin_desc_cb(void *ctx, void *tgt, int propid,...)
Plug-in descriptor callback.
Definition: entry.c:187
sout_AccessOutSeek
noreturn int sout_AccessOutSeek(sout_access_out_t *out, off_t offset)
Definition: missing.c:72
vlc_strerror_c
const char * vlc_strerror_c(int errnum)
Definition: error.c:34
vlc_viewpoint_t::yaw
float yaw
Definition: vlc_viewpoint.h:42
getpid
pid_t getpid(void)
vlc_xml.h
config
static struct @10 config
vlc_bindtextdomain
int vlc_bindtextdomain(const char *)
Definition: textdomain.c:33
vlc_viewpoint_t::roll
float roll
Definition: vlc_viewpoint.h:44
vlc_plugin_Symbol
void * vlc_plugin_Symbol(struct vlc_logger *, vlc_plugin_t *, const char *name)
Definition: bank.c:631
vlc_plugin.h
vlc_deactivate_cb
void(* vlc_deactivate_cb)(vlc_object_t *)
Plugin deactivation callback.
Definition: modules.h:70
config_Free
void config_Free(module_config_t *, size_t)
Destroys an array of configuration items.
Definition: core.c:467
vlc_objres_clear
void vlc_objres_clear(vlc_object_t *obj)
Releases all resources of an object.
Definition: objres.c:84
vlc_modcap_cmp
static int vlc_modcap_cmp(const void *a, const void *b)
Definition: bank.c:59
encoder_t
Definition: vlc_codec.h:242
module_get_help
const char * module_get_help(const module_t *m)
Gets the help text for a module.
Definition: modules.c:67
module_EndBank
void module_EndBank(bool)
Unloads all unused plugin modules and empties the module bank in case of success.
Definition: bank.c:677
vlc_opendir
DIR * vlc_opendir(const char *dirname)
Opens a DIR pointer.
Definition: filesystem.c:110
strtok_r
char * strtok_r(char *, const char *, char **)
sout_MuxGetStream
noreturn int sout_MuxGetStream(sout_mux_t *mux, unsigned n, vlc_tick_t *date)
Definition: missing.c:128
stream_t
stream_t definition
Definition: vlc_stream.h:46
vlm_Control
noreturn int vlm_Control(vlm_t *vlm, int query,...)
Definition: missing.c:181
vlc_plugin_t::modules_count
unsigned modules_count
Definition: modules.h:53
vlc_plugin_t::size
size_t size
Total count of all items.
Definition: modules.h:63
modules.h
sout_EncoderCreate
encoder_t * sout_EncoderCreate(vlc_object_t *p_this, size_t owner_size)
Definition: missing.c:103
vlc_plugin_store
static void vlc_plugin_store(vlc_plugin_t *lib)
Adds a plugin (and all its modules) to the bank.
Definition: bank.c:147
sout_mux_t
Muxer structure.
Definition: vlc_sout.h:101
vlc_plugin_t::next
struct vlc_plugin_t * next
Definition: modules.h:51
xml_Delete
void xml_Delete(xml_t *p_xml)
Definition: xml.c:59
VISIT
VISIT
Definition: vlc_fixups.h:501
VLC_MODULE_NO_UNLOAD
@ VLC_MODULE_NO_UNLOAD
Definition: vlc_plugin.h:46
vlc_module_create
module_t * vlc_module_create(vlc_plugin_t *plugin)
Definition: entry.c:40
vlc_plugin_get_symbols
static void * vlc_plugin_get_symbols(vlc_plugin_cb entry)
Gets the symbols of a plugin.
Definition: entry.c:542
vlc_viewpoint_to_4x4
void vlc_viewpoint_to_4x4(const vlc_viewpoint_t *vp, float *m)
Generate the 4x4 transform matrix corresponding to a viewpoint.
Definition: viewpoint.c:29
xml_t
Definition: vlc_xml.h:37
vlc_plugin_gpa_cb
static int vlc_plugin_gpa_cb(void *ctx, void *tgt, int propid,...)
Plug-in symbols callback.
Definition: entry.c:475
VLC_MODULE_HELP
@ VLC_MODULE_HELP
Definition: vlc_plugin.h:50
VLC_CONFIG_SAFE
@ VLC_CONFIG_SAFE
Definition: vlc_plugin.h:89
vlc_fs.h
vlc_plugin_get_symbol
static int vlc_plugin_get_symbol(void *root, const char *name, void **restrict addrp)
Definition: entry.c:560
CONFIG_ITEM_BOOL
#define CONFIG_ITEM_BOOL
Definition: vlc_plugin.h:123
vlc_sout.h
xmalloc
static void * xmalloc(size_t len)
Definition: vlc_common.h:1175
sout_AnnounceRegisterSDP
session_descriptor_t * sout_AnnounceRegisterSDP(vlc_object_t *obj, const char *sdp, const char *dst)
Definition: missing.c:85
vlc_plugin_resolve
int vlc_plugin_resolve(vlc_plugin_t *plugin, vlc_plugin_cb entry)
Definition: entry.c:580
vlm_MessageAdd
noreturn vlm_message_t * vlm_MessageAdd(vlm_message_t *a, vlm_message_t *b)
Definition: missing.c:203
vlc_plugin_t::items
module_config_t * items
Table of configuration items.
Definition: modules.h:62
vlc_modcap_free
static void vlc_modcap_free(void *data)
Definition: bank.c:65
config_UnsortConfig
void config_UnsortConfig(void)
Definition: core.c:441
module_config_get
module_config_t * module_config_get(const module_t *module, unsigned *restrict psize)
Gets the table of module configuration items.
Definition: modules.c:337
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
vlc_plugin_describe
vlc_plugin_t * vlc_plugin_describe(vlc_plugin_cb entry)
Runs a plug-in descriptor.
Definition: entry.c:442
update_t
The update object.
Definition: update.h:158
IsConfigFloatType
#define IsConfigFloatType(type)
Definition: configuration.h:49
module_config_t
Configuration item.
Definition: vlc_configuration.h:76
xml_reader_t::p_module
module_t * p_module
Definition: vlc_xml.h:72
vlc_plugin_t::count
size_t count
Count of real options (excludes hints)
Definition: modules.h:64
module_config_t::b_removed
unsigned b_removed
Obsolete.
Definition: vlc_configuration.h:83
VLC_UNUSED
#define VLC_UNUSED(x)
Definition: vlc_common.h:1105
module_config_t::psz_type
const char * psz_type
Configuration subtype.
Definition: vlc_configuration.h:85
module_t::psz_capability
const char * psz_capability
Capability.
Definition: modules.h:94
tdestroy
void tdestroy(void *root, void(*free_node)(void *nodep))
vlc_modcap::name
char * name
Definition: bank.c:78
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:472
vlc_plugin_Symbol
void * vlc_plugin_Symbol(struct vlc_logger *log, vlc_plugin_t *plugin, const char *name)
Definition: bank.c:631
vlc_modcap_t
struct vlc_modcap vlc_modcap_t
vlc_plugin_symbol::name
const char * name
Definition: entry.c:458
VLC_MODULE_CREATE
@ VLC_MODULE_CREATE
Definition: vlc_plugin.h:35
strdup
char * strdup(const char *)
tfind
void * tfind(const void *key, void *const *rootp, int(*cmp)(const void *, const void *))
module_config_t::min
module_value_t min
Minimum value (for scalars only)
Definition: vlc_configuration.h:92
module_get_name
const char * module_get_name(const module_t *m, bool long_name)
Gets the human-friendly name of a module.
Definition: modules.c:57
config_GetSysPath
char * config_GetSysPath(vlc_sysdir_t type, const char *filename)
Gets an installation directory.
Definition: specific.c:306
VLC_USED
#define VLC_USED
Definition: fourcc_gen.c:32
vlc_update.h
vlc_cache_load
vlc_plugin_t * vlc_cache_load(vlc_object_t *, const char *, block_t **)
VLC_MODULE_CB_OPEN
@ VLC_MODULE_CB_OPEN
Definition: vlc_plugin.h:44
vlc_custom_create
#define vlc_custom_create(o, s, n)
Definition: libvlc.h:117
vlc_module_cmp
static int vlc_module_cmp(const void *a, const void *b)
Definition: bank.c:74
vlc_modcap
Definition: bank.c:52
vlc_block.h
vlc_mutex_lock
void vlc_mutex_lock(vlc_mutex_t *mtx)
Acquires a mutex.
Definition: threads.c:158
list
module_config_t ** list
Definition: core.c:400
caps_tree
void * caps_tree
Definition: bank.c:98
VLC_WEAK
#define VLC_WEAK
Weak symbol annotation.
Definition: vlc_common.h:198
name
const char name[16]
Definition: httpd.c:1268
VLC_API_VERSION_STRING
#define VLC_API_VERSION_STRING
Current plugin ABI version.
Definition: vlc_plugin.h:196
module_config_t::list
union module_config_t::@194 list
Possible choices.
vlc_spawn
int vlc_spawn(pid_t *pid, const char *file, const int *fds, const char *const *args)
Spawn a child process (by file name).
Definition: missing.c:291
entry
Definition: fourcc_gen.c:51
xml_ReaderDelete
void xml_ReaderDelete(xml_reader_t *reader)
Deletes an XML reader.
Definition: xml.c:95
module_value_t::i
int64_t i
Definition: vlc_configuration.h:63
vlc_spawn.h
vlc_plugin_free_symbols
static void vlc_plugin_free_symbols(void *root)
Definition: entry.c:555
module_config_t::value
module_value_t value
Current value.
Definition: vlc_configuration.h:90
vlc_dlopen
void * vlc_dlopen(const char *path, bool) VLC_USED
Loads a dynamically linked library.
Definition: plugin.c:40
xrealloc
static void * xrealloc(void *ptr, size_t len)
Definition: vlc_common.h:1183
VLC_MODULE_CAPABILITY
@ VLC_MODULE_CAPABILITY
Definition: vlc_plugin.h:42
vlc_cache_lookup
vlc_plugin_t * vlc_cache_lookup(vlc_plugin_t **, const char *relpath)
vlc_control_cancel
noreturn void vlc_control_cancel(vlc_cleanup_t *cleaner)
Internal handler for thread cancellation.
Definition: missing.c:280
sout_MuxSendBuffer
noreturn int sout_MuxSendBuffer(sout_mux_t *mux, sout_input_t *input, block_t *block)
Definition: missing.c:140
module_InitStaticModules
static void module_InitStaticModules(void)
Definition: bank.c:184
vlc_unlink
int vlc_unlink(const char *filename)
Removes a file.
Definition: filesystem.c:183
module_value_t::f
float f
Definition: vlc_configuration.h:64
vlc_rename
int vlc_rename(const char *oldpath, const char *newpath)
Moves a file atomically.
Definition: filesystem.c:197
configuration.h
module_match_name
static bool module_match_name(const module_t *m, const char *name, size_t len)
Definition: modules.c:95
module_InitBank
void module_InitBank(void)
Init bank.
Definition: bank.c:645
xml_reader_t
Definition: vlc_xml.h:66
module_config_t::list_count
uint16_t list_count
Choices count.
Definition: vlc_configuration.h:96
vlc_object_t::force
bool force
Module probe flag.
Definition: vlc_objects.h:58
xml_ReaderCreate
xml_reader_t * xml_ReaderCreate(vlc_object_t *obj, stream_t *stream)
Creates an XML reader.
Definition: xml.c:73
vlc_static_modules
vlc_plugin_cb vlc_static_modules[]
module_config_t::psz_longtext
const char * psz_longtext
Long comment on the configuration option.
Definition: vlc_configuration.h:88
lock
vlc_mutex_t lock
Definition: bank.c:96
module_config_t::i_type
uint8_t i_type
Configuration type.
Definition: vlc_configuration.h:78
CacheSave
void CacheSave(vlc_object_t *, const char *, vlc_plugin_t *const *, size_t)
module_config_t::psz
const char ** psz
Table of possible string choices.
Definition: vlc_configuration.h:99
vlc_module_create
module_t * vlc_module_create(vlc_plugin_t *)
Definition: entry.c:40
libvlc.h
vlc_dlclose
int vlc_dlclose(void *)
Unloads a dynamic library.
Definition: plugin.c:52
vlm_message_t
Definition: vlc_vlm.h:176
update_New
update_t *() update_New(vlc_object_t *obj)
Create a new update VLC struct.
Definition: missing.c:241
vlc_viewpoint.h
sout_MuxDeleteStream
noreturn void sout_MuxDeleteStream(sout_mux_t *mux, sout_input_t *input)
Definition: missing.c:122
module_list_cap
size_t module_list_cap(module_t *const **restrict list, const char *name)
Definition: bank.c:790
vlc_object_delete
#define vlc_object_delete(obj)
Definition: vlc_objects.h:136
module_t::psz_shortname
const char * psz_shortname
Module name.
Definition: modules.h:90
module_config_t::i_short
char i_short
Optional short option name.
Definition: vlc_configuration.h:79
likely
#define likely(p)
Predicted true condition.
Definition: vlc_common.h:218
tsearch
void * tsearch(const void *key, void **rootp, int(*cmp)(const void *, const void *))
block_t::p_buffer
uint8_t * p_buffer
Payload start.
Definition: vlc_block.h:121
session_descriptor_t
Definition: sap.c:48
module_config_free
void module_config_free(module_config_t *config)
Releases the configuration items table.
Definition: modules.c:372
vlc_arrays.h
module_t::deactivate
vlc_deactivate_cb deactivate
Definition: modules.h:101
vlc_plugin_symbol::addr
void * addr
Definition: entry.c:459
vlc_module_load
module_t *() vlc_module_load(struct vlc_logger *log, const char *capability, const char *name, bool strict, vlc_activate_t probe,...)
Finds and instantiates the best module of a certain type.
Definition: modules.c:210
module_t::next
module_t * next
Definition: modules.h:81
twalk
void twalk(const void *root, void(*action)(const void *nodep, VISIT which, int depth))
module_t::deactivate_name
const char * deactivate_name
Definition: modules.h:99
vlc_alloc
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:1144
realloc_or_free
static void * realloc_or_free(void *p, size_t sz)
This wrapper around realloc() will free the input pointer when realloc() returns NULL.
Definition: vlc_arrays.h:47
module_unneed
#define module_unneed(a, b)
Definition: vlc_modules.h:126
vlm_MessageDelete
noreturn void vlm_MessageDelete(vlm_message_t *m)
Definition: missing.c:210
block_Release
void block_Release(block_t *block)
Releases a block.
Definition: block.c:135
vlc_mutex_unlock
void vlc_mutex_unlock(vlc_mutex_t *mtx)
Releases a mutex.
Definition: threads.c:209
block_t
Definition: vlc_block.h:117
msg_Err
#define msg_Err(p_this,...)
Definition: vlc_messages.h:102
vlc_entry__core
int vlc_entry__core(int(*)(void *, void *, int,...), void *)
Core module.
Definition: libvlc-module.c:1533
CONFIG_ITEM
#define CONFIG_ITEM(x)
Definition: vlc_plugin.h:136
vlc_viewpoint_t::pitch
float pitch
Definition: vlc_viewpoint.h:43
update_GetRelease
noreturn update_release_t * update_GetRelease(update_t *u)
Definition: missing.c:271
module_need
#define module_need(a, b, c, d)
Definition: vlc_modules.h:111
module_LoadPlugins
void module_LoadPlugins(vlc_object_t *obj)
Loads module descriptions for all available plugins.
Definition: bank.c:724
p
#define p(t)
vlc_modules.h
sout_MuxDelete
noreturn void sout_MuxDelete(sout_mux_t *mux)
Definition: missing.c:116
module_config_t::b_safe
unsigned b_safe
Safe for web plugins and playlist files.
Definition: vlc_configuration.h:82
vlc_debug
#define vlc_debug(logger,...)
Definition: vlc_messages.h:142
generic_start
static int generic_start(void *func, bool forced, va_list ap)
Definition: modules.c:268
module_find
module_t * module_find(const char *name)
Get a pointer to a module_t given it's name.
Definition: modules.c:309
vlc_module_destroy
void vlc_module_destroy(module_t *module)
Destroys a module.
Definition: entry.c:82
VLC_MODULE_CB_CLOSE
@ VLC_MODULE_CB_CLOSE
Definition: vlc_plugin.h:45