Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Mpv pipewire
@ 2023-07-23  7:39 lemmi
  2023-07-23  7:39 ` [PR PATCH] [Updated] " lemmi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: lemmi @ 2023-07-23  7:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

There is a new pull request by lemmi against master on the void-packages repository

https://github.com/lemmi/void-packages mpv-pipewire
https://github.com/void-linux/void-packages/pull/45200

Mpv pipewire
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/45200.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv-pipewire-45200.patch --]
[-- Type: text/x-diff, Size: 5287 bytes --]

From cabfc6705942d40d220ddafecc7f5ae125aa47f4 Mon Sep 17 00:00:00 2001
From: lemmi <lemmi@nerd2nerd.org>
Date: Thu, 20 Jul 2023 08:58:13 +0200
Subject: [PATCH 1/2] btdu: update to 0.5.1.

---
 srcpkgs/btdu/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/btdu/template b/srcpkgs/btdu/template
index 3e08d8262b4ce..ad42c058289e5 100644
--- a/srcpkgs/btdu/template
+++ b/srcpkgs/btdu/template
@@ -1,10 +1,10 @@
 # Template file for 'btdu'
 pkgname=btdu
-version=0.5.0
+version=0.5.1
 revision=1
 # fails to build on musl due to different argument types for ioctl
 # struct packing seems to differ on i686 archs and therefore d-btrfs fails
-archs="x86_64"
+archs="x86_64*"
 hostmakedepends="ldc dub"
 makedepends="zlib-devel ncurses-devel"
 short_desc="Sampling disk usage profiler for btrfs"
@@ -12,7 +12,7 @@ maintainer="Siddhartha Menon <siddharthamenon+void@outlook.com>"
 license="GPL-2.0-only"
 homepage="https://github.com/CyberShadow/btdu"
 distfiles="https://github.com/CyberShadow/btdu/archive/v${version}.tar.gz"
-checksum=90ba4d8997575993e9d39a503779fb32b37bb62b8d9386776e95743bfc859606
+checksum=566269f365811f6db53280fc5476a7fcf34791396ee4e090c150af4280b35ba5
 nocross="dmd compilation fails on cross"
 
 do_build() {

From 755937f2a9bfc81150fa7650af2aa4a2434a0f99 Mon Sep 17 00:00:00 2001
From: lemmi <lemmi@nerd2nerd.org>
Date: Sun, 23 Jul 2023 09:38:47 +0200
Subject: [PATCH 2/2] mpv: fix pipewire native client for pipewire-0.3.75_1

---
 srcpkgs/mpv/patches/pipewire-native.patch | 78 +++++++++++++++++++++++
 srcpkgs/mpv/template                      |  2 +-
 2 files changed, 79 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/mpv/patches/pipewire-native.patch

diff --git a/srcpkgs/mpv/patches/pipewire-native.patch b/srcpkgs/mpv/patches/pipewire-native.patch
new file mode 100644
index 0000000000000..8b2fe79530c5a
--- /dev/null
+++ b/srcpkgs/mpv/patches/pipewire-native.patch
@@ -0,0 +1,78 @@
+From ac6bb48728af60c706a6a92573ea13651adb6d7d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Sun, 23 Jul 2023 09:10:55 +0200
+Subject: [PATCH] ao_pipewire: for_each_sink: properly check termination
+ condition
+
+Doing a pw_thread_loop_wait() without checking conditions is invalid.
+The thread loop could be signalled for other reasons and in this case
+the wait needs to continue.
+
+PipeWire added such additional signaling in
+commit 33be898130f0 ("thread-loop: signal when started").
+
+This meant that for_each_sink would return before the callbacks have
+fired and session_has_sink() would incorrectly return "false", failing
+the initialization of ao_pipewire.
+
+Fixes #11995
+---
+ audio/out/ao_pipewire.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c
+index 8e93dc5341b..0a39e4e1a59 100644
+--- a/audio/out/ao_pipewire.c
++++ b/audio/out/ao_pipewire.c
+@@ -354,6 +354,11 @@ static void for_each_sink_registry_event_global(void *data, uint32_t id,
+ }
+ 
+ 
++struct for_each_done_ctx {
++    struct pw_thread_loop *loop;
++    bool done;
++};
++
+ static const struct pw_registry_events for_each_sink_registry_events = {
+     .version = PW_VERSION_REGISTRY_EVENTS,
+     .global = for_each_sink_registry_event_global,
+@@ -361,8 +366,9 @@ static const struct pw_registry_events for_each_sink_registry_events = {
+ 
+ static void for_each_sink_done(void *data, uint32_t it, int seq)
+ {
+-    struct pw_thread_loop *loop = data;
+-    pw_thread_loop_signal(loop, false);
++    struct for_each_done_ctx *ctx = data;
++    ctx->done = true;
++    pw_thread_loop_signal(ctx->loop, false);
+ }
+ 
+ static const struct pw_core_events for_each_sink_core_events = {
+@@ -376,12 +382,16 @@ static int for_each_sink(struct ao *ao, void (cb) (struct ao *ao, uint32_t id,
+     struct priv *priv = ao->priv;
+     struct pw_registry *registry;
+     struct spa_hook core_listener;
++    struct for_each_done_ctx done_ctx = {
++        .loop = priv->loop,
++        .done = false,
++    };
+     int ret = -1;
+ 
+     pw_thread_loop_lock(priv->loop);
+ 
+     spa_zero(core_listener);
+-    if (pw_core_add_listener(priv->core, &core_listener, &for_each_sink_core_events, priv->loop) < 0)
++    if (pw_core_add_listener(priv->core, &core_listener, &for_each_sink_core_events, &done_ctx) < 0)
+         goto unlock_loop;
+ 
+     registry = pw_core_get_registry(priv->core, PW_VERSION_REGISTRY, 0);
+@@ -400,7 +410,8 @@ static int for_each_sink(struct ao *ao, void (cb) (struct ao *ao, uint32_t id,
+     if (pw_registry_add_listener(registry, &registry_listener, &for_each_sink_registry_events, &revents_ctx) < 0)
+         goto destroy_registry;
+ 
+-    pw_thread_loop_wait(priv->loop);
++    while (!done_ctx.done)
++        pw_thread_loop_wait(priv->loop);
+ 
+     spa_hook_remove(&registry_listener);
+ 
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index e163c496c6ebb..d4fefbf5e3c7c 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,7 +1,7 @@
 # Template file for 'mpv'
 pkgname=mpv
 version=0.35.1
-revision=2
+revision=3
 build_style=meson
 configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
  -Dlibmpv=true -Dcplugins=enabled

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

* Re: [PR PATCH] [Updated] Mpv pipewire
  2023-07-23  7:39 [PR PATCH] Mpv pipewire lemmi
@ 2023-07-23  7:39 ` lemmi
  2023-07-23  7:49 ` mpv: fix pipewire native client for pipewire-0.3.75_1 lemmi
  2023-07-23 12:48 ` [PR PATCH] [Merged]: " lemmi
  2 siblings, 0 replies; 4+ messages in thread
From: lemmi @ 2023-07-23  7:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]

There is an updated pull request by lemmi against master on the void-packages repository

https://github.com/lemmi/void-packages mpv-pipewire
https://github.com/void-linux/void-packages/pull/45200

Mpv pipewire
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/45200.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv-pipewire-45200.patch --]
[-- Type: text/x-diff, Size: 4011 bytes --]

From 55476210df30aedcbb654813b8c253b777d2671e Mon Sep 17 00:00:00 2001
From: lemmi <lemmi@nerd2nerd.org>
Date: Sun, 23 Jul 2023 09:38:47 +0200
Subject: [PATCH] mpv: fix pipewire native client for pipewire-0.3.75_1

---
 srcpkgs/mpv/patches/pipewire-native.patch | 78 +++++++++++++++++++++++
 srcpkgs/mpv/template                      |  2 +-
 2 files changed, 79 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/mpv/patches/pipewire-native.patch

diff --git a/srcpkgs/mpv/patches/pipewire-native.patch b/srcpkgs/mpv/patches/pipewire-native.patch
new file mode 100644
index 0000000000000..8b2fe79530c5a
--- /dev/null
+++ b/srcpkgs/mpv/patches/pipewire-native.patch
@@ -0,0 +1,78 @@
+From ac6bb48728af60c706a6a92573ea13651adb6d7d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Sun, 23 Jul 2023 09:10:55 +0200
+Subject: [PATCH] ao_pipewire: for_each_sink: properly check termination
+ condition
+
+Doing a pw_thread_loop_wait() without checking conditions is invalid.
+The thread loop could be signalled for other reasons and in this case
+the wait needs to continue.
+
+PipeWire added such additional signaling in
+commit 33be898130f0 ("thread-loop: signal when started").
+
+This meant that for_each_sink would return before the callbacks have
+fired and session_has_sink() would incorrectly return "false", failing
+the initialization of ao_pipewire.
+
+Fixes #11995
+---
+ audio/out/ao_pipewire.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c
+index 8e93dc5341b..0a39e4e1a59 100644
+--- a/audio/out/ao_pipewire.c
++++ b/audio/out/ao_pipewire.c
+@@ -354,6 +354,11 @@ static void for_each_sink_registry_event_global(void *data, uint32_t id,
+ }
+ 
+ 
++struct for_each_done_ctx {
++    struct pw_thread_loop *loop;
++    bool done;
++};
++
+ static const struct pw_registry_events for_each_sink_registry_events = {
+     .version = PW_VERSION_REGISTRY_EVENTS,
+     .global = for_each_sink_registry_event_global,
+@@ -361,8 +366,9 @@ static const struct pw_registry_events for_each_sink_registry_events = {
+ 
+ static void for_each_sink_done(void *data, uint32_t it, int seq)
+ {
+-    struct pw_thread_loop *loop = data;
+-    pw_thread_loop_signal(loop, false);
++    struct for_each_done_ctx *ctx = data;
++    ctx->done = true;
++    pw_thread_loop_signal(ctx->loop, false);
+ }
+ 
+ static const struct pw_core_events for_each_sink_core_events = {
+@@ -376,12 +382,16 @@ static int for_each_sink(struct ao *ao, void (cb) (struct ao *ao, uint32_t id,
+     struct priv *priv = ao->priv;
+     struct pw_registry *registry;
+     struct spa_hook core_listener;
++    struct for_each_done_ctx done_ctx = {
++        .loop = priv->loop,
++        .done = false,
++    };
+     int ret = -1;
+ 
+     pw_thread_loop_lock(priv->loop);
+ 
+     spa_zero(core_listener);
+-    if (pw_core_add_listener(priv->core, &core_listener, &for_each_sink_core_events, priv->loop) < 0)
++    if (pw_core_add_listener(priv->core, &core_listener, &for_each_sink_core_events, &done_ctx) < 0)
+         goto unlock_loop;
+ 
+     registry = pw_core_get_registry(priv->core, PW_VERSION_REGISTRY, 0);
+@@ -400,7 +410,8 @@ static int for_each_sink(struct ao *ao, void (cb) (struct ao *ao, uint32_t id,
+     if (pw_registry_add_listener(registry, &registry_listener, &for_each_sink_registry_events, &revents_ctx) < 0)
+         goto destroy_registry;
+ 
+-    pw_thread_loop_wait(priv->loop);
++    while (!done_ctx.done)
++        pw_thread_loop_wait(priv->loop);
+ 
+     spa_hook_remove(&registry_listener);
+ 
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index e163c496c6ebb..d4fefbf5e3c7c 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,7 +1,7 @@
 # Template file for 'mpv'
 pkgname=mpv
 version=0.35.1
-revision=2
+revision=3
 build_style=meson
 configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
  -Dlibmpv=true -Dcplugins=enabled

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

* Re: mpv: fix pipewire native client for pipewire-0.3.75_1
  2023-07-23  7:39 [PR PATCH] Mpv pipewire lemmi
  2023-07-23  7:39 ` [PR PATCH] [Updated] " lemmi
@ 2023-07-23  7:49 ` lemmi
  2023-07-23 12:48 ` [PR PATCH] [Merged]: " lemmi
  2 siblings, 0 replies; 4+ messages in thread
From: lemmi @ 2023-07-23  7:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

New comment by lemmi on void-packages repository

https://github.com/void-linux/void-packages/pull/45200#issuecomment-1646772129

Comment:
- https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3374
- https://github.com/mpv-player/mpv/pull/11996

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

* Re: [PR PATCH] [Merged]: mpv: fix pipewire native client for pipewire-0.3.75_1
  2023-07-23  7:39 [PR PATCH] Mpv pipewire lemmi
  2023-07-23  7:39 ` [PR PATCH] [Updated] " lemmi
  2023-07-23  7:49 ` mpv: fix pipewire native client for pipewire-0.3.75_1 lemmi
@ 2023-07-23 12:48 ` lemmi
  2 siblings, 0 replies; 4+ messages in thread
From: lemmi @ 2023-07-23 12:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

There's a merged pull request on the void-packages repository

mpv: fix pipewire native client for pipewire-0.3.75_1
https://github.com/void-linux/void-packages/pull/45200

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

end of thread, other threads:[~2023-07-23 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-23  7:39 [PR PATCH] Mpv pipewire lemmi
2023-07-23  7:39 ` [PR PATCH] [Updated] " lemmi
2023-07-23  7:49 ` mpv: fix pipewire native client for pipewire-0.3.75_1 lemmi
2023-07-23 12:48 ` [PR PATCH] [Merged]: " lemmi

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 NNTP newsgroup(s).