[vlc-commits] EGL: resync platforms with Khronos registry and rationalize build rules

Rémi Denis-Courmont git at videolan.org
Sun Nov 3 15:26:14 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov  2 23:03:22 2013 +0200| [762ba6a9e80464f3c1112ea20d7853d2a9d1988f] | committer: Rémi Denis-Courmont

EGL: resync platforms with Khronos registry and rationalize build rules

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

 configure.ac                    |   17 +++++++----------
 modules/video_output/Modules.am |   17 ++++++++---------
 modules/video_output/egl.c      |   15 +++++----------
 3 files changed, 20 insertions(+), 29 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2c3d8c8..4a8099c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2926,6 +2926,13 @@ EXTEND_HELP_STRING([Video plugins:])
 dnl
 dnl  OpenGL
 dnl
+PKG_CHECK_MODULES([EGL], [egl], [
+  have_egl="yes"
+], [
+  have_egl="no"
+])
+AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
+
 PKG_CHECK_MODULES([GL], [gl], [
   have_gl="yes"
 ], [
@@ -2952,16 +2959,6 @@ PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled]
 dnl OpenGL ES 1: depends on EGL 1.0
 PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [disabled])
 
-AC_ARG_ENABLE(egl,
-  [  --enable-egl            OpenGL support through EGL (default disabled)],, [
-  enable_egl="no"
-])
-AS_IF([test "$enable_egl" != "no"], [
-  PKG_CHECK_MODULES([EGL], [egl], [
-    VLC_ADD_PLUGIN([egl])
-  ])
-])
-
 dnl
 dnl  Xlib
 dnl
diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index ba75995..3cea9e8 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -81,6 +81,10 @@ libxcb_window_plugin_la_CFLAGS = $(AM_CFLAGS) \
 	$(XPROTO_CFLAGS) $(XCB_CFLAGS) $(XCB_KEYSYMS_CFLAGS)
 libxcb_window_plugin_la_LIBADD = $(XPROTO_LIBS) $(XCB_LIBS) $(XCB_KEYSYMS_LIBS)
 
+libglx_plugin_la_SOURCES = glx.c
+libglx_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
+libglx_plugin_la_LIBADD = $(GL_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
+
 if HAVE_XCB
 noinst_LTLIBRARIES += libvlc_xcb_events.la
 vout_LTLIBRARIES += libxcb_x11_plugin.la libxcb_window_plugin.la
@@ -163,18 +167,13 @@ libegl_plugin_la_SOURCES = egl.c
 libegl_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS)
 libegl_plugin_la_LIBADD = $(EGL_LIBS)
 if !HAVE_WIN32
-if !HAVE_DARWIN
+if !HAVE_ANDROID
 libegl_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
 endif
 endif
-libegl_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
-EXTRA_LTLIBRARIES += libegl_plugin.la
-vout_LTLIBRARIES += $(LTLIBegl)
-
-### GLX ###
-libglx_plugin_la_SOURCES = glx.c
-libglx_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
-libglx_plugin_la_LIBADD = $(GL_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
+if HAVE_EGL
+vout_LTLIBRARIES += libegl_plugin.la
+endif
 
 ### Coloured ASCII art ###
 libcaca_plugin_la_SOURCES = caca.c
diff --git a/modules/video_output/egl.c b/modules/video_output/egl.c
index e8bc6be..b8983f8 100644
--- a/modules/video_output/egl.c
+++ b/modules/video_output/egl.c
@@ -110,24 +110,19 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
 {
     vlc_gl_t *gl = (vlc_gl_t *)obj;
 
-    /* <EGL/eglplatform.h> defines the list and order of platforms */
+    /* http://www.khronos.org/registry/egl/api/EGL/eglplatform.h defines the
+     * list and order of EGL platforms. */
 #if defined(_WIN32) || defined(__VC32__) \
- && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+ && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
 # define vlc_eglGetWindow(w) ((w)->handle.hwnd)
 
 #elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
 # error Symbian EGL not supported.
 
-#elif defined(WL_EGL_PLATFORM)
-# error Wayland EGL not supported.
-
-#elif defined(__GBM__)
-# error Glamor EGL not supported.
-
-#elif defined(ANDROID)
+#elif defined(__ANDROID__) || defined(ANDROID)
 # error Android EGL not supported
 
-#elif defined(__unix__) /* X11 */
+#elif defined(__unix__) /* X11 (tentative) */
 # define vlc_eglGetWindow(w) ((w)->handle.xid)
     /* EGL can only use the default X11 display */
     if (gl->surface->display.x11 != NULL)



More information about the vlc-commits mailing list