gstreamer-full: keep g_module_symbol to init plugins

In Android use case, the flag GST_FULL_COMPILATION
is not defined whereas the plugins need to be
initialized using 'gst_init_static_plugins'
method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4777>
This commit is contained in:
Stéphane Cerveau 2023-06-06 10:54:36 +02:00 committed by GStreamer Marge Bot
parent a7dd69f371
commit e6cd58bc3c

View file

@ -627,6 +627,20 @@ init_static_plugins (void)
{
#ifdef GST_FULL_COMPILATION
gst_init_static_plugins ();
#else
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);
}
#endif
}