diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-03-31 21:30:32 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-04-02 15:24:59 +0100 |
commit | 87ef247ed4ebb6b4069526e83e1a85f363058a14 (patch) | |
tree | 80f8eac565de65c6fe2f56ac93089c01c29c46de /meta/recipes-multimedia | |
parent | a8588f30878047a96955c9e947d04a1e568cfb42 (diff) | |
download | poky-87ef247ed4ebb6b4069526e83e1a85f363058a14.tar.gz |
gstreamer1.0-plugins-good: Fix build when egl is enabled but no x11/wayland
This fixes build errors seen in no-x11/no-wayland configuration ( eglfs
) and when QT5 support is enabled
(From OE-Core rev: 03e498cd7e35902202579d404f4aad5c92664f18)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
3 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlgl-ensure-Qt-defines-GLsync-to-fix-compile-on-som.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlgl-ensure-Qt-defines-GLsync-to-fix-compile-on-som.patch new file mode 100644 index 0000000000..136848763b --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlgl-ensure-Qt-defines-GLsync-to-fix-compile-on-som.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 3e0d5577444b32579bdf5b69d720a322322ff7bc Mon Sep 17 00:00:00 2001 | ||
2 | From: Milian Wolff <milian.wolff@kdab.com> | ||
3 | Date: Tue, 26 Nov 2019 15:08:20 +0100 | ||
4 | Subject: [PATCH] qmlgl: ensure Qt defines GLsync to fix compile on some platforms | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | By explictly including QtGui/qopengl.h we force the code path that | ||
10 | defines GLsync in the Qt-specific way. Without that, some platforms | ||
11 | failed to compile the qmlgl plugin, since neither Qt nor gstreamer | ||
12 | defined GLsync then, leading to e.g.: | ||
13 | |||
14 | ``` | ||
15 | make[4]: Entering directory '/.../gst-plugins-good-1.16.1/ext/qt' | ||
16 | CXX libgstqmlgl_la-qtitem.lo | ||
17 | In file included from gstqtgl.h:32, | ||
18 | from qtitem.h:27, | ||
19 | from qtitem.cc:28: | ||
20 | /.../usr/include/gstreamer-1.0/ | ||
21 | gst/gl/gstglfuncs.h:93:17: error: expected identifier before ‘*’ token | ||
22 | ret (GSTGLAPI *name) args; | ||
23 | ^ | ||
24 | /.../usr/include/gstreamer-1.0/ | ||
25 | gst/gl/glprototypes/sync.h:27:1: note: in expansion of macro | ||
26 | ‘GST_GL_EXT_FUNCTION’ | ||
27 | GST_GL_EXT_FUNCTION (GLsync, FenceSync, | ||
28 | ^~~~~~~~~~~~~~~~~~~ | ||
29 | ``` | ||
30 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
31 | Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/commit/3e0d5577444b32579bdf5b69d720a322322ff7bc] | ||
32 | --- | ||
33 | ext/qt/gstqtgl.h | 18 +++++++++++------- | ||
34 | 1 file changed, 11 insertions(+), 7 deletions(-) | ||
35 | |||
36 | --- a/ext/qt/gstqtgl.h | ||
37 | +++ b/ext/qt/gstqtgl.h | ||
38 | @@ -22,14 +22,7 @@ | ||
39 | #include <QtGui/qtgui-config.h> | ||
40 | #endif | ||
41 | |||
42 | -/* qt uses the same trick as us to typedef GLsync on GLES2 but to a different | ||
43 | - * type which confuses the preprocessor. Instead of trying to reconcile the | ||
44 | - * two, we instead use the GLsync definition from Qt from above, and ensure | ||
45 | - * that we don't typedef GLsync in gstglfuncs.h */ | ||
46 | #include <gst/gl/gstglconfig.h> | ||
47 | -#undef GST_GL_HAVE_GLSYNC | ||
48 | -#define GST_GL_HAVE_GLSYNC 1 | ||
49 | -#include <gst/gl/gstglfuncs.h> | ||
50 | |||
51 | /* The glext.h guard was renamed in 2018, but some software which | ||
52 | * includes their own copy of the GL headers (such as qt) might have | ||
53 | @@ -46,6 +39,17 @@ | ||
54 | #endif | ||
55 | #endif | ||
56 | |||
57 | +/* pulls in GLsync, see below */ | ||
58 | +#include <QtGui/qopengl.h> | ||
59 | + | ||
60 | +/* qt uses the same trick as us to typedef GLsync on GLES2 but to a different | ||
61 | + * type which confuses the preprocessor. Instead of trying to reconcile the | ||
62 | + * two, we instead use the GLsync definition from Qt from above, and ensure | ||
63 | + * that we don't typedef GLsync in gstglfuncs.h */ | ||
64 | +#undef GST_GL_HAVE_GLSYNC | ||
65 | +#define GST_GL_HAVE_GLSYNC 1 | ||
66 | +#include <gst/gl/gstglfuncs.h> | ||
67 | + | ||
68 | #if defined(QT_OPENGL_ES_2) | ||
69 | #include <QtGui/QOpenGLContext> | ||
70 | #include <QtGui/QOpenGLFunctions> | ||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch new file mode 100644 index 0000000000..3d423154e0 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From d08234a659bec1fd5c984fedefbeb8192af07839 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 31 Mar 2020 21:23:28 -0700 | ||
4 | Subject: [PATCH] qt: include ext/qt/gstqtgl.h instead of gst/gl/gstglfuncs.h | ||
5 | |||
6 | gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to | ||
7 | prefer qt headers definitions for GLsync | ||
8 | |||
9 | This helps in fixing build errors like below | ||
10 | |||
11 | /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: error: conflicting declaration 'typedef struct __GLsync* GLsync' | ||
12 | 24 | typedef struct __GLsync *GLsync; | ||
13 | | ^~~~~~ | ||
14 | In file included from /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:84, | ||
15 | from ../gst-plugins-good-1.16.2/ext/qt/gstqsgtexture.cc:30: | ||
16 | /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: note: previous declaration as 'typedef void* GLsync | ||
17 | ' | ||
18 | 40 | typedef gpointer GLsync; | ||
19 | | ^~~~~~ | ||
20 | |||
21 | Upstream-Status: Pending | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | ext/qt/gstqsgtexture.cc | 2 +- | ||
25 | ext/qt/qtwindow.cc | 2 +- | ||
26 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc | ||
29 | index 2b314e0..12b15dd 100644 | ||
30 | --- a/ext/qt/gstqsgtexture.cc | ||
31 | +++ b/ext/qt/gstqsgtexture.cc | ||
32 | @@ -27,7 +27,7 @@ | ||
33 | |||
34 | #include <gst/video/video.h> | ||
35 | #include <gst/gl/gl.h> | ||
36 | -#include <gst/gl/gstglfuncs.h> | ||
37 | +#include <ext/qt/gstqtgl.h> | ||
38 | #include "gstqsgtexture.h" | ||
39 | |||
40 | #define GST_CAT_DEFAULT gst_qsg_texture_debug | ||
41 | diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc | ||
42 | index 62d26b6..bf68ebb 100644 | ||
43 | --- a/ext/qt/qtwindow.cc | ||
44 | +++ b/ext/qt/qtwindow.cc | ||
45 | @@ -25,7 +25,7 @@ | ||
46 | #include <stdio.h> | ||
47 | |||
48 | #include <gst/video/video.h> | ||
49 | -#include <gst/gl/gstglfuncs.h> | ||
50 | +#include <ext/qt/gstqtgl.h> | ||
51 | #include "qtwindow.h" | ||
52 | #include "gstqsgtexture.h" | ||
53 | #include "gstqtglutility.h" | ||
54 | -- | ||
55 | 2.26.0 | ||
56 | |||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb index 8b34111d38..17c9421394 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb | |||
@@ -2,6 +2,8 @@ require gstreamer1.0-plugins-common.inc | |||
2 | 2 | ||
3 | SRC_URI = " \ | 3 | SRC_URI = " \ |
4 | https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ | 4 | https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ |
5 | file://0001-qmlgl-ensure-Qt-defines-GLsync-to-fix-compile-on-som.patch \ | ||
6 | file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \ | ||
5 | " | 7 | " |
6 | 8 | ||
7 | SRC_URI[md5sum] = "bd025f8f14974f94b75ac69a9d1b9c93" | 9 | SRC_URI[md5sum] = "bd025f8f14974f94b75ac69a9d1b9c93" |