qml: Add EGL platform support for x11 backend

Add support for EGL platform when x11 is available. This can work
e.g. on imx6 platform.

https://bugzilla.gnome.org/show_bug.cgi?id=782718
This commit is contained in:
Haihua Hu 2017-05-17 10:58:05 +08:00 committed by Sebastian Dröge
parent 4261692187
commit ea2959bd88
2 changed files with 10 additions and 2 deletions

View file

@ -2922,7 +2922,7 @@ AG_GST_CHECK_FEATURE(QT, [Qt elements], qt, [
QT_CFLAGS="$QT_CFLAGS -I$PKG_CONFIG_SYSROOT_DIR/$QPA_INCLUDE_PATH"
HAVE_QT_QPA_HEADER="yes"
], [AC_MSG_NOTICE([Cannot find QPA])])
if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1"; then
if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1" || test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_EGL" = "x1"; then
PKG_CHECK_MODULES(QT_X11, Qt5X11Extras, [
AC_DEFINE([HAVE_QT_X11], [], [Define if Qt X11 integration is installed])
QT_CFLAGS="$QT_CFLAGS $QT_X11_CFLAGS"

View file

@ -25,10 +25,14 @@
#include "gstqtglutility.h"
#include <QtGui/QGuiApplication>
#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined (HAVE_QT_X11)
#if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11)
#include <QX11Info>
#include <gst/gl/x11/gstgldisplay_x11.h>
#if GST_GL_HAVE_PLATFORM_GLX
#include <gst/gl/x11/gstglcontext_glx.h>
#elif GST_GL_HAVE_PLATFORM_EGL
#include <gst/gl/egl/gstglcontext_egl.h>
#endif
#endif
#if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (HAVE_QT_WAYLAND)
@ -151,7 +155,11 @@ gst_qt_get_gl_wrapcontext (GstGLDisplay * display,
#if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11)
if (GST_IS_GL_DISPLAY_X11 (display)) {
#if GST_GL_HAVE_PLATFORM_GLX
platform = GST_GL_PLATFORM_GLX;
#elif GST_GL_HAVE_PLATFORM_EGL
platform = GST_GL_PLATFORM_EGL;
#endif
}
#endif
#if GST_GL_HAVE_WINDOW_WAYLAND && defined (HAVE_QT_WAYLAND)