else
HAVE_QT="yes"
HAVE_QT_WINDOWING="no"
+ QT_VERSION="`$PKG_CONFIG --modversion Qt5Core`"
+ QPA_INCLUDE_PATH=`$PKG_CONFIG --variable=includedir Qt5Core`/QtGui/${QT_VERSION}/QtGui
+ AC_SUBST(QPA_INCLUDE_PATH)
if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1"; then
PKG_CHECK_MODULES(QT_X11, Qt5X11Extras, [
AC_DEFINE([HAVE_QT_X11], [], [Define if Qt X11 integration is installed])
libgstqtsink_la_CXXFLAGS = \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
+ -I$(QPA_INCLUDE_PATH) \
$(GST_CXXFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
#include <QtGui/QGuiApplication>
#include <QtQuick/QQuickWindow>
#include <QtQuick/QSGSimpleTextureNode>
+#include <qpa/qplatformnativeinterface.h>
#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined (HAVE_QT_X11)
#include <QX11Info>
this->priv->display = (GstGLDisplay *)
gst_gl_display_x11_new_with_display (QX11Info::display ());
#endif
+#if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (HAVE_QT_WAYLAND)
+ if (QString::fromUtf8 ("wayland") == app->platformName()){
+ struct wl_display * wayland_display;
+ QPlatformNativeInterface *native =
+ QGuiApplication::platformNativeInterface();
+ wayland_display = (struct wl_display *)
+ native->nativeResourceForWindow("display", NULL);
+ this->priv->display = (GstGLDisplay *)
+ gst_gl_display_wayland_new_with_display (wayland_display);
+ }
+#endif
#if GST_GL_HAVE_WINDOW_ANDROID && GST_GL_HAVE_PLATFORM_EGL && defined (HAVE_QT_ANDROID)
if (QString::fromUtf8 ("android") == app->platformName())
this->priv->display = (GstGLDisplay *) gst_gl_display_egl_new ();