[patch] add gst-plugins-base-gl (gst-plugins with opengl support)

  • Open
  • quality assurance status badge
Details
3 participants
  • Dr. Arne Babenhauserheide
  • Liliana Marie Prikler
  • Maxime Devos
Owner
unassigned
Submitted by
Dr. Arne Babenhauserheide
Severity
normal
D
D
Dr. Arne Babenhauserheide wrote on 5 Oct 2022 10:25
(address . bug-guix@gnu.org)
87fsg2ad5y.fsf@web.de
Hi,

the following patch adds a base gstreamer plugins package with opengl support:
From 515535c638bd079839882a7a3c2fcf89defee984 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab@web.de>
Date: Wed, 24 Nov 2021 01:58:32 +0100
Subject: [PATCH] gnu: gst-plugins-base-gl: add package version that includes
opengl.

* gnu/packages/gstreamerr.scm (gst-plugins-base-gl): -Dgl=enabled, input: mesa
---
gnu/packages/gstreamer.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (24 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index a1503602ad..0d442a1e04 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -626,6 +626,17 @@ (define-public gst-plugins-base
for the GStreamer multimedia library.")
(license license:lgpl2.0+)))
+(define-public gst-plugins-base-gl
+ (package (inherit gst-plugins-base)
+ (name "gst-plugins-base-gl")
+ (inputs
+ `(("mesa" ,mesa) ;; required for libgstgl
+ ,@(package-inputs gst-plugins-base)))
+ (arguments
+ `(,@(package-arguments gst-plugins-base)
+ #:tests? #f ;; check fails with gl
+ #:configure-flags '("-Dgl=enabled"))))) ;; requires mesa)
+
(define-public gst-plugins-good
(package
(name "gst-plugins-good")
--
2.37.3
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmM9P9sQHGFybmVfYmFi
QHdlYi5kZQAKCRAT741FJAPD6xsbD/9Dykps3tCxb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05.10.2022 um 10:25 +0200 schrieb Dr. Arne
Babenhauserheide:
Toggle quote (3 lines)
> +(define-public gst-plugins-base-gl
> + (package (inherit gst-plugins-base)
> + (name "gst-plugins-base-gl")
Is there a cycle between gst-plugins-base and mesa otherwise? If not,
we could merge them on staging.
Toggle quote (3 lines)
> + (inputs
> + `(("mesa" ,mesa) ;; required for libgstgl
> + ,@(package-inputs gst-plugins-base)))
Prefer modify-inputs.
Toggle quote (4 lines)
> + (arguments
> + `(,@(package-arguments gst-plugins-base)
> + #:tests? #f ;; check fails with gl
> + #:configure-flags '("-Dgl=enabled"))))) ;; requires mesa)
Prefer substitute-keyword-arguments. Also, why do the checks fail with
gl? Is one of them broken?

Cheers
D
D
Dr. Arne Babenhauserheide wrote on 5 Oct 2022 18:04
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)(address . 58299@debbugs.gnu.org)
87o7up6g8c.fsf@web.de
Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:

Toggle quote (8 lines)
> Am Mittwoch, dem 05.10.2022 um 10:25 +0200 schrieb Dr. Arne
> Babenhauserheide:
>> +(define-public gst-plugins-base-gl
>> + (package (inherit gst-plugins-base)
>> + (name "gst-plugins-base-gl")
> Is there a cycle between gst-plugins-base and mesa otherwise? If not,
> we could merge them on staging.

There’s no cycle, but gst-plugins-base-gl cannot be installed without
mesa and mesa is large.


Toggle quote (3 lines)
> Prefer modify-inputs.
> Prefer substitute-keyword-arguments.

Is it better like this?
From 3c50c737ad24e361b85c8120a20275e91b72c737 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab@web.de>
Date: Wed, 24 Nov 2021 01:58:32 +0100
Subject: [PATCH] gnu: gst-plugins-base-gl: add package version that includes
opengl.

* gnu/packages/gstreamerr.scm (gst-plugins-base-gl): -Dgl=enabled, input: mesa
---
gnu/packages/gstreamer.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index a1503602ad..73d20f836e 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -35,6 +35,7 @@ (define-module (gnu packages gstreamer)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system trivial)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages aidc)
@@ -626,6 +627,19 @@ (define-public gst-plugins-base
for the GStreamer multimedia library.")
(license license:lgpl2.0+)))
+(define-public gst-plugins-base-gl
+ (package
+ (inherit gst-plugins-base)
+ (name "gst-plugins-base-gl")
+ (inputs
+ (modify-inputs (package-inputs gst-plugins-base)
+ (append mesa))) ;; required for libgstgl
+ (arguments
+ (substitute-keyword-arguments (package-arguments gst-plugins-base)
+ ((#:tests? _ #f) #f) ;; check fails with gl
+ ((#:configure-flags flags ''())
+ #~(cons* "-Dgl=enabled" #$flags)))))) ;; requires mesa
+
(define-public gst-plugins-good
(package
(name "gst-plugins-good")
--
2.37.3
Toggle quote (2 lines)
> Also, why do the checks fail with gl? Is one of them broken?

I don’t know which broke it — I did not have enough time to search deeper.

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmM+CVcQHGFybmVfYmFi
QHdlYi5kZQAKCRAT741FJAPD62FVEACng2OwzeB3hh72UCWIWsd9UoYyjFQZceE4
BrD+GFxV6YNkK1Ycz6FiGK6uTxl6ZY03j9boqtd2ZawmWOeZ3mqPH4fL2fUca/Qd
8W0/Wke2CHcPO/dYqkZ4DTZ3HLDnZivvGEYuy7Bxf3To3o/WGafmg9/E9YmxcfW2
3KeLa7b90TLFfHRIgp8CXjrE2wQUtd2PKpWEoO+y9aPumiXyUcBPGfd6RhhlaWyy
ijnpQixvwK31Fp1n0PkefPLH/53sqzCCgeolzSXs8rT+WZUZz695y239X8MjcP9T
P+dgoisAArZ2UTZ+HyZnmrNTSqTltD7odTpLtGN3uKKW5KT6wMfQzci20JuvdaUy
KB/JRRSs2ZhBsqxn2Xpg5teLgM410Qc0vpZUz4TYHL3M8kJI8KWy8ItwdUmh6LaS
VM1M902RVT/duOSoch3oYquxPHb6M5tzBdw9PQihFFtD5TTbMVZDddSKfVp8Ixj1
qu2wZ8vHTYY61S0zChysZm8gGhwjWMJbf0Rtg3FRazWswBzxLkqU0DE7/thNZpB4
GoTh8OTgphnTS3O904NfFvz/ykt2vcVqaDfIWRyAU1ID6q3S5o2Z8ATupPibzFuO
+Sg9DIqpaujnUWfU6Cog1YlAvu08rz2OL9zL9xMF9vkEWqirLtvRoJfpJ/g/PlWa
eDT12PXsCIjEBAEBCAAuFiEE3Si95tmHXKvOSosd3M8NswvBBUgFAmM+CVcQHGFy
bmVfYmFiQHdlYi5kZQAKCRDczw2zC8EFSCU3A/9wb7AUky31ChR98yWIhXZrI8Aw
V8WHih1CO1LUnF0pFYpgXNTUmgewGrakirRCx9lCxV9j3qUtSwHJKvm7PK+EJkHB
qIQe+BZoeCPew5N9Mn5MLPtP6HRFYDKHJ2a3RvlX3/MR8OrKi7Wbj2LNKzYt3o9N
Omh51lX/KwCq9xuuZw==
=HzG7
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 6 Oct 2022 10:05
Re: bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)
084d5707-c0c5-7ba2-c350-ebd2eb290ba0@telenet.be
On 05-10-2022 10:25, Dr. Arne Babenhauserheide wrote:
Toggle quote (3 lines)
> Hi,
>
> the following patch adds a base gstreamer plugins package with opengl support:
Not sure how I received this, as I unsubscribed from guix-patches, but a
note:
IIUC, you are enabling extra plugins -- so gst-plugins-base-gl also
contains the non-gl plugins.
Take some non-gl plugin 'foo', of which there is a copy in both
gst-plugins-base-gl and gst-plugins-base.
This can potentially lead to a situation where an application loads two
copies of foo into the same process (of gst-plugins-base and
gst-plugins-base-gl). This can lead to bugs, see e.g.
I don't know if gst stuff cares (and maybe gst refuses to load plugins
it already has loaded), but it is potentially risky.
To avoid this, I propose to let gst-plugins-base-gl _only_ contain
plugins that use gl.
> + `(("mesa" ,mesa) ;; required for libgstgl
Maybe my local Guix is out-of-date, but mesa is already in
gst-plugin-base's inputs. If it's actually unused by gst-plugin-base, I
suppose it could be removed on core-updates, to avoid the large mesa.
Toggle quote (3 lines)
> + (inputs
> + (modify-inputs (package-inputs gst-plugins-base)
> + (append mesa))) ;; required for libgstgl
I recommend 'prepend' instead of 'append' for being a tiny bit faster
(prepend doesn't need to iterate through the old input list).
Also, a modified description and synopsis, to help users deciding
between gst-plugins-base, gst-plugins-base-gl or both.
Greetings,
Maxime.
Attachment: OpenPGP_signature
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 58299@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58299
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch