eglglessink: For RPi, initialize bcm_host in plugin_init()
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 13 Feb 2013 14:09:35 +0000 (15:09 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 13 Feb 2013 14:22:37 +0000 (15:22 +0100)
ext/eglgles/gsteglglessink.c

index 8622649a5dc6d997c0a2c357b166baf018eccb2d..f930df7a1eb2358bd8d38c581dad2e1351d7443b 100644 (file)
 
 #ifdef USE_EGL_RPI
 #include <bcm_host.h>
-#include <GLES/gl.h>
 #endif
 
 #include "video_platform_wrapper.h"
@@ -1540,10 +1539,6 @@ static gboolean
 gst_eglglessink_init_egl_display (GstEglGlesSink * eglglessink)
 {
   GST_DEBUG_OBJECT (eglglessink, "Enter EGL initial configuration");
-#ifdef USE_EGL_RPI
-  GST_DEBUG_OBJECT (eglglessink, "Initialize BCM host");
-  bcm_host_init ();
-#endif
 
 #ifndef USE_EGL_RPI
   eglglessink->eglglesctx.display = eglGetDisplay (EGL_DEFAULT_DISPLAY);
@@ -3755,6 +3750,11 @@ eglglessink_plugin_init (GstPlugin * plugin)
   GST_DEBUG_CATEGORY_INIT (gst_eglglessink_debug, "eglglessink",
       0, "Simple EGL/GLES Sink");
 
+#ifdef USE_EGL_RPI
+  GST_DEBUG ("Initialize BCM host");
+  bcm_host_init ();
+#endif
+
   return gst_element_register (plugin, "eglglessink", GST_RANK_PRIMARY,
       GST_TYPE_EGLGLESSINK);
 }