[vlc-commits] commit: EGL: initialize Xlib ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Tue Nov 9 20:29:24 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov  9 21:28:30 2010 +0200| [2ae976d96dafd4823c92c8b8abdf4ff6556377f1] | committer: Rémi Denis-Courmont 

EGL: initialize Xlib

P.S.: I haaaaaaaaaaaaaaate Xlib!!!!

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ae976d96dafd4823c92c8b8abdf4ff6556377f1
---

 modules/video_output/Modules.am |    2 +-
 modules/video_output/egl.c      |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index 1701a2e..1e4bef7 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -92,7 +92,7 @@ libegl_plugin_la_CFLAGS = $(AM_CFLAGS) \
 libegl_plugin_la_LIBADD = $(AM_LIBADD) \
 	$(EGL_LIBS) $(GL_LIBS)
 if !HAVE_WIN32
-libegl_plugin_la_LIBADD += -ldl
+libegl_plugin_la_LIBADD += -ldl $(X_LIBS) $(X_PRE_LIBS) -lX11
 endif
 libegl_plugin_la_DEPENDENCIES =
 EXTRA_LTLIBRARIES += libegl_plugin.la
diff --git a/modules/video_output/egl.c b/modules/video_output/egl.c
index 9b800b1..5353051 100644
--- a/modules/video_output/egl.c
+++ b/modules/video_output/egl.c
@@ -33,6 +33,9 @@
 #include <vlc_vout_display.h>
 #include <vlc_vout_opengl.h>
 #include "opengl.h"
+#ifdef __unix__
+# include <vlc_xlib.h>
+#endif
 
 #if USE_OPENGL_ES
 # define VLC_API_NAME "OpenGL_ES"
@@ -139,6 +142,10 @@ static vout_window_t *MakeWindow (vout_display_t *vd, EGLNativeWindowType *id)
  */
 static int Open (vlc_object_t *obj)
 {
+#ifdef __unix__
+    if (!vlc_xlib_init (obj))
+        return VLC_EGENERIC;
+#endif
     vout_display_t *vd = (vout_display_t *)obj;
 
     /* Initialize EGL display */



More information about the vlc-commits mailing list