[vlc-commits] modules: export vlc_module_map()
Rémi Denis-Courmont
git at videolan.org
Sat Sep 26 08:44:02 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 24 22:48:57 2020 +0300| [656a30c61a8b405decc7a2c1290933cc717d5c42] | committer: Rémi Denis-Courmont
modules: export vlc_module_map()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=656a30c61a8b405decc7a2c1290933cc717d5c42
---
include/vlc_modules.h | 14 ++++++++++++++
src/libvlccore.sym | 1 +
src/modules/modules.c | 1 -
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/include/vlc_modules.h b/include/vlc_modules.h
index 791bc6d2a4..ade8135265 100644
--- a/include/vlc_modules.h
+++ b/include/vlc_modules.h
@@ -56,6 +56,20 @@ ssize_t vlc_module_match(const char *capability, const char *names,
bool strict, module_t ***restrict modules,
size_t *restrict strict_matches);
+/**
+ * Maps a module in memory.
+ *
+ * This function attempts to map a given module in memory, if it is not
+ * already mapped. If it is already mapped, this function does nothing.
+ *
+ * \param log message logger
+ * \param mod module to map
+ *
+ * \return the module activation function on success, NULL on failure
+ */
+VLC_API
+void *vlc_module_map(struct vlc_logger *log, module_t *mod);
+
/**
* Finds and instantiates the best module of a certain type.
* All candidates modules having the specified capability and name will be
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 961ee48122..4c6c588f73 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -267,6 +267,7 @@ module_need
module_provides
module_unneed
vlc_module_load
+vlc_module_map
vlc_module_match
vlc_memstream_open
vlc_memstream_flush
diff --git a/src/modules/modules.c b/src/modules/modules.c
index 339b893531..9c21fa2b74 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -179,7 +179,6 @@ ssize_t vlc_module_match(const char *capability, const char *names,
return matches;
}
-static
void *vlc_module_map(vlc_logger_t *log, module_t *module)
{
return vlc_plugin_Map(log, module->plugin) ? NULL : module->pf_activate;
More information about the vlc-commits
mailing list