gl: consolidate egl header includes to egl-only headers
authorMatthew Waters <matthew@centricular.com>
Tue, 16 Jun 2015 07:49:34 +0000 (07:49 +0000)
committerMatthew Waters <matthew@centricular.com>
Tue, 7 Jul 2015 03:12:49 +0000 (13:12 +1000)
They may conflict with other headers.

ext/gl/gstopengl.c
gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h
gst-libs/gst/gl/egl/Makefile.am
gst-libs/gst/gl/egl/gstegl.h [new file with mode: 0644]
gst-libs/gst/gl/egl/gstglcontext_egl.c
gst-libs/gst/gl/egl/gstglcontext_egl.h
gst-libs/gst/gl/egl/gstgldisplay_egl.h
gst-libs/gst/gl/gstglapi.h

index ebc7f13..1fad0a2 100644 (file)
@@ -89,7 +89,7 @@ extern GType gst_ca_opengl_layer_sink_bin_get_type (void);
 #endif
 
 #ifdef USE_EGL_RPI
-#include <bcm_host.h>
+extern void bcm_host_init (void);
 #endif
 
 #if GST_GL_HAVE_WINDOW_X11
index b25c219..bf51613 100644 (file)
 
 #include <gst/video/gstvideosink.h>
 #include <gst/gl/gl.h>
+#include <gst/gl/egl/gstegl.h>
+
+#if defined (USE_EGL_RPI) && defined(__GNUC__)
+#ifndef __VCCOREVER__
+#define __VCCOREVER__ 0x04000000
+#endif
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC optimize ("gnu89-inline")
+#endif
+
 #include <bcm_host.h>
 
+#if defined (USE_EGL_RPI) && defined(__GNUC__)
+#pragma GCC reset_options
+#pragma GCC diagnostic pop
+#endif
+
 G_BEGIN_DECLS
 
 #define GST_GL_TYPE_WINDOW_DISPMANX_EGL         (gst_gl_window_dispmanx_egl_get_type())
index e72aadd..b808178 100644 (file)
@@ -13,7 +13,8 @@ libgstgl_eglincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/egl
 libgstgl_eglinclude_HEADERS = \
        gstgldisplay_egl.h \
        gstglcontext_egl.h \
-       gsteglimagememory.h
+       gsteglimagememory.h \
+       gstegl.h
 
 libgstgl_egl_la_CFLAGS = \
        -I$(top_srcdir)/gst-libs \
diff --git a/gst-libs/gst/gl/egl/gstegl.h b/gst-libs/gst/gl/egl/gstegl.h
new file mode 100644 (file)
index 0000000..4fc2f3d
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * GStreamer
+ * Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GST_EGL_H_
+#define _GST_EGL_H_
+
+#include <gst/gl/gstglconfig.h>
+
+#if defined (USE_EGL_RPI) && defined(__GNUC__)
+#ifndef __VCCOREVER__
+#define __VCCOREVER__ 0x04000000
+#endif
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC optimize ("gnu89-inline")
+#endif
+
+#ifndef EGL_EGLEXT_PROTOTYPES
+#define EGL_EGLEXT_PROTOTYPES 1
+#endif
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#if defined (USE_EGL_RPI) && defined(__GNUC__)
+#pragma GCC reset_options
+#pragma GCC diagnostic pop
+#endif
+
+#endif /* _GST_EGL_H_ */
index 14be7c6..697e7fd 100644 (file)
@@ -29,6 +29,7 @@
  */
 
 #include "gstglcontext_egl.h"
+#include <gst/gl/egl/gstegl.h>
 
 #if GST_GL_HAVE_WINDOW_X11
 #include "../x11/gstglwindow_x11.h"
index 82119fc..76632a3 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <gst/gst.h>
 #include <gst/gl/gl.h>
+#include <gst/gl/egl/gstegl.h>
 
 G_BEGIN_DECLS
 
index 2e47319..18c7e4f 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <gst/gst.h>
 #include <gst/gl/gstgldisplay.h>
+#include <gst/gl/egl/gstegl.h>
 
 G_BEGIN_DECLS
 
index c260590..5f162c4 100644 (file)
 
 #include <gst/gl/gstglconfig.h>
 
-#if GST_GL_HAVE_PLATFORM_EGL
-
-#if defined (USE_EGL_RPI) && defined(__GNUC__)
-#ifndef __VCCOREVER__
-#define __VCCOREVER__ 0x04000000
-#endif
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wredundant-decls"
-#pragma GCC optimize ("gnu89-inline")
-#endif
-
-#ifndef EGL_EGLEXT_PROTOTYPES
-#define EGL_EGLEXT_PROTOTYPES 1
-#endif
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#if defined (USE_EGL_RPI) && defined(__GNUC__)
-#pragma GCC reset_options
-#pragma GCC diagnostic pop
-#endif
-
-#endif
-
 /* OpenGL 2.0 for Embedded Systems */
 #if GST_GL_HAVE_GLES2
 #ifndef GL_GLEXT_PROTOTYPES