Gentoo Archives: gentoo-commits

From: Ronny Gutbrod <gentoo@××××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-plugins/gst-plugins-qt5/, media-plugins/gst-plugins-qt5/files/
Date: Mon, 04 Oct 2021 11:46:02
Message-Id: 1633347761.cea32f337b4edb06fe86ca6f969c385f2d0d6d94.tastytea@gentoo
1 commit: cea32f337b4edb06fe86ca6f969c385f2d0d6d94
2 Author: Nicolas Werner <nicolas.werner <AT> hotmail <DOT> de>
3 AuthorDate: Sun Jul 25 22:40:31 2021 +0000
4 Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
5 CommitDate: Mon Oct 4 11:42:41 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cea32f33
7
8 media-plugins/gst-plugins-qt5: new package
9
10 Dependency for >net-im/nheko-0.8.2.
11
12 Bug: https://bugs.gentoo.org/810814
13 Package-Manager: Portage-3.0.20, Repoman-3.0.2
14 Signed-off-by: Nicolas Werner <nicolas.werner <AT> hotmail.de>
15 Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
16
17 media-plugins/gst-plugins-qt5/Manifest | 1 +
18 ...t-dont-use-volatile-to-mean-atomic-1.18.4.patch | 249 +++++++++++++++++++++
19 .../gst-plugins-qt5/gst-plugins-qt5-1.18.4.ebuild | 34 +++
20 media-plugins/gst-plugins-qt5/metadata.xml | 19 ++
21 4 files changed, 303 insertions(+)
22
23 diff --git a/media-plugins/gst-plugins-qt5/Manifest b/media-plugins/gst-plugins-qt5/Manifest
24 new file mode 100644
25 index 000000000..b8849d87d
26 --- /dev/null
27 +++ b/media-plugins/gst-plugins-qt5/Manifest
28 @@ -0,0 +1 @@
29 +DIST gst-plugins-good-1.18.4.tar.xz 3277572 BLAKE2B 8acfb975d19eabc681184d0096328051a9a02e5f849599dbad1233a0e9254e1a2d2bef75d8afdc779a7ca01a71b15d1e83a843749c0ef5f7ab2b5818067ab898 SHA512 764c66383c93e57f9c5e7742002013e07e7b25750d6974d6c07744433e8ceb7570e829e68278e2bc5214f77158311a6b3bfb013d615cf66205d8d7a9e2d54b86
30
31 diff --git a/media-plugins/gst-plugins-qt5/files/gst-dont-use-volatile-to-mean-atomic-1.18.4.patch b/media-plugins/gst-plugins-qt5/files/gst-dont-use-volatile-to-mean-atomic-1.18.4.patch
32 new file mode 100644
33 index 000000000..fd12de3ee
34 --- /dev/null
35 +++ b/media-plugins/gst-plugins-qt5/files/gst-dont-use-volatile-to-mean-atomic-1.18.4.patch
36 @@ -0,0 +1,249 @@
37 +From 612102fdbc3f813bf9d3406165692b5f742e51a6 Mon Sep 17 00:00:00 2001
38 +From: Matthew Waters <matthew@×××××××××××.com>
39 +Date: Thu, 18 Mar 2021 19:52:53 +1100
40 +Subject: [PATCH] gst: don't use volatile to mean atomic
41 +
42 +volatile is not sufficient to provide atomic guarantees and real atomics
43 +should be used instead. GCC 11 has started warning about using volatile
44 +with atomic operations.
45 +
46 +https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
47 +
48 +Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
49 +
50 +Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/911>
51 +---
52 + ext/jack/gstjack.c | 6 +++---
53 + ext/jack/gstjackaudiosink.c | 2 +-
54 + ext/jack/gstjackaudiosrc.c | 2 +-
55 + ext/pulse/pulsesink.h | 2 +-
56 + ext/qt/gstqsgtexture.cc | 2 +-
57 + ext/qt/gstqtglutility.cc | 2 +-
58 + ext/qt/qtglrenderer.cc | 6 +++---
59 + ext/qt/qtitem.cc | 2 +-
60 + ext/qt/qtwindow.cc | 4 ++--
61 + ext/vpx/gstvpxdec.c | 2 +-
62 + ext/vpx/gstvpxenc.c | 16 ++++++++--------
63 + gst/audioparsers/gstac3parse.h | 2 +-
64 + sys/rpicamsrc/gstrpicamsrc.c | 2 +-
65 + sys/ximage/ximageutil.c | 2 +-
66 + 14 files changed, 26 insertions(+), 26 deletions(-)
67 +
68 +diff --git a/ext/jack/gstjack.c b/ext/jack/gstjack.c
69 +index ca98dc405..fdd507d87 100644
70 +--- a/ext/jack/gstjack.c
71 ++++ b/ext/jack/gstjack.c
72 +@@ -28,7 +28,7 @@
73 + GType
74 + gst_jack_connect_get_type (void)
75 + {
76 +- static volatile gsize jack_connect_type = 0;
77 ++ static gsize jack_connect_type = 0;
78 +
79 + if (g_once_init_enter (&jack_connect_type)) {
80 + static const GEnumValue jack_connect_enums[] = {
81 +@@ -50,7 +50,7 @@ gst_jack_connect_get_type (void)
82 + GType
83 + gst_jack_transport_get_type (void)
84 + {
85 +- static volatile gsize type = 0;
86 ++ static gsize type = 0;
87 +
88 + if (g_once_init_enter (&type)) {
89 + static const GFlagsValue flag_values[] = {
90 +@@ -84,7 +84,7 @@ gst_jack_client_free (gpointer jclient)
91 + GType
92 + gst_jack_client_get_type (void)
93 + {
94 +- static volatile gsize jack_client_type = 0;
95 ++ static gsize jack_client_type = 0;
96 +
97 + if (g_once_init_enter (&jack_client_type)) {
98 + /* hackish, but makes it show up nicely in gst-inspect */
99 +diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c
100 +index ee7cea8c0..6e8d04ae5 100644
101 +--- a/ext/jack/gstjackaudiosink.c
102 ++++ b/ext/jack/gstjackaudiosink.c
103 +@@ -131,7 +131,7 @@ gst_jack_audio_sink_free_channels (GstJackAudioSink * sink)
104 + static GType
105 + gst_jack_ring_buffer_get_type (void)
106 + {
107 +- static volatile gsize ringbuffer_type = 0;
108 ++ static gsize ringbuffer_type = 0;
109 +
110 + if (g_once_init_enter (&ringbuffer_type)) {
111 + static const GTypeInfo ringbuffer_info = {
112 +diff --git a/ext/jack/gstjackaudiosrc.c b/ext/jack/gstjackaudiosrc.c
113 +index 1d2cf82ee..d43a447a7 100644
114 +--- a/ext/jack/gstjackaudiosrc.c
115 ++++ b/ext/jack/gstjackaudiosrc.c
116 +@@ -151,7 +151,7 @@ gst_jack_audio_src_free_channels (GstJackAudioSrc * src)
117 + static GType
118 + gst_jack_ring_buffer_get_type (void)
119 + {
120 +- static volatile gsize ringbuffer_type = 0;
121 ++ static gsize ringbuffer_type = 0;
122 +
123 + if (g_once_init_enter (&ringbuffer_type)) {
124 + static const GTypeInfo ringbuffer_info = { sizeof (GstJackRingBufferClass),
125 +diff --git a/ext/pulse/pulsesink.h b/ext/pulse/pulsesink.h
126 +index 86f3dcdbb..51ec86a25 100644
127 +--- a/ext/pulse/pulsesink.h
128 ++++ b/ext/pulse/pulsesink.h
129 +@@ -72,7 +72,7 @@ struct _GstPulseSink
130 + GstStructure *properties;
131 + pa_proplist *proplist;
132 +
133 +- volatile gint format_lost;
134 ++ gint format_lost;
135 + GstClockTime format_lost_time;
136 + };
137 +
138 +diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
139 +index 1f0a2e6e1..00e2ddad0 100644
140 +--- a/ext/qt/gstqsgtexture.cc
141 ++++ b/ext/qt/gstqsgtexture.cc
142 +@@ -35,7 +35,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
143 +
144 + GstQSGTexture::GstQSGTexture ()
145 + {
146 +- static volatile gsize _debug;
147 ++ static gsize _debug;
148 +
149 + initializeOpenGLFunctions();
150 +
151 +diff --git a/ext/qt/gstqtglutility.cc b/ext/qt/gstqtglutility.cc
152 +index acb89b6e1..d2c092202 100644
153 +--- a/ext/qt/gstqtglutility.cc
154 ++++ b/ext/qt/gstqtglutility.cc
155 +@@ -66,7 +66,7 @@ gst_qt_get_gl_display ()
156 + {
157 + GstGLDisplay *display = NULL;
158 + QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
159 +- static volatile gsize _debug;
160 ++ static gsize _debug;
161 +
162 + g_assert (app != NULL);
163 +
164 +diff --git a/ext/qt/qtglrenderer.cc b/ext/qt/qtglrenderer.cc
165 +index 2ad5601fc..52965fd0b 100644
166 +--- a/ext/qt/qtglrenderer.cc
167 ++++ b/ext/qt/qtglrenderer.cc
168 +@@ -22,7 +22,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
169 + static void
170 + init_debug (void)
171 + {
172 +- static volatile gsize _debug;
173 ++ static gsize _debug;
174 +
175 + if (g_once_init_enter (&_debug)) {
176 + GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglrenderer", 0,
177 +@@ -115,7 +115,7 @@ typedef enum
178 +
179 + struct SharedRenderData
180 + {
181 +- volatile int refcount;
182 ++ int refcount;
183 + SharedRenderDataState state;
184 + GMutex lock;
185 + GCond cond;
186 +@@ -130,7 +130,7 @@ shared_render_data_new (void)
187 + {
188 + struct SharedRenderData *ret = g_new0 (struct SharedRenderData, 1);
189 +
190 +- ret->refcount = 1;
191 ++ g_atomic_int_set (&ret->refcount, 1);
192 + g_mutex_init (&ret->lock);
193 +
194 + return ret;
195 +diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
196 +index 2869ea92b..da2b70190 100644
197 +--- a/ext/qt/qtitem.cc
198 ++++ b/ext/qt/qtitem.cc
199 +@@ -112,7 +112,7 @@ void InitializeSceneGraph::run()
200 +
201 + QtGLVideoItem::QtGLVideoItem()
202 + {
203 +- static volatile gsize _debug;
204 ++ static gsize _debug;
205 +
206 + if (g_once_init_enter (&_debug)) {
207 + GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglwidget", 0, "Qt GL Widget");
208 +diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
209 +index 9360c3337..7c44ac54e 100644
210 +--- a/ext/qt/qtwindow.cc
211 ++++ b/ext/qt/qtwindow.cc
212 +@@ -103,7 +103,7 @@ QtGLWindow::QtGLWindow ( QWindow * parent, QQuickWindow *src ) :
213 + QQuickWindow( parent ), source (src)
214 + {
215 + QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
216 +- static volatile gsize _debug;
217 ++ static gsize _debug;
218 +
219 + g_assert (app != NULL);
220 +
221 +@@ -152,7 +152,7 @@ QtGLWindow::beforeRendering()
222 +
223 + g_mutex_lock (&this->priv->lock);
224 +
225 +- static volatile gsize once = 0;
226 ++ static gsize once = 0;
227 + if (g_once_init_enter(&once)) {
228 + this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch();
229 + g_once_init_leave(&once,1);
230 +diff --git a/ext/vpx/gstvpxdec.c b/ext/vpx/gstvpxdec.c
231 +index 19a24870c..adf842813 100644
232 +--- a/ext/vpx/gstvpxdec.c
233 ++++ b/ext/vpx/gstvpxdec.c
234 +@@ -79,7 +79,7 @@ gst_vpx_dec_post_processing_flags_get_type (void)
235 + {C_FLAGS (VP8_MFQE), "Multi-frame quality enhancement", "mfqe"},
236 + {0, NULL, NULL}
237 + };
238 +- static volatile GType id = 0;
239 ++ static GType id = 0;
240 +
241 + if (g_once_init_enter ((gsize *) & id)) {
242 + GType _id;
243 +diff --git a/gst/audioparsers/gstac3parse.h b/gst/audioparsers/gstac3parse.h
244 +index 0e7af5acd..81e2104d5 100644
245 +--- a/gst/audioparsers/gstac3parse.h
246 ++++ b/gst/audioparsers/gstac3parse.h
247 +@@ -62,7 +62,7 @@ struct _GstAc3Parse {
248 + gint blocks;
249 + gboolean eac;
250 + gboolean sent_codec_tag;
251 +- volatile gint align;
252 ++ gint align;
253 + GstPadChainFunction baseparse_chainfunc;
254 + };
255 +
256 +diff --git a/sys/rpicamsrc/gstrpicamsrc.c b/sys/rpicamsrc/gstrpicamsrc.c
257 +index 2aa28f488..6ab601631 100644
258 +--- a/sys/rpicamsrc/gstrpicamsrc.c
259 ++++ b/sys/rpicamsrc/gstrpicamsrc.c
260 +@@ -292,7 +292,7 @@ gst_rpi_cam_src_sensor_mode_get_type (void)
261 + "640x480 4:3 60.1-90fps", "640x480-fast"},
262 + {0, NULL, NULL}
263 + };
264 +- static volatile GType id = 0;
265 ++ static GType id = 0;
266 + if (g_once_init_enter ((gsize *) & id)) {
267 + GType _id;
268 + _id = g_enum_register_static ("GstRpiCamSrcSensorMode", values);
269 +diff --git a/sys/ximage/ximageutil.c b/sys/ximage/ximageutil.c
270 +index 57c9392c7..018b60515 100644
271 +--- a/sys/ximage/ximageutil.c
272 ++++ b/sys/ximage/ximageutil.c
273 +@@ -26,7 +26,7 @@
274 + GType
275 + gst_meta_ximage_api_get_type (void)
276 + {
277 +- static volatile GType type;
278 ++ static GType type;
279 + static const gchar *tags[] = { "memory", NULL };
280 +
281 + if (g_once_init_enter (&type)) {
282 +--
283 +GitLab
284 +
285 +
286
287 diff --git a/media-plugins/gst-plugins-qt5/gst-plugins-qt5-1.18.4.ebuild b/media-plugins/gst-plugins-qt5/gst-plugins-qt5-1.18.4.ebuild
288 new file mode 100644
289 index 000000000..c11f6a888
290 --- /dev/null
291 +++ b/media-plugins/gst-plugins-qt5/gst-plugins-qt5-1.18.4.ebuild
292 @@ -0,0 +1,34 @@
293 +# Copyright 1999-2021 Gentoo Authors
294 +# Distributed under the terms of the GNU General Public License v2
295 +
296 +EAPI=7
297 +
298 +GST_ORG_MODULE=gst-plugins-good
299 +
300 +inherit gstreamer-meson
301 +
302 +DESCRIPTION="Qt5 QML video sink plugin for GStreamer"
303 +KEYWORDS="~amd64"
304 +IUSE="+egl orc wayland +X"
305 +
306 +REQUIRED_USE="
307 + wayland? ( egl )
308 +"
309 +
310 +RDEPEND="
311 + >=media-libs/gst-plugins-base-${PV}:${SLOT}[egl?,opengl,wayland?,X?]
312 + media-libs/mesa[egl?,X?]
313 + dev-qt/qtcore:5
314 + dev-qt/qtdeclarative:5
315 + dev-qt/qtgui:5
316 + egl? ( dev-qt/qtgui:5[eglfs] )
317 + wayland? ( dev-qt/qtwayland:5 )
318 + X? ( dev-qt/qtx11extras:5 )
319 +"
320 +DEPEND="${RDEPEND}"
321 +
322 +PATCHES=(
323 + "${FILESDIR}/gst-dont-use-volatile-to-mean-atomic-1.18.4.patch"
324 +)
325 +
326 +GST_PLUGINS_BUILD_DIR="qt"
327
328 diff --git a/media-plugins/gst-plugins-qt5/metadata.xml b/media-plugins/gst-plugins-qt5/metadata.xml
329 new file mode 100644
330 index 000000000..bae7748a8
331 --- /dev/null
332 +++ b/media-plugins/gst-plugins-qt5/metadata.xml
333 @@ -0,0 +1,19 @@
334 +<?xml version="1.0" encoding="UTF-8"?>
335 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
336 +<pkgmetadata>
337 + <maintainer type="person">
338 + <email>gentoo@××××××××.de</email>
339 + <name>Ronny (tastytea) Gutbrod</name>
340 + </maintainer>
341 + <longdescription lang="en">
342 + GStreamer plugin for the Qt Qml elements
343 +
344 + Includes the following elements:
345 + * qmlgloverlay – A filter that renders a QML scene onto a video stream
346 + * qmlglsink – A video sink that renders to a QQuickItem
347 + * qmlglsrc – A video src that captures a window from a QML view
348 +</longdescription>
349 + <use>
350 + <flag name="egl">Enable EGL support.</flag>
351 + </use>
352 +</pkgmetadata>