[vlc-commits] EGL: build separate plugins for each windowing system

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov  3 15:37:03 2013 +0200| [2b809cd41c7ab553c31717a65b607fb4942ba119] | committer: Rémi Denis-Courmont

EGL: build separate plugins for each windowing system

This is required to support non-native EGL platforms.

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

 modules/video_output/Modules.am |   31 ++++++++++++++++++-------------
 modules/video_output/egl.c      |    3 +++
 2 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index 3cea9e8..041dc29 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -81,6 +81,11 @@ 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)
 
+libegl_x11_plugin_la_SOURCES = egl.c
+libegl_x11_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_PLATFORM_X11=1
+libegl_x11_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS)
+libegl_x11_plugin_la_LIBADD = $(EGL_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
+
 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
@@ -94,6 +99,9 @@ endif
 if HAVE_XCB_XVIDEO
 vout_LTLIBRARIES += libxcb_xv_plugin.la
 endif
+if HAVE_EGL
+vout_LTLIBRARIES += libegl_x11_plugin.la
+endif
 if HAVE_GL
 vout_LTLIBRARIES += libxcb_glx_plugin.la libglx_plugin.la
 endif
@@ -146,6 +154,16 @@ if HAVE_WIN32
 vout_LTLIBRARIES += libwingdi_plugin.la
 endif
 
+libegl_win32_plugin_la_SOURCES = egl.c
+libegl_win32_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_PLATFORM_WIN32=1
+libegl_win32_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS)
+libegl_win32_plugin_la_LIBADD = $(EGL_LIBS)
+if HAVE_WIN32
+if HAVE_EGL
+vout_LTLIBRARIES += libegl_win32_plugin.la
+endif
+endif
+
 libdrawable_plugin_la_SOURCES = drawable.c
 if HAVE_WIN32
 vout_LTLIBRARIES += libdrawable_plugin.la
@@ -162,19 +180,6 @@ if HAVE_KVA
 vout_LTLIBRARIES += libkva_plugin.la
 endif
 
-### EGL ###
-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_ANDROID
-libegl_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
-endif
-endif
-if HAVE_EGL
-vout_LTLIBRARIES += libegl_plugin.la
-endif
-
 ### Coloured ASCII art ###
 libcaca_plugin_la_SOURCES = caca.c
 libcaca_plugin_la_CFLAGS = $(AM_CFLAGS) $(CACA_CFLAGS)
diff --git a/modules/video_output/egl.c b/modules/video_output/egl.c
index b8983f8..270df09 100644
--- a/modules/video_output/egl.c
+++ b/modules/video_output/egl.c
@@ -49,14 +49,17 @@ vlc_module_begin ()
     set_subcategory (SUBCAT_VIDEO_VOUT)
     set_capability ("opengl", 50)
     set_callbacks (OpenGL, Close)
+    add_shortcut ("egl")
 
     add_submodule ()
     set_capability ("opengl es2", 50)
     set_callbacks (OpenGLES2, Close)
+    add_shortcut ("egl")
 
     add_submodule ()
     set_capability ("opengl es", 50)
     set_callbacks (OpenGLES, Close)
+    add_shortcut ("egl")
 
 vlc_module_end ()
 



More information about the vlc-commits mailing list