mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
gst_init: Call gst_init_static_plugins() when available
When doing a static build, gstreamer-full-1.0 defines that symbol to register static plugins. Cerbero's Android build will be updated to implement that symbol too. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/641>
This commit is contained in:
parent
acdb4ce03d
commit
0ed165bf67
1 changed files with 20 additions and 0 deletions
20
gst/gst.c
20
gst/gst.c
|
@ -631,6 +631,24 @@ gst_register_core_elements (GstPlugin * plugin)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
init_static_plugins (void)
|
||||
{
|
||||
GModule *module;
|
||||
|
||||
/* Call gst_init_static_plugins() defined in libgstreamer-full-1.0 in the case
|
||||
* libgstreamer is static linked with some plugins. */
|
||||
module = g_module_open (NULL, G_MODULE_BIND_LOCAL);
|
||||
if (module) {
|
||||
void (*func) (void);
|
||||
if (g_module_symbol (module, "gst_init_static_plugins",
|
||||
(gpointer *) & func)) {
|
||||
func ();
|
||||
}
|
||||
g_module_close (module);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* this bit handles:
|
||||
* - initialization of threads if we use them
|
||||
|
@ -789,6 +807,8 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
|
|||
gst_register_core_elements, VERSION, GST_LICENSE, PACKAGE,
|
||||
GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
|
||||
|
||||
init_static_plugins ();
|
||||
|
||||
/*
|
||||
* Any errors happening below this point are non-fatal, we therefore mark
|
||||
* gstreamer as being initialized, since it is the case from a plugin point of
|
||||
|
|
Loading…
Reference in a new issue