qmlsink: Ensure that at least one windowing system is available
Otherwise, we'll just crash at runtime because the gl context is NULL https://bugzilla.gnome.org/show_bug.cgi?id=754108
This commit is contained in:
parent
cf1d116b19
commit
77f68f6e10
17
configure.ac
17
configure.ac
@ -2647,13 +2647,26 @@ AG_GST_CHECK_FEATURE(QT, [Qt elements], qt, [
|
|||||||
HAVE_QT="no"
|
HAVE_QT="no"
|
||||||
else
|
else
|
||||||
HAVE_QT="yes"
|
HAVE_QT="yes"
|
||||||
|
HAVE_QT_WINDOWING="no"
|
||||||
PKG_CHECK_MODULES(QT_X11, Qt5X11Extras, [
|
PKG_CHECK_MODULES(QT_X11, Qt5X11Extras, [
|
||||||
AC_DEFINE([HAVE_QT_X11], [], [Define if Qt X11 integration is installed])
|
AC_DEFINE([HAVE_QT_X11], [], [Define if Qt X11 integration is installed])
|
||||||
QT_CFLAGS="$QT_CFLAGS $QT_X11_CFLAGS"
|
QT_CFLAGS="$QT_CFLAGS $QT_X11_CFLAGS"
|
||||||
QT_LIBS="$QT_LIBS $QT_X11_LIBS"
|
QT_LIBS="$QT_LIBS $QT_X11_LIBS"
|
||||||
AC_SUBST([QT_CFLAGS])
|
HAVE_QT_WINDOWING="yes"
|
||||||
AC_SUBST([QT_LIBS])
|
|
||||||
], [AC_MSG_NOTICE([Could not find Qt X11 integration])])
|
], [AC_MSG_NOTICE([Could not find Qt X11 integration])])
|
||||||
|
PKG_CHECK_MODULES(QT_WAYLAND, Qt5WaylandClient, [
|
||||||
|
AC_DEFINE([HAVE_QT_WAYLAND], [],
|
||||||
|
[Define if Qt Wayland integration is installed])
|
||||||
|
QT_CFLAGS="$QT_CFLAGS $QT_WAYLAND_CFLAGS"
|
||||||
|
QT_LIBS="$QT_LIBS $QT_WAYLAND_LIBS"
|
||||||
|
HAVE_QT_WINDOWING="yes"
|
||||||
|
], [AC_MSG_NOTICE([Could not find Qt Wayland integration])])
|
||||||
|
if test "x$HAVE_QT_WINDOWING" = "xno"; then
|
||||||
|
AC_MSG_WARN([Could not find any Qt Windowing integration])
|
||||||
|
HAVE_QT="no"
|
||||||
|
fi
|
||||||
|
AC_SUBST([QT_CFLAGS])
|
||||||
|
AC_SUBST([QT_LIBS])
|
||||||
fi
|
fi
|
||||||
], [
|
], [
|
||||||
HAVE_QT="no"
|
HAVE_QT="no"
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <gst/gl/x11/gstglcontext_glx.h>
|
#include <gst/gl/x11/gstglcontext_glx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GST_GL_HAVE_WINDOW_WAYLAND
|
#if GST_GL_HAVE_WINDOW_WAYLAND && defined (HAVE_QT_WAYLAND)
|
||||||
#include <gst/gl/wayland/gstgldisplay_wayland.h>
|
#include <gst/gl/wayland/gstgldisplay_wayland.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ QtGLVideoItem::onSceneGraphInitialized ()
|
|||||||
platform, gl_api);
|
platform, gl_api);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if GST_GL_HAVE_WINDOW_WAYLAND
|
#if GST_GL_HAVE_WINDOW_WAYLAND && defined (HAVE_QT_WAYLAND)
|
||||||
if (GST_IS_GL_DISPLAY_WAYLAND (this->priv->display)) {
|
if (GST_IS_GL_DISPLAY_WAYLAND (this->priv->display)) {
|
||||||
platform = GST_GL_PLATFORM_EGL;
|
platform = GST_GL_PLATFORM_EGL;
|
||||||
gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
|
gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user