From e6cd58bc3c005f77dc0b2edd0a25a8d2c611968a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 6 Jun 2023 10:54:36 +0200 Subject: [PATCH] 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: --- subprojects/gstreamer/gst/gst.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/subprojects/gstreamer/gst/gst.c b/subprojects/gstreamer/gst/gst.c index a2df9847a8..f590b7a0a3 100644 --- a/subprojects/gstreamer/gst/gst.c +++ b/subprojects/gstreamer/gst/gst.c @@ -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 }