[vlc-devel] [PATCH 06/13] vout: move OpenGL sources

Thomas Guillem thomas at gllm.fr
Mon Dec 12 17:03:47 CET 2016


Use a specific directory for OpenGL sources.
---
 modules/video_output/Makefile.am                   | 22 +++++++++++-----------
 modules/video_output/caopengllayer.m               |  2 +-
 modules/video_output/gl.c                          |  2 +-
 modules/video_output/ios2.m                        |  2 +-
 modules/video_output/macosx.m                      |  2 +-
 .../{opengl.c => opengl/vout_helper.c}             |  6 +++---
 .../{opengl.h => opengl/vout_helper.h}             |  8 ++++----
 modules/video_output/win32/common.h                |  2 +-
 modules/video_output/win32/glwin32.c               |  2 +-
 modules/video_output/win32/wgl.c                   |  2 +-
 10 files changed, 25 insertions(+), 25 deletions(-)
 rename modules/video_output/{opengl.c => opengl/vout_helper.c} (99%)
 rename modules/video_output/{opengl.h => opengl/vout_helper.h} (95%)

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index b92b0c5..702e348 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -2,6 +2,8 @@ voutdir = $(pluginsdir)/video_output
 vout_LTLIBRARIES =
 
 EXTRA_DIST += video_output/README
+OPENGL_DISPLAY_SOURCES = video_output/opengl/vout_helper.c \
+	video_output/opengl/vout_helper.h
 
 if HAVE_DECKLINK
 libdecklinkoutput_plugin_la_SOURCES = video_output/decklink.cpp
@@ -11,17 +13,18 @@ vout_LTLIBRARIES += libdecklinkoutput_plugin.la
 endif
 
 if HAVE_OSX
-libvout_macosx_plugin_la_SOURCES = video_output/macosx.m video_output/opengl.c video_output/opengl.h
+libvout_macosx_plugin_la_SOURCES = video_output/macosx.m $(OPENGL_DISPLAY_SOURCES)
 libvout_macosx_plugin_la_CFLAGS = $(AM_CFLAGS)
 libvout_macosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)' -Wl,-framework,OpenGL,-framework,Cocoa
 
-libcaopengllayer_plugin_la_SOURCES = video_output/caopengllayer.m video_output/opengl.c video_output/opengl.h
+libcaopengllayer_plugin_la_SOURCES = video_output/caopengllayer.m \
+	$(OPENGL_DISPLAY_SOURCES)
 libcaopengllayer_plugin_la_CFLAGS = $(AM_CFLAGS)
 libcaopengllayer_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)' -Wl,-framework,OpenGL,-framework,Cocoa,-framework,QuartzCore
 vout_LTLIBRARIES += libvout_macosx_plugin.la libcaopengllayer_plugin.la
 endif
 
-libvout_ios2_plugin_la_SOURCES = video_output/ios2.m video_output/opengl.h video_output/opengl.c
+libvout_ios2_plugin_la_SOURCES = video_output/ios2.m $(OPENGL_DISPLAY_SOURCES)
 libvout_ios2_plugin_la_CFLAGS = $(AM_CFLAGS)
 libvout_ios2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)' -Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit
 if HAVE_IOS
@@ -32,8 +35,7 @@ vout_LTLIBRARIES += libvout_ios2_plugin.la
 endif
 
 ### OpenGL ###
-libgles2_plugin_la_SOURCES = video_output/opengl.c video_output/opengl.h \
-	video_output/gl.c
+libgles2_plugin_la_SOURCES = $(OPENGL_DISPLAY_SOURCES) video_output/gl.c
 libgles2_plugin_la_CFLAGS = $(AM_CFLAGS) $(GLES2_CFLAGS) -DUSE_OPENGL_ES2
 libgles2_plugin_la_LIBADD = $(GLES2_LIBS) $(LIBM)
 libgles2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
@@ -41,8 +43,7 @@ libgles2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
 EXTRA_LTLIBRARIES += libgles2_plugin.la
 vout_LTLIBRARIES += $(LTLIBgles2)
 
-libgl_plugin_la_SOURCES = video_output/opengl.c video_output/opengl.h \
-	video_output/gl.c
+libgl_plugin_la_SOURCES = $(OPENGL_DISPLAY_SOURCES) video_output/gl.c
 libgl_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
 libgl_plugin_la_LIBADD = $(GL_LIBS) $(LIBM)
 if HAVE_GL
@@ -189,13 +190,12 @@ vout_LTLIBRARIES += $(LTLIBdirectdraw)
 EXTRA_LTLIBRARIES += libdirectdraw_plugin.la
 endif
 
-libglwin32_plugin_la_SOURCES = video_output/win32/glwin32.c \
-	video_output/opengl.c video_output/opengl.h \
+libglwin32_plugin_la_SOURCES = $(OPENGL_DISPLAY_SOURCES) \
+	video_output/win32/glwin32.c \
 	video_output/win32/common.c video_output/win32/common.h \
 	video_output/win32/events.c video_output/win32/events.h \
 	video_output/win32/win32touch.c video_output/win32/win32touch.h
-libwgl_plugin_la_SOURCES = video_output/win32/wgl.c \
-        video_output/opengl.c video_output/opengl.h
+libwgl_plugin_la_SOURCES = video_output/win32/wgl.c $(OPENGL_DISPLAY_SOURCES)
 
 libglwin32_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-DMODULE_NAME_IS_glwin32
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index c7d7898..912239e 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -41,7 +41,7 @@
 #import <OpenGL/OpenGL.h>
 #import <dlfcn.h>               /* dlsym */
 
-#include "opengl.h"
+#include "opengl/vout_helper.h"
 
 #define OSX_EL_CAPITAN (NSAppKitVersionNumber >= 1404)
 
diff --git a/modules/video_output/gl.c b/modules/video_output/gl.c
index 0441326..4146b80 100644
--- a/modules/video_output/gl.c
+++ b/modules/video_output/gl.c
@@ -31,7 +31,7 @@
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>
 #include <vlc_opengl.h>
-#include "opengl.h"
+#include "opengl/vout_helper.h"
 
 /* Plugin callbacks */
 static int Open (vlc_object_t *);
diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
index e91c624..8189162 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -46,7 +46,7 @@
 #import <vlc_vout_display.h>
 #import <vlc_opengl.h>
 #import <vlc_dialog.h>
-#import "opengl.h"
+#import "opengl/vout_helper.h"
 
 /**
  * Forward declarations
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index de5b475..a8751ea 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -47,7 +47,7 @@
 #include <vlc_vout_display.h>
 #include <vlc_opengl.h>
 #include <vlc_dialog.h>
-#include "opengl.h"
+#include "opengl/vout_helper.h"
 
 #define OSX_EL_CAPITAN (NSAppKitVersionNumber >= 1404)
 
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl/vout_helper.c
similarity index 99%
rename from modules/video_output/opengl.c
rename to modules/video_output/opengl/vout_helper.c
index ff3ee7fb..f5e178e 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -1,7 +1,7 @@
 /*****************************************************************************
- * opengl.c: OpenGL and OpenGL ES output common code
+ * vout_helper.c: OpenGL and OpenGL ES output common code
  *****************************************************************************
- * Copyright (C) 2004-2013 VLC authors and VideoLAN
+ * Copyright (C) 2004-2016 VLC authors and VideoLAN
  * Copyright (C) 2009, 2011 Laurent Aimar
  *
  * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
@@ -39,7 +39,7 @@
 #include <vlc_memory.h>
 #include <vlc_vout.h>
 
-#include "opengl.h"
+#include "vout_helper.h"
 
 #ifndef GL_CLAMP_TO_EDGE
 # define GL_CLAMP_TO_EDGE 0x812F
diff --git a/modules/video_output/opengl.h b/modules/video_output/opengl/vout_helper.h
similarity index 95%
rename from modules/video_output/opengl.h
rename to modules/video_output/opengl/vout_helper.h
index e7de09b..d334ed8 100644
--- a/modules/video_output/opengl.h
+++ b/modules/video_output/opengl/vout_helper.h
@@ -1,7 +1,7 @@
 /*****************************************************************************
- * opengl.h: OpenGL vout_display helpers
+ * vout_helper.h: OpenGL vout_display helpers
  *****************************************************************************
- * Copyright (C) 2004-2013 VLC authors and VideoLAN
+ * Copyright (C) 2004-2016 VLC authors and VideoLAN
  * Copyright (C) 2009 Laurent Aimar
  *
  * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
@@ -26,8 +26,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef VLC_OPENGL_H
-#define VLC_OPENGL_H
+#ifndef VLC_OPENGL_VOUT_HELPER_H
+#define VLC_OPENGL_VOUT_HELPER_H
 
 #include <vlc_common.h>
 #include <vlc_picture_pool.h>
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index d6d942c..6a00321 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -36,7 +36,7 @@
 # include <d3dx9effect.h>
 #endif
 #if defined(MODULE_NAME_IS_glwin32) || defined(MODULE_NAME_IS_wgl)
-# include "../opengl.h"
+# include "../opengl/vout_helper.h"
 #endif
 #if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
 # include <dxgidebug.h>
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index d5b51e2..8dace96 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -31,7 +31,7 @@
 #include <windows.h>
 
 #define GLEW_STATIC
-#include "../opengl.h"
+#include "../opengl/vout_helper.h"
 #include <GL/wglew.h>
 
 #include "common.h"
diff --git a/modules/video_output/win32/wgl.c b/modules/video_output/win32/wgl.c
index dba1029..95a67b6 100644
--- a/modules/video_output/win32/wgl.c
+++ b/modules/video_output/win32/wgl.c
@@ -28,7 +28,7 @@
 #include <vlc_vout_display.h>
 #include <vlc_opengl.h>
 
-#include "../opengl.h"
+#include "../opengl/vout_helper.h"
 #include <GL/wglew.h>
 
 #include "common.h"
-- 
2.10.2



More information about the vlc-devel mailing list