summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@collabora.co.uk>2013-08-30 15:53:41 +0100
committerJulien Isorce <julien.isorce@collabora.co.uk>2013-08-30 15:53:41 +0100
commitb3aaa65829c1c540d113de47a8a4a385bdd4a3c9 (patch)
treedb8c87e8f66cb6a1976b47b30effa6879aed890f
parent3448791e5aca86d2e912a145d24f60fde2dd3bbf (diff)
rpi: call bcm_host_init in plugin_init
-rw-r--r--gst-libs/gst/gl/gstglcontext.c7
-rw-r--r--gst/gl/gstopengl.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c
index e14c187..bbf567b 100644
--- a/gst-libs/gst/gl/gstglcontext.c
+++ b/gst-libs/gst/gl/gstglcontext.c
@@ -253,6 +253,10 @@ gst_gl_context_default_get_proc_address (GstGLContext * context,
gpointer ret = NULL;
#ifdef USE_EGL_RPI
+
+ //FIXME: Can't understand why default does not work
+ // so for now retrieve proc addressed manually
+
static GModule *module_egl = NULL;
static GModule *module_glesv2 = NULL;
@@ -281,8 +285,7 @@ gst_gl_context_default_get_proc_address (GstGLContext * context,
static GModule *module = NULL;
if (!module)
- module = g_module_open (NULL /*"/opt/vc/lib/libGLESv2.so" */ ,
- G_MODULE_BIND_LAZY);
+ module = g_module_open (NULL, G_MODULE_BIND_LAZY);
if (module) {
if (!g_module_symbol (module, name, &ret)) {
diff --git a/gst/gl/gstopengl.c b/gst/gl/gstopengl.c
index eb154df..010a96c 100644
--- a/gst/gl/gstopengl.c
+++ b/gst/gl/gstopengl.c
@@ -43,6 +43,10 @@
#include "config.h"
#endif
+#ifdef USE_EGL_RPI
+#include <bcm_host.h>
+#endif
+
#include <gst/gl/gstglconfig.h>
#include "gstglimagesink.h"
@@ -99,6 +103,11 @@ plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_gl_gstgl_debug, "gstopengl", 0, "gstopengl");
+#ifdef USE_EGL_RPI
+ GST_DEBUG ("Initialize BCM host");
+ bcm_host_init ();
+#endif
+
if (!gst_element_register (plugin, "glimagesink",
GST_RANK_MARGINAL, GST_TYPE_GLIMAGE_SINK)) {
return FALSE;