unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)
@ 2022-10-05  8:25 Dr. Arne Babenhauserheide
  2022-10-05  9:58 ` Liliana Marie Prikler
  2022-10-06  8:05 ` Maxime Devos
  0 siblings, 2 replies; 4+ messages in thread
From: Dr. Arne Babenhauserheide @ 2022-10-05  8:25 UTC (permalink / raw)
  To: 58299


[-- Attachment #1.1: Type: text/plain, Size: 85 bytes --]

Hi,

the following patch adds a base gstreamer plugins package with opengl support:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-gst-plugins-base-gl-add-package-version-that-inc.patch --]
[-- Type: text/x-patch, Size: 1220 bytes --]

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(+)

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


[-- Attachment #1.3: Type: text/plain, Size: 101 bytes --]


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)
  2022-10-05  8:25 bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support) Dr. Arne Babenhauserheide
@ 2022-10-05  9:58 ` Liliana Marie Prikler
  2022-10-05 16:04   ` Dr. Arne Babenhauserheide
  2022-10-06  8:05 ` Maxime Devos
  1 sibling, 1 reply; 4+ messages in thread
From: Liliana Marie Prikler @ 2022-10-05  9:58 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide, 58299

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.
> +    (inputs
> +     `(("mesa" ,mesa) ;; required for libgstgl
> +       ,@(package-inputs gst-plugins-base)))
Prefer modify-inputs.
> +    (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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)
  2022-10-05  9:58 ` Liliana Marie Prikler
@ 2022-10-05 16:04   ` Dr. Arne Babenhauserheide
  0 siblings, 0 replies; 4+ messages in thread
From: Dr. Arne Babenhauserheide @ 2022-10-05 16:04 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 58299


[-- Attachment #1.1: Type: text/plain, Size: 581 bytes --]


Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:

> 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.


> Prefer modify-inputs.
> Prefer substitute-keyword-arguments.  

Is it better like this?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: gst-plugins-base-gl --]
[-- Type: text/x-patch, Size: 1629 bytes --]

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(+)

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


[-- Attachment #1.3: Type: text/plain, Size: 249 bytes --]


> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)
  2022-10-05  8:25 bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support) Dr. Arne Babenhauserheide
  2022-10-05  9:58 ` Liliana Marie Prikler
@ 2022-10-06  8:05 ` Maxime Devos
  1 sibling, 0 replies; 4+ messages in thread
From: Maxime Devos @ 2022-10-06  8:05 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide, 58299


[-- Attachment #1.1.1: Type: text/plain, Size: 1587 bytes --]



On 05-10-2022 10:25, Dr. Arne Babenhauserheide wrote:
> 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. 
<https://issues.guix.gnu.org/47115#22>.

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.

> +    (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 #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-06  8:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05  8:25 bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support) Dr. Arne Babenhauserheide
2022-10-05  9:58 ` Liliana Marie Prikler
2022-10-05 16:04   ` Dr. Arne Babenhauserheide
2022-10-06  8:05 ` Maxime Devos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).