summaryrefslogtreecommitdiff
path: root/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0027-qml-add-EGL-platform-support-for-x11-backend.patch
blob: 6adb5c9146b13ccb8dae8130db7a995de60bb805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From bb75828b2d92a871b4b3da75cd5143f1a66fe229 Mon Sep 17 00:00:00 2001
From: Haihua Hu <jared.hu@nxp.com>
Date: Wed, 17 May 2017 10:58:05 +0800
Subject: [PATCH 20/24] qml:add EGL platform support for x11 backend

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

Upstream status: Backport[1.13.1]
https://bugzilla.gnome.org/show_bug.cgi?id=782718
---
 configure.ac             |  2 +-
 ext/qt/gstqtglutility.cc | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2b71529..3f6f100 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2948,7 +2948,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"
diff --git a/ext/qt/gstqtglutility.cc b/ext/qt/gstqtglutility.cc
index a4b22aa..d0f7668 100644
--- a/ext/qt/gstqtglutility.cc
+++ b/ext/qt/gstqtglutility.cc
@@ -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)
-- 
1.9.1