summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2013-07-10 16:03:04 +0100
committerMatthew Waters <ystreet00@gmail.com>2014-03-15 18:36:57 +0100
commitdd7e054e2c0e7d864fd55cffb8310c9a68fd6385 (patch)
tree79a720402c1f3ea4442cf06d52dd0fbaa3ff1c49
parent3c0b9715a958f1184215f794455b73b7c81d4a93 (diff)
downloadgstreamer-plugins-bad-dd7e054e2c0e7d864fd55cffb8310c9a68fd6385.tar.gz
[732/906] build: fix repeated typedefs
Write forward declarations in another way to avoid repeated typedefs "error: redefinition of typedef". Raised when using i686-apple-darwin11-llvm-gcc-4.2 It seems that C apple compiler does not support C11 feature. https://bugzilla.gnome.org/show_bug.cgi?id=703885
-rw-r--r--gst-libs/gst/gl/Makefile.am6
-rw-r--r--gst-libs/gst/gl/gl.h41
-rw-r--r--gst-libs/gst/gl/gstgl_fwd.h56
-rw-r--r--gst-libs/gst/gl/gstglapi.h5
-rw-r--r--gst-libs/gst/gl/gstglbufferpool.c1
-rw-r--r--gst-libs/gst/gl/gstglbufferpool.h3
-rw-r--r--gst-libs/gst/gl/gstgldisplay.c3
-rw-r--r--gst-libs/gst/gl/gstgldisplay.h11
-rw-r--r--gst-libs/gst/gl/gstgldownload.c2
-rw-r--r--gst-libs/gst/gl/gstgldownload.h11
-rw-r--r--gst-libs/gst/gl/gstglegl.c1
-rw-r--r--gst-libs/gst/gl/gstglegl.h2
-rw-r--r--gst-libs/gst/gl/gstglfeature.c3
-rw-r--r--gst-libs/gst/gl/gstglfeature.h2
-rw-r--r--gst-libs/gst/gl/gstglfilter.h2
-rw-r--r--gst-libs/gst/gl/gstglframebuffer.c1
-rw-r--r--gst-libs/gst/gl/gstglframebuffer.h2
-rw-r--r--gst-libs/gst/gl/gstglmemory.c1
-rw-r--r--gst-libs/gst/gl/gstglmemory.h11
-rw-r--r--gst-libs/gst/gl/gstglmixer.h2
-rw-r--r--gst-libs/gst/gl/gstglshader.c1
-rw-r--r--gst-libs/gst/gl/gstglshader.h9
-rw-r--r--gst-libs/gst/gl/gstglupload.c2
-rw-r--r--gst-libs/gst/gl/gstglupload.h11
-rw-r--r--gst-libs/gst/gl/gstglutils.c3
-rw-r--r--gst-libs/gst/gl/gstglutils.h6
-rw-r--r--gst-libs/gst/gl/gstglwindow.c3
-rw-r--r--gst-libs/gst/gl/gstglwindow.h9
-rw-r--r--gst/gl/gstglimagesink.h3
-rw-r--r--gst/gl/gstgltestsrc.h2
30 files changed, 131 insertions, 84 deletions
diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
index a1feb3f2b..e51576292 100644
--- a/gst-libs/gst/gl/Makefile.am
+++ b/gst-libs/gst/gl/Makefile.am
@@ -74,14 +74,16 @@ libgstgl_@GST_API_VERSION@include_HEADERS = \
gstglfilter.h \
gstglmixer.h \
gstglmixerpad.h \
- gstglshadervariables.h \
+ gstglshadervariables.h \
gstglshader.h \
gstgldownload.h \
gstglupload.h \
gstglapi.h \
gstglfeature.h \
gstglutils.h \
- gstglframebuffer.h
+ gstglframebuffer.h \
+ gstgl_fwd.h \
+ gl.h
libgstgl_@GST_API_VERSION@_la_CFLAGS = \
$(GL_CFLAGS) \
diff --git a/gst-libs/gst/gl/gl.h b/gst-libs/gst/gl/gl.h
new file mode 100644
index 000000000..940b6c7a6
--- /dev/null
+++ b/gst-libs/gst/gl/gl.h
@@ -0,0 +1,41 @@
+/*
+ * GStreamer
+ * Copyright (C) 2013 Julien Isorce <julien.isorce@gmail.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 __GL_H__
+#define __GL_H__
+
+#include "gstgl_fwd.h"
+#include "gstglconfig.h"
+#include "gstglapi.h"
+#include "gstgldisplay.h"
+#include "gstglfeature.h"
+#include "gstglutils.h"
+#include "gstglwindow.h"
+#include "gstglshader.h"
+#include "gstglupload.h"
+#include "gstgldownload.h"
+#include "gstglmemory.h"
+#include "gstglbufferpool.h"
+#include "gstglframebuffer.h"
+#include "gstglfilter.h"
+#include "gstglmixer.h"
+#include "gstglshadervariables.h"
+
+#endif /* __GL_H__ */
diff --git a/gst-libs/gst/gl/gstgl_fwd.h b/gst-libs/gst/gl/gstgl_fwd.h
new file mode 100644
index 000000000..f0b049e49
--- /dev/null
+++ b/gst-libs/gst/gl/gstgl_fwd.h
@@ -0,0 +1,56 @@
+/*
+ * GStreamer
+ * Copyright (C) 2013 Julien Isorce <julien.isorce@gmail.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_GL_FWD_H__
+#define __GST_GL_FWD_H__
+
+#include <gst/gst.h>
+
+#include "gstglapi.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GstGLDisplay GstGLDisplay;
+typedef struct _GstGLDisplayClass GstGLDisplayClass;
+typedef struct _GstGLDisplayPrivate GstGLDisplayPrivate;
+
+typedef struct _GstGLWindow GstGLWindow;
+typedef struct _GstGLWindowPrivate GstGLWindowPrivate;
+typedef struct _GstGLWindowClass GstGLWindowClass;
+
+typedef struct _GstGLMemory GstGLMemory;
+typedef struct _GstGLAllocator GstGLAllocator;
+typedef struct _GstGLAllocatorClass GstGLAllocatorClass;
+
+typedef struct _GstGLShader GstGLShader;
+typedef struct _GstGLShaderPrivate GstGLShaderPrivate;
+typedef struct _GstGLShaderClass GstGLShaderClass;
+
+typedef struct _GstGLDownload GstGLDownload;
+typedef struct _GstGLDownloadClass GstGLDownloadClass;
+typedef struct _GstGLDownloadPrivate GstGLDownloadPrivate;
+
+typedef struct _GstGLUpload GstGLUpload;
+typedef struct _GstGLUploadClass GstGLUploadClass;
+typedef struct _GstGLUploadPrivate GstGLUploadPrivate;
+
+G_END_DECLS
+
+#endif /* __GST_GL_FWD_H__ */
diff --git a/gst-libs/gst/gl/gstglapi.h b/gst-libs/gst/gl/gstglapi.h
index ef0f45c32..ee314cff4 100644
--- a/gst-libs/gst/gl/gstglapi.h
+++ b/gst-libs/gst/gl/gstglapi.h
@@ -37,6 +37,7 @@
# if __APPLE__
# include <OpenGL/OpenGL.h>
# include <OpenGL/gl.h>
+# include <OpenGL/glu.h>
# else
# include <GL/glu.h>
# include <GL/gl.h>
@@ -52,10 +53,10 @@
#define GSTGLAPI
#endif
-#include "glprototypes/gstgl_compat.h"
-
#include <gst/gst.h>
+#include "glprototypes/gstgl_compat.h"
+
G_BEGIN_DECLS
typedef enum {
diff --git a/gst-libs/gst/gl/gstglbufferpool.c b/gst-libs/gst/gl/gstglbufferpool.c
index 7409dd502..cef6ea441 100644
--- a/gst-libs/gst/gl/gstglbufferpool.c
+++ b/gst-libs/gst/gl/gstglbufferpool.c
@@ -22,6 +22,7 @@
#include "config.h"
#endif
+#include "gl.h"
#include "gstglbufferpool.h"
/**
diff --git a/gst-libs/gst/gl/gstglbufferpool.h b/gst-libs/gst/gl/gstglbufferpool.h
index 5f75dca94..d4456ba10 100644
--- a/gst-libs/gst/gl/gstglbufferpool.h
+++ b/gst-libs/gst/gl/gstglbufferpool.h
@@ -25,8 +25,7 @@
#include <gst/video/gstvideometa.h>
#include <gst/video/gstvideopool.h>
-#include "gstgldisplay.h"
-#include "gstglmemory.h"
+#include "gstgl_fwd.h"
G_BEGIN_DECLS
diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
index b001f80e7..6a560c141 100644
--- a/gst-libs/gst/gl/gstgldisplay.c
+++ b/gst-libs/gst/gl/gstgldisplay.c
@@ -25,8 +25,7 @@
#include "config.h"
#endif
-#include "gstglmemory.h"
-
+#include "gl.h"
#include "gstgldisplay.h"
GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h
index 3ee6fbc6f..bfe021d5d 100644
--- a/gst-libs/gst/gl/gstgldisplay.h
+++ b/gst-libs/gst/gl/gstgldisplay.h
@@ -24,12 +24,7 @@
#ifndef __GST_GL_DISPLAY_H__
#define __GST_GL_DISPLAY_H__
-#include "gstglconfig.h"
-
-typedef struct _GstGLWindow GstGLWindow;
-
-#include "gstglwindow.h"
-#include "gstglutils.h"
+#include "gstgl_fwd.h"
G_BEGIN_DECLS
@@ -42,10 +37,6 @@ GType gst_gl_display_get_type (void);
#define GST_IS_GL_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_DISPLAY))
#define GST_GL_DISPLAY_CAST(obj) ((GstGLDisplay*)(obj))
-typedef struct _GstGLDisplay GstGLDisplay;
-typedef struct _GstGLDisplayClass GstGLDisplayClass;
-typedef struct _GstGLDisplayPrivate GstGLDisplayPrivate;
-
/**
* GstGLDisplayThreadFunc:
* @display: a #GstGLDisplay
diff --git a/gst-libs/gst/gl/gstgldownload.c b/gst-libs/gst/gl/gstgldownload.c
index fa1a3813e..f7ab88238 100644
--- a/gst-libs/gst/gl/gstgldownload.c
+++ b/gst-libs/gst/gl/gstgldownload.c
@@ -24,8 +24,8 @@
#include <stdio.h>
+#include "gl.h"
#include "gstgldownload.h"
-#include "gstglmemory.h"
/**
* SECTION:gstgldownload
diff --git a/gst-libs/gst/gl/gstgldownload.h b/gst-libs/gst/gl/gstgldownload.h
index cef26ef7c..ded8a4230 100644
--- a/gst-libs/gst/gl/gstgldownload.h
+++ b/gst-libs/gst/gl/gstgldownload.h
@@ -24,15 +24,10 @@
#include <gst/video/video.h>
#include <gst/gstmemory.h>
-#include "gstgldisplay.h"
-#include "gstglshader.h"
+#include "gstgl_fwd.h"
G_BEGIN_DECLS
-/* forward declare */
-typedef struct _GstGLMemory GstGLMemory;
-typedef struct _GstGLDisplay GstGLDisplay;
-
GType gst_gl_download_get_type (void);
#define GST_TYPE_GL_DOWNLOAD (gst_gl_download_get_type())
#define GST_GL_DOWNLOAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DOWNLOAD,GstGLDownload))
@@ -41,10 +36,6 @@ GType gst_gl_download_get_type (void);
#define GST_IS_GL_DOWNLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_DOWNLOAD))
#define GST_GL_DOWNLOAD_CAST(obj) ((GstGLDownload*)(obj))
-typedef struct _GstGLDownload GstGLDownload;
-typedef struct _GstGLDownloadClass GstGLDownloadClass;
-typedef struct _GstGLDownloadPrivate GstGLDownloadPrivate;
-
/**
* GstGLDownload
* @parent: the parent object
diff --git a/gst-libs/gst/gl/gstglegl.c b/gst-libs/gst/gl/gstglegl.c
index f41092cbb..4097a5223 100644
--- a/gst-libs/gst/gl/gstglegl.c
+++ b/gst-libs/gst/gl/gstglegl.c
@@ -22,6 +22,7 @@
#include "config.h"
#endif
+#include "gl.h"
#include "gstglegl.h"
static const gchar *
diff --git a/gst-libs/gst/gl/gstglegl.h b/gst-libs/gst/gl/gstglegl.h
index 426182fa8..4bfd479e9 100644
--- a/gst-libs/gst/gl/gstglegl.h
+++ b/gst-libs/gst/gl/gstglegl.h
@@ -24,7 +24,7 @@
#include <gst/gst.h>
#include <EGL/egl.h>
-#include "gstglwindow.h"
+#include "gstgl_fwd.h"
G_BEGIN_DECLS
diff --git a/gst-libs/gst/gl/gstglfeature.c b/gst-libs/gst/gl/gstglfeature.c
index 72c347c7c..f599e484b 100644
--- a/gst-libs/gst/gl/gstglfeature.c
+++ b/gst-libs/gst/gl/gstglfeature.c
@@ -24,10 +24,9 @@
#include <string.h>
+#include "gl.h"
#include "gstglfeature.h"
-#include "gstglapi.h"
-
gboolean
gst_gl_check_extension (const char *name, const gchar * ext)
{
diff --git a/gst-libs/gst/gl/gstglfeature.h b/gst-libs/gst/gl/gstglfeature.h
index 4105d6200..eb9a04f81 100644
--- a/gst-libs/gst/gl/gstglfeature.h
+++ b/gst-libs/gst/gl/gstglfeature.h
@@ -45,7 +45,7 @@
#include <gst/gst.h>
-#include "gstgldisplay.h"
+#include "gstgl_fwd.h"
#define GST_GL_CHECK_GL_VERSION(driver_major, driver_minor, \
target_major, target_minor) \
diff --git a/gst-libs/gst/gl/gstglfilter.h b/gst-libs/gst/gl/gstglfilter.h
index dda8dddce..b989885f1 100644
--- a/gst-libs/gst/gl/gstglfilter.h
+++ b/gst-libs/gst/gl/gstglfilter.h
@@ -27,7 +27,7 @@
#include <gst/base/gstbasetransform.h>
#include <gst/video/video.h>
-#include "gstglbufferpool.h"
+#include "gl.h"
G_BEGIN_DECLS
diff --git a/gst-libs/gst/gl/gstglframebuffer.c b/gst-libs/gst/gl/gstglframebuffer.c
index 1b574d298..ae8bb5eb5 100644
--- a/gst-libs/gst/gl/gstglframebuffer.c
+++ b/gst-libs/gst/gl/gstglframebuffer.c
@@ -21,6 +21,7 @@
#include "config.h"
#endif
+#include "gl.h"
#include "gstglframebuffer.h"
GST_DEBUG_CATEGORY_STATIC (gst_gl_framebuffer_debug);
diff --git a/gst-libs/gst/gl/gstglframebuffer.h b/gst-libs/gst/gl/gstglframebuffer.h
index 48250db93..1f5fcc8a1 100644
--- a/gst-libs/gst/gl/gstglframebuffer.h
+++ b/gst-libs/gst/gl/gstglframebuffer.h
@@ -21,7 +21,7 @@
#ifndef __GST_GL_FRAMEBUFFER_H__
#define __GST_GL_FRAMEBUFFER_H__
-#include "gstgldisplay.h"
+#include "gstgl_fwd.h"
G_BEGIN_DECLS
diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c
index 1d5542b38..e83299488 100644
--- a/gst-libs/gst/gl/gstglmemory.c
+++ b/gst-libs/gst/gl/gstglmemory.c
@@ -25,7 +25,6 @@
#include <gst/video/video.h>
#include "gstglmemory.h"
-#include "gstglutils.h"
/**
* SECTION:gstglmemory
diff --git a/gst-libs/gst/gl/gstglmemory.h b/gst-libs/gst/gl/gstglmemory.h
index 155695163..7bec6cd06 100644
--- a/gst-libs/gst/gl/gstglmemory.h
+++ b/gst-libs/gst/gl/gstglmemory.h
@@ -22,12 +22,11 @@
#define _GST_GL_MEMORY_H_
#include <gst/gst.h>
-#include <gst/gstmemory.h>
#include <gst/gstallocator.h>
+#include <gst/gstmemory.h>
+#include <gst/video/video.h>
-#include "gstgldisplay.h"
-#include "gstgldownload.h"
-#include "gstglupload.h"
+#include "gl.h"
G_BEGIN_DECLS
@@ -41,10 +40,6 @@ GType gst_gl_allocator_get_type(void);
#define GST_GL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_ALLOCATOR, GstGLAllocatorClass))
#define GST_GL_ALLOCATOR_CAST(obj) ((GstGLAllocator *)(obj))
-typedef struct _GstGLMemory GstGLMemory;
-typedef struct _GstGLAllocator GstGLAllocator;
-typedef struct _GstGLAllocatorClass GstGLAllocatorClass;
-
/**
* GstGLMemoryFlags:
*
diff --git a/gst-libs/gst/gl/gstglmixer.h b/gst-libs/gst/gl/gstglmixer.h
index c089d592d..3e287d502 100644
--- a/gst-libs/gst/gl/gstglmixer.h
+++ b/gst-libs/gst/gl/gstglmixer.h
@@ -25,7 +25,7 @@
#include <gst/video/video.h>
#include "gstglmixerpad.h"
-#include "gstglbufferpool.h"
+#include "gl.h"
G_BEGIN_DECLS
diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
index a3c3cdcf6..b412420fa 100644
--- a/gst-libs/gst/gl/gstglshader.c
+++ b/gst-libs/gst/gl/gstglshader.c
@@ -22,6 +22,7 @@
#include "config.h"
#endif
+#include "gl.h"
#include "gstglshader.h"
#ifndef GL_COMPILE_STATUS
diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
index cd0619553..a75f3fd10 100644
--- a/gst-libs/gst/gl/gstglshader.h
+++ b/gst-libs/gst/gl/gstglshader.h
@@ -21,13 +21,10 @@
#ifndef __GST_GL_SHADER_H__
#define __GST_GL_SHADER_H__
-#include "gstgldisplay.h"
-#include <gst/gst.h>
+#include "gstgl_fwd.h"
G_BEGIN_DECLS
-typedef struct _GstGLDisplay GstGLDisplay;
-
#define GST_GL_TYPE_SHADER (gst_gl_shader_get_type())
#define GST_GL_SHADER(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_SHADER, GstGLShader))
#define GST_GL_SHADER_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_SHADER, GstGLShaderClass))
@@ -48,10 +45,6 @@ typedef enum {
GST_GL_SHADER_VERTEX_SOURCE
} GstGLShaderSourceType;
-typedef struct _GstGLShader GstGLShader;
-typedef struct _GstGLShaderPrivate GstGLShaderPrivate;
-typedef struct _GstGLShaderClass GstGLShaderClass;
-
struct _GstGLShader {
/*< private >*/
GObject parent;
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
index 30de512a5..8b5870956 100644
--- a/gst-libs/gst/gl/gstglupload.c
+++ b/gst-libs/gst/gl/gstglupload.c
@@ -24,8 +24,8 @@
#include <stdio.h>
+#include "gl.h"
#include "gstglupload.h"
-#include "gstglmemory.h"
/**
* SECTION:gstglupload
diff --git a/gst-libs/gst/gl/gstglupload.h b/gst-libs/gst/gl/gstglupload.h
index 2daafd72b..8b93bcad5 100644
--- a/gst-libs/gst/gl/gstglupload.h
+++ b/gst-libs/gst/gl/gstglupload.h
@@ -24,15 +24,10 @@
#include <gst/video/video.h>
#include <gst/gstmemory.h>
-#include "gstglshader.h"
-#include "gstgldisplay.h"
+#include "gstgl_fwd.h"
G_BEGIN_DECLS
-/* forward declare */
-typedef struct _GstGLMemory GstGLMemory;
-typedef struct _GstGLDisplay GstGLDisplay;
-
GType gst_gl_upload_get_type (void);
#define GST_TYPE_GL_UPLOAD (gst_gl_upload_get_type())
#define GST_GL_UPLOAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_UPLOAD,GstGLUpload))
@@ -41,10 +36,6 @@ GType gst_gl_upload_get_type (void);
#define GST_IS_GL_UPLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_UPLOAD))
#define GST_GL_UPLOAD_CAST(obj) ((GstGLUpload*)(obj))
-typedef struct _GstGLUpload GstGLUpload;
-typedef struct _GstGLUploadClass GstGLUploadClass;
-typedef struct _GstGLUploadPrivate GstGLUploadPrivate;
-
/**
* GstGLUpload
* @parent: the parent object
diff --git a/gst-libs/gst/gl/gstglutils.c b/gst-libs/gst/gl/gstglutils.c
index 76de43812..c835b7892 100644
--- a/gst-libs/gst/gl/gstglutils.c
+++ b/gst-libs/gst/gl/gstglutils.c
@@ -25,9 +25,8 @@
#include <gst/gst.h>
+#include "gl.h"
#include "gstglutils.h"
-#include "gstglfeature.h"
-#include "gstglframebuffer.h"
#ifndef GL_FRAMEBUFFER_UNDEFINED
#define GL_FRAMEBUFFER_UNDEFINED 0x8219
diff --git a/gst-libs/gst/gl/gstglutils.h b/gst-libs/gst/gl/gstglutils.h
index 2761a0241..e22d5ce79 100644
--- a/gst-libs/gst/gl/gstglutils.h
+++ b/gst-libs/gst/gl/gstglutils.h
@@ -21,13 +21,9 @@
#ifndef __GST_GL_UTILS_H__
#define __GST_GL_UTILS_H__
-typedef struct _GstGLDisplay GstGLDisplay;
-typedef struct _GstGLShader GstGLShader;
-
#include <gst/video/video.h>
-#include "gstgldisplay.h"
-#include "gstglshader.h"
+#include "gstgl_fwd.h"
/**
* GstGLDisplayProjection:
diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
index 2cb74bd46..1aa1b8c49 100644
--- a/gst-libs/gst/gl/gstglwindow.c
+++ b/gst-libs/gst/gl/gstglwindow.c
@@ -25,6 +25,7 @@
#include <gmodule.h>
#include <stdio.h>
+#include "gl.h"
#include "gstglwindow.h"
#if GST_GL_HAVE_WINDOW_X11
@@ -40,8 +41,6 @@
#include "wayland/gstglwindow_wayland_egl.h"
#endif
-#include "gstglfeature.h"
-
#define USING_OPENGL(display) (display->gl_api & GST_GL_API_OPENGL)
#define USING_OPENGL3(display) (display->gl_api & GST_GL_API_OPENGL3)
#define USING_GLES(display) (display->gl_api & GST_GL_API_GLES)
diff --git a/gst-libs/gst/gl/gstglwindow.h b/gst-libs/gst/gl/gstglwindow.h
index 923c9278f..f6f03b738 100644
--- a/gst-libs/gst/gl/gstglwindow.h
+++ b/gst-libs/gst/gl/gstglwindow.h
@@ -22,12 +22,9 @@
#ifndef __GST_GL_WINDOW_H__
#define __GST_GL_WINDOW_H__
-typedef struct _GstGLDisplay GstGLDisplay;
-
#include <gst/gst.h>
-#include "gstglapi.h"
-#include "gstgldisplay.h"
+#include "gstgl_fwd.h"
G_BEGIN_DECLS
@@ -70,10 +67,6 @@ typedef void (*GstGLWindowResizeCB) (gpointer data, guint width, guint height);
#define GST_GL_WINDOW_CB(f) ((GstGLWindowCB) (f))
#define GST_GL_WINDOW_RESIZE_CB(f) ((GstGLWindowResizeCB) (f))
-typedef struct _GstGLWindow GstGLWindow;
-typedef struct _GstGLWindowPrivate GstGLWindowPrivate;
-typedef struct _GstGLWindowClass GstGLWindowClass;
-
struct _GstGLWindow {
/*< private >*/
GObject parent;
diff --git a/gst/gl/gstglimagesink.h b/gst/gl/gstglimagesink.h
index f75ea93f0..8ac03fe87 100644
--- a/gst/gl/gstglimagesink.h
+++ b/gst/gl/gstglimagesink.h
@@ -27,8 +27,7 @@
#include <gst/video/gstvideosink.h>
#include <gst/video/video.h>
-#include "gstglbufferpool.h"
-#include <gst/gl/gstglconfig.h>
+#include "gl.h"
G_BEGIN_DECLS
diff --git a/gst/gl/gstgltestsrc.h b/gst/gl/gstgltestsrc.h
index b90c1db3a..884ace20a 100644
--- a/gst/gl/gstgltestsrc.h
+++ b/gst/gl/gstgltestsrc.h
@@ -26,7 +26,7 @@
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
-#include "gstglbufferpool.h"
+#include "gl.h"
G_BEGIN_DECLS