summaryrefslogtreecommitdiff
path: root/ext/gtk
diff options
context:
space:
mode:
authorJulien Isorce <jisorce@oblong.com>2017-07-07 16:15:12 +0100
committerJulien Isorce <jisorce@oblong.com>2017-08-22 10:00:19 +0100
commita4d74fda9a1a279fdf27534a53634095cc094c09 (patch)
tree994ca67adbf060fe83c8fba9ca40201d4695b2d6 /ext/gtk
parent5c8d4271d670cd3cb681af530670b3cc4e1fad45 (diff)
downloadgstreamer-plugins-good-a4d74fda9a1a279fdf27534a53634095cc094c09.tar.gz
gl: do not include GL headers in public gstgl headers
Except for gst/gl/gstglfuncs.h It is up to the client app to include these headers. It is coherent with the fact that gstreamer-gl.pc does not require any egl.pc/gles.pc. I.e. it is the responsability of the app to search these headers within its build setup. For example gstreamer-vaapi includes explicitly EGL/egl.h and search for it in its configure.ac. For example with this patch, if an app includes the headers gst/gl/egl/gstglcontext_egl.h gst/gl/egl/gstgldisplay_egl.h gst/gl/egl/gstglmemoryegl.h it will *no longer* automatically include EGL/egl.h and GLES2/gl2.h. Which is good because the app might want to use the gstgl api only without the need to bother about gl headers. Also added a test: cd tests/check && make libs/gstglheaders.check https://bugzilla.gnome.org/show_bug.cgi?id=784779
Diffstat (limited to 'ext/gtk')
-rw-r--r--ext/gtk/Makefile.am3
-rw-r--r--ext/gtk/gstgtkglsink.c2
-rw-r--r--ext/gtk/gtkgstglwidget.c1
3 files changed, 5 insertions, 1 deletions
diff --git a/ext/gtk/Makefile.am b/ext/gtk/Makefile.am
index 7736b24ef..34906257f 100644
--- a/ext/gtk/Makefile.am
+++ b/ext/gtk/Makefile.am
@@ -27,7 +27,8 @@ libgstgtk_la_CFLAGS = \
$(GTK3_CFLAGS) \
$(GST_CFLAGS) \
$(GST_BASE_CFLAGS) \
- $(GST_PLUGINS_BASE_CFLAGS)
+ $(GST_PLUGINS_BASE_CFLAGS) \
+ $(GL_CFLAGS)
libgstgtk_la_LIBADD = \
$(GTK3_LIBS) \
$(GST_BASE_LIBS) \
diff --git a/ext/gtk/gstgtkglsink.c b/ext/gtk/gstgtkglsink.c
index 56326882a..39b54faf8 100644
--- a/ext/gtk/gstgtkglsink.c
+++ b/ext/gtk/gstgtkglsink.c
@@ -27,6 +27,8 @@
#include "config.h"
#endif
+#include <gst/gl/gstglfuncs.h>
+
#include "gstgtkglsink.h"
#include "gtkgstglwidget.h"
diff --git a/ext/gtk/gtkgstglwidget.c b/ext/gtk/gtkgstglwidget.c
index ea0fe2f8a..2423afca0 100644
--- a/ext/gtk/gtkgstglwidget.c
+++ b/ext/gtk/gtkgstglwidget.c
@@ -26,6 +26,7 @@
#include "gtkgstglwidget.h"
#include "gstgtkutils.h"
+#include <gst/gl/gstglfuncs.h>
#include <gst/video/video.h>
#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined (GDK_WINDOWING_X11)