Skip to content

qmlgl: ensure Qt defines GLsync to fix compile on some platforms

By explictly including QtGui/qopengl.h we force the code path that defines GLsync in the Qt-specific way. Without that, some platforms failed to compile the qmlgl plugin, since neither Qt nor gstreamer defined GLsync then, leading to e.g.:

make[4]: Entering directory '/.../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:
/.../usr/include/gstreamer-1.0/
gst/gl/gstglfuncs.h:93:17: error: expected identifier before ‘*’ token
   ret (GSTGLAPI *name) args;
                 ^
/.../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,
 ^~~~~~~~~~~~~~~~~~~

Merge request reports