mirror of
https://github.com/obsproject/obs-studio
synced 2024-10-23 16:12:01 +00:00
libobs: Add function to get module lib
This adds a function find module library. Co-authored-by: Stéphane Lepin <stephane.lepin@gmail.com>
This commit is contained in:
parent
16a5ce89aa
commit
99d10c2607
|
@ -308,3 +308,12 @@ plugin modules.
|
|||
:param module: The module associated with the path
|
||||
:param file: The file to get a path to
|
||||
:return: Path string, or NULL if not found. Use bfree to free string
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: void *obs_get_module_lib(obs_module_t *module)
|
||||
|
||||
Returns library file of specified module.
|
||||
|
||||
:param module: The module where to find library file.
|
||||
:return: Pointer to module library.
|
||||
|
|
|
@ -223,6 +223,11 @@ obs_module_t *obs_get_module(const char *name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void *obs_get_module_lib(obs_module_t *module)
|
||||
{
|
||||
return module ? module->module : NULL;
|
||||
}
|
||||
|
||||
char *obs_find_module_file(obs_module_t *module, const char *file)
|
||||
{
|
||||
struct dstr output = {0};
|
||||
|
|
|
@ -429,6 +429,9 @@ EXPORT bool obs_init_module(obs_module_t *module);
|
|||
/** Returns a module based upon its name, or NULL if not found */
|
||||
EXPORT obs_module_t *obs_get_module(const char *name);
|
||||
|
||||
/** Gets library of module */
|
||||
EXPORT void *obs_get_module_lib(obs_module_t *module);
|
||||
|
||||
/** Returns locale text from a specific module */
|
||||
EXPORT bool obs_module_get_locale_string(const obs_module_t *mod,
|
||||
const char *lookup_string,
|
||||
|
|
Loading…
Reference in a new issue