Commit 4952fdd9 authored by Julien Isorce's avatar Julien Isorce Committed by Tim-Philipp Müller
Browse files

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
parent 632015a9
......@@ -22,6 +22,8 @@
#include "config.h"
#endif
#include <gst/gl/gstglfuncs.h>
#include "gltestsrc.h"
#define MAX_ATTRIBUTES 4
......
......@@ -38,12 +38,12 @@
#include "config.h"
#endif
#include <string.h>
#include <gst/gl/gstglfuncs.h>
#include <gst/math-compat.h>
#include <gst/video/colorbalance.h>
#include "gstglcolorbalance.h"
#include <string.h>
#include <gst/video/colorbalance.h>
GST_DEBUG_CATEGORY_STATIC (glcolorbalance_debug);
#define GST_CAT_DEFAULT glcolorbalance_debug
......
......@@ -47,7 +47,6 @@
#include "gstglcolorscale.h"
#define GST_CAT_DEFAULT gst_gl_colorscale_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
......
......@@ -36,6 +36,8 @@
#include "config.h"
#endif
#include <gst/gl/gstglfuncs.h>
#include "gstgldeinterlace.h"
#define GST_CAT_DEFAULT gst_gl_deinterlace_debug
......
......@@ -39,6 +39,8 @@
#include <stdlib.h>
#include <png.h>
#include <gst/gl/gstglfuncs.h>
#include "gstgldifferencematte.h"
#include "effects/gstgleffectssources.h"
......
......@@ -36,7 +36,6 @@
#include "config.h"
#endif
#include <gst/gl/gstglconfig.h>
#include "gstgleffects.h"
#define GST_CAT_DEFAULT gst_gl_effects_debug
......
......@@ -22,6 +22,8 @@
#define __GST_GL_EFFECTS_H__
#include <gst/gl/gstglfilter.h>
#include <gst/gl/gstglfuncs.h>
#include "effects/gstgleffectssources.h"
G_BEGIN_DECLS
......
......@@ -22,6 +22,7 @@
#define _GST_GL_FILTERCUBE_H_
#include <gst/gl/gstglfilter.h>
#include <gst/gl/gstglfuncs.h>
G_BEGIN_DECLS
......
......@@ -41,7 +41,10 @@
#endif
#include <math.h>
#include <gst/gl/gstglfuncs.h>
#include "gstglfilterglass.h"
#include "gstglutils.h"
#define GST_CAT_DEFAULT gst_gl_filter_glass_debug
......
......@@ -56,7 +56,7 @@
#include "config.h"
#endif
#include <gst/gst.h>
#include <gst/gl/gstglfuncs.h>
#include "gstglfiltershader.h"
#if HAVE_GRAPHENE
......
......@@ -28,6 +28,7 @@
#include <gst/video/video.h>
#include <gst/gl/gl.h>
#include <gst/gl/gstglfuncs.h>
G_BEGIN_DECLS
......
......@@ -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
......
......@@ -22,6 +22,7 @@
#define _GST_GL_OVERLAY_H_
#include <gst/gl/gstglfilter.h>
#include <gst/gl/gstglfuncs.h>
G_BEGIN_DECLS
......
......@@ -42,9 +42,11 @@
#include "config.h"
#endif
#include <gst/gl/gstglfuncs.h>
#include <gst/gst-i18n-plugin.h>
#include "gstgltestsrc.h"
#include "gltestsrc.h"
#include <gst/gst-i18n-plugin.h>
#define USE_PEER_BUFFERALLOC
#define SUPPORTED_GL_APIS (GST_GL_API_OPENGL | GST_GL_API_OPENGL3 | GST_GL_API_GLES2)
......
......@@ -22,7 +22,8 @@
#include "config.h"
#endif
#include <gst/gst.h>
#include <gst/gl/gstglfuncs.h>
#include "gstglutils.h"
struct _compile_shader
......
......@@ -43,10 +43,12 @@
#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"
......
......@@ -47,6 +47,7 @@
#endif
#include <gst/base/gstbasetransform.h>
#include "gstglviewconvert.h"
#define GST_CAT_DEFAULT gst_gl_view_convert_element_debug
......
......@@ -22,7 +22,7 @@
#ifndef _GST_GL_VIEW_CONVERT_ELEMENT_H_
#define _GST_GL_VIEW_CONVERT_ELEMENT_H_
#include <gst/gl/gstglviewconvert.h>
#include <gst/gl/gstglfilter.h>
G_BEGIN_DECLS
#define GST_TYPE_GL_VIEW_CONVERT_ELEMENT (gst_gl_view_convert_element_get_type())
......
......@@ -39,9 +39,16 @@
#endif
#include "gsteglimage.h"
#include <gst/gl/egl/gstgldisplay_egl.h>
#include <string.h>
#include <gst/gl/gstglfeature.h>
#include <gst/gl/gstglmemory.h>
#include "gst/gl/egl/gstegl.h"
#include "gst/gl/egl/gstglcontext_egl.h"
#include "gst/gl/egl/gstgldisplay_egl.h"
#if GST_GL_HAVE_DMABUF
#include <gst/allocators/gstdmabuf.h>
#include <libdrm/drm_fourcc.h>
......@@ -107,7 +114,7 @@ gst_egl_image_ensure_debug_category (void)
*
* Returns: the #EGLImageKHR of @image
*/
EGLImageKHR
gpointer
gst_egl_image_get_image (GstEGLImage * image)
{
g_return_val_if_fail (GST_IS_EGL_IMAGE (image), EGL_NO_IMAGE_KHR);
......@@ -151,7 +158,7 @@ _gst_egl_image_copy (GstMiniObject * obj)
* Returns: a new #GstEGLImage wrapping @image
*/
GstEGLImage *
gst_egl_image_new_wrapped (GstGLContext * context, EGLImageKHR image,
gst_egl_image_new_wrapped (GstGLContext * context, gpointer image,
GstGLFormat format, gpointer user_data,
GstEGLImageDestroyNotify user_data_destroy)
{
......
......@@ -23,11 +23,8 @@
#ifndef _GST_EGL_IMAGE_H_
#define _GST_EGL_IMAGE_H_
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/gl/gl.h>
#include <gst/gl/egl/gstegl.h>
#include <gst/gl/gstgl_fwd.h>
#include <gst/gl/gstglformat.h>
G_BEGIN_DECLS
......@@ -61,7 +58,7 @@ struct _GstEGLImage
GstMiniObject parent;
GstGLContext *context;
EGLImageKHR image;
gpointer image;
GstGLFormat format;
/* <private> */
......@@ -73,12 +70,12 @@ struct _GstEGLImage
GST_EXPORT
GstEGLImage * gst_egl_image_new_wrapped (GstGLContext * context,
EGLImageKHR image,
gpointer image,
GstGLFormat format,
gpointer user_data,
GstEGLImageDestroyNotify user_data_destroy);
GST_EXPORT
EGLImageKHR gst_egl_image_get_image (GstEGLImage * image);
gpointer gst_egl_image_get_image (GstEGLImage * image);
GST_EXPORT
GstEGLImage * gst_egl_image_from_texture (GstGLContext * context,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment