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
6 gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to
7 prefer qt headers definitions for GLsync
9 This helps in fixing build errors like below
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;
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
18 40 | typedef gpointer GLsync;
21 Upstream-Status: Pending
22 Signed-off-by: Khem Raj <raj.khem@gmail.com>
24 ext/qt/gstqsgtexture.cc | 2 +-
25 ext/qt/qtwindow.cc | 2 +-
26 2 files changed, 2 insertions(+), 2 deletions(-)
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
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"
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
48 #include <gst/video/video.h>
49 -#include <gst/gl/gstglfuncs.h>
50 +#include <ext/qt/gstqtgl.h>
52 #include "gstqsgtexture.h"
53 #include "gstqtglutility.h"