[Bug 784779] gl: public gstgl headers should not include GL headers

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jul 14 09:08:19 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=784779

--- Comment #4 from Julien Isorce <julien.isorce at gmail.com> ---
Review of attachment 355315:
 --> (https://bugzilla.gnome.org/review?bug=784779&attachment=355315)

Thx for the review!

::: gst-libs/gst/gl/gstglformat.c
@@ +36,3 @@
+
+#include "gstglcontext.h"
+#include "gstglfuncs.h"

Good question, well I hesitated to change it. I saw inconsistencies in
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglbasefilter.c#n21
versus
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstgldisplay.c
. I pointed these 2 only as example just to show that current state in gstgl is
not uniform. I have not counted who win currently between #include <> versus
#include "". But in general, within one lib, headers from .c should be included
with "". So only use include <> in .h and in .c if it includes from another lib
unit.
This is also what gstreamer seems to do in general for the few gst libs I
checked.

::: gst-libs/gst/gl/gstglframebuffer.h
@@ +24,2 @@
 #include <gst/gl/gstgl_fwd.h>
+#include <gst/gl/gstglfuncs.h>

My mistake, thx!

::: gst-libs/gst/gl/gstglmemorypbo.c
@@ +31,3 @@
+#include "gstglcontext.h"
+#include "gstglfuncs.h"
+#include "gstglutils.h"

Ditto.

::: tests/check/libs/gstglmemory.c
@@ +37,3 @@
+#if defined(EGLint) || defined(EGLBoolean) || defined(EGLAPI)
+#error egl headers should not be included
+#if defined(GLint) || defined(GLAPI) || defined(GL_GLEXT_VERSION)

You are right, I will make a dedicated test for it.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list