gl: do not include GL headers in public gstgl headers
authorJulien Isorce <jisorce@oblong.com>
Fri, 7 Jul 2017 15:15:12 +0000 (16:15 +0100)
committerJulien Isorce <jisorce@oblong.com>
Tue, 22 Aug 2017 09:00:19 +0000 (10:00 +0100)
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

ext/gl/gstglmixer.h
ext/gl/gstglvideomixer.c

index 309f6bb..886e009 100644 (file)
@@ -24,6 +24,7 @@
 #include <gst/gst.h>
 #include <gst/video/video.h>
 #include <gst/gl/gl.h>
+#include <gst/gl/gstglfuncs.h>
 #include "gstglbasemixer.h"
 
 G_BEGIN_DECLS
index a5a094b..7180220 100644 (file)
 #include "config.h"
 #endif
 
-#include <gst/video/gstvideoaffinetransformationmeta.h>
 #include <gst/controller/gstproxycontrolbinding.h>
+#include <gst/gl/gstglfuncs.h>
+#include <gst/video/gstvideoaffinetransformationmeta.h>
 
 #include "gstglvideomixer.h"
+
 #include "gstglmixerbin.h"
 #include "gstglutils.h"