qtgl plugins: GLsync missing from gstgl_gles2compat.h?
Matthew Waters
ystreet00 at gmail.com
Fri Nov 22 04:16:27 UTC 2019
Hi,
This is a common build error for building the qmlgl plugins and while
the hack in ext/qt/gstqtgl.h is meant to help, obviously it does not for
you. If you can find a set up of #include's and defined that works on
both the RPi and on a normal desktop linux without performing rpi
specific hacks, then I'd be happy to review that patch.
Cheers
-Matt
On 22/11/19 3:19 am, Milian Wolff wrote:
> Hey there,
>
> when trying to cross compile gst-plugins-good-1.16.1 for a raspberry pi 3b+ I
> see the following compile errors:
>
> ```
> make[4]: Entering directory '/path/to/gst-plugins-good-1.16.1/ext/qt'
> CXX libgstqmlgl_la-qtitem.lo
> In file included from gstqtgl.h:32,
> from qtitem.h:27,
> from qtitem.cc:28:
> /path/to/sdk/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/path/to/sdk/
> sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/gstreamer-1.0/
> gst/gl/gstglfuncs.h:93:17: error: expected identifier before ‘*’ token
> ret (GSTGLAPI *name) args;
> ^
> /path/to/sdk/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/path/to/sdk/
> sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/gstreamer-1.0/
> gst/gl/glprototypes/sync.h:27:1: note: in expansion of macro
> ‘GST_GL_EXT_FUNCTION’
> GST_GL_EXT_FUNCTION (GLsync, FenceSync,
> ^~~~~~~~~~~~~~~~~~~
> /path/to/sdk/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/path/to/sdk/
> sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/gstreamer-1.0/
> gst/gl/glprototypes/sync.h:29:39: error: ISO C++ forbids declaration of
> ‘GLsync’ with no type [-fpermissive]
> GLbitfield flags))
> ^
> /path/to/sdk/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/path/to/sdk/
> sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/gstreamer-1.0/
> gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
> ret (GSTGLAPI *name) args;
> ^~~~
> /path/to/sdk/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/path/to/sdk/
> sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/gstreamer-1.0/
> gst/gl/glprototypes/sync.h:29:39: error: ‘GLsync’ declared as function
> returning a function
> GLbitfield flags))
> ...
> ```
>
> Note that this is using `include/gstreamer-1.0/gst/gl/glprototypes/
> gstgl_gles2compat.h` which has no GLsync in it.
>
> In the non-gles2 version of this header I see
>
> ```
> #if !GST_GL_HAVE_GLSYNC
> typedef gpointer GLsync;
> #endif
> ```
>
> Copying that over to the gles2 header doesn't fix it, and indeed that's
> probably due to the following hack in ext/qt/gstqtgl.h:
>
> ```
> /* qt uses the same trick as us to typedef GLsync on GLES2 but to a different
> * type which confuses the preprocessor. Instead of trying to reconcile the
> * two, we instead use the GLsync definition from Qt from above, and ensure
> * that we don't typedef GLsync in gstglfuncs.h */
> #include <gst/gl/gstglconfig.h>
> #undef GST_GL_HAVE_GLSYNC
> #define GST_GL_HAVE_GLSYNC 1
> #include <gst/gl/gstglfuncs.h>
> ```
>
> If I instead add the `typedef gpointer GLsync` forward without the macro check
> for GST_GL_HAVE_GLSYNC, then compilation succeeds.
>
> So it seems my Qt 5.13.0 headers don't define GLsync anymore? Has anyone run
> into this and knows how to handle this issue correctly?
>
> Thanks
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191122/fe883560/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191122/fe883560/attachment-0001.sig>
More information about the gstreamer-devel
mailing list