summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorThomas WeiƟschuh <thomas@t-8ch.de>2022-10-02 20:03:19 +0200
committerPhilip Langdale <github.philipl@overt.org>2022-10-06 13:16:35 -0700
commit161bdd9359cfb1131d36cc1596a2a0ad7e481b18 (patch)
tree45b495d07d354be9aa482e69bb991d7972511b24 /audio
parenta1e29f15552cf50de8f35fb6f7216fa7d36a2607 (diff)
downloadmpv-master.tar.bz2
mpv-master.tar.xz
ao_pipewire: allow specification of remote nameHEADmaster
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_pipewire.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c
index b9144f9921..bfb7eefe24 100644
--- a/audio/out/ao_pipewire.c
+++ b/audio/out/ao_pipewire.c
@@ -59,6 +59,7 @@ struct priv {
struct {
int buffer_msec;
+ char *remote;
} options;
struct {
@@ -405,9 +406,15 @@ static int pipewire_init_boilerplate(struct ao *ao)
if (!context)
goto error;
- p->core = pw_context_connect(context, NULL, 0);
- if (!p->core)
+ p->core = pw_context_connect(
+ context,
+ pw_properties_new(PW_KEY_REMOTE_NAME, p->options.remote, NULL),
+ 0);
+ if (!p->core) {
+ MP_WARN(ao, "Could not connect to context '%s': %s\n",
+ p->options.remote, strerror(errno));
goto error;
+ }
ret = 0;
@@ -756,6 +763,7 @@ const struct ao_driver audio_out_pipewire = {
.options_prefix = "pipewire",
.options = (const struct m_option[]) {
{"buffer", OPT_INT(options.buffer_msec), M_RANGE(1, 2000)},
+ {"remote", OPT_STRING(options.remote) },
{0}
},
};