Initial commit
This commit is contained in:
+56
@@ -0,0 +1,56 @@
|
||||
From bf8b2fa0f6870589d036f0f33c140a3f85b530a0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 31 Mar 2020 21:23:28 -0700
|
||||
Subject: [PATCH] qt: include ext/qt/gstqtgl.h instead of gst/gl/gstglfuncs.h
|
||||
|
||||
gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to
|
||||
prefer qt headers definitions for GLsync
|
||||
|
||||
This helps in fixing build errors like below
|
||||
|
||||
/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'
|
||||
24 | typedef struct __GLsync *GLsync;
|
||||
| ^~~~~~
|
||||
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,
|
||||
from ../gst-plugins-good-1.16.2/ext/qt/gstqsgtexture.cc:30:
|
||||
/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
|
||||
'
|
||||
40 | typedef gpointer GLsync;
|
||||
| ^~~~~~
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
ext/qt/gstqsgtexture.cc | 2 +-
|
||||
ext/qt/qtwindow.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
|
||||
index a05d26e..4cc9fc6 100644
|
||||
--- a/ext/qt/gstqsgtexture.cc
|
||||
+++ b/ext/qt/gstqsgtexture.cc
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/gl/gl.h>
|
||||
-#include <gst/gl/gstglfuncs.h>
|
||||
+#include <ext/qt/gstqtgl.h>
|
||||
#include "gstqsgtexture.h"
|
||||
|
||||
#define GST_CAT_DEFAULT gst_qsg_texture_debug
|
||||
diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
|
||||
index 9360c33..0dfd3f1 100644
|
||||
--- a/ext/qt/qtwindow.cc
|
||||
+++ b/ext/qt/qtwindow.cc
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <gst/video/video.h>
|
||||
-#include <gst/gl/gstglfuncs.h>
|
||||
+#include <ext/qt/gstqtgl.h>
|
||||
#include "qtwindow.h"
|
||||
#include "gstqsgtexture.h"
|
||||
#include "gstqtglutility.h"
|
||||
--
|
||||
2.28.0
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
From 5ce1e410965ed047a03c09b17796162f0363e396 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 13 Feb 2023 12:47:31 -0800
|
||||
Subject: [PATCH] v4l2: Define ioctl_req_t for posix/linux case
|
||||
|
||||
this is an issue seen with musl based linux distros e.g. alpine [1]
|
||||
musl is not going to change this since it breaks ABI/API interfaces
|
||||
Newer compilers are stringent ( e.g. clang16 ) which can now detect
|
||||
signature mismatches in function pointers too, existing code warned but
|
||||
did not error with older clang
|
||||
|
||||
Fixes
|
||||
gstv4l2object.c:544:23: error: incompatible function pointer types assigning to 'gint (*)(gint, ioctl_req_t, ...)' (aka 'int (*)(int, unsigned long, ...)') from 'int (int, int, ...)' [-Wincompatible-function-pointer-types]
|
||||
v4l2object->ioctl = ioctl;
|
||||
^ ~~~~~
|
||||
|
||||
[1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/7580
|
||||
|
||||
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3950]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
sys/v4l2/gstv4l2object.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h
|
||||
index 3a5c961..4f43008 100644
|
||||
--- a/sys/v4l2/gstv4l2object.h
|
||||
+++ b/sys/v4l2/gstv4l2object.h
|
||||
@@ -76,6 +76,8 @@ typedef gboolean (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object);
|
||||
* 'unsigned long' for the 2nd parameter */
|
||||
#ifdef __ANDROID__
|
||||
typedef unsigned ioctl_req_t;
|
||||
+#elif defined(__linux__) && !defined(__GLIBC__) /* musl/linux */
|
||||
+typedef int ioctl_req_t;
|
||||
#else
|
||||
typedef gulong ioctl_req_t;
|
||||
#endif
|
||||
--
|
||||
2.39.1
|
||||
|
||||
Reference in New Issue
Block a user