ao_pipewire: add support for exclusive mode

This commit is contained in:
Thomas Weißschuh 2023-02-01 03:03:25 +00:00 committed by Philip Langdale
parent c29692d81d
commit 83681de3c1
2 changed files with 7 additions and 4 deletions

View File

@ -1846,10 +1846,10 @@ Audio
Enable exclusive output mode. In this mode, the system is usually locked
out, and only mpv will be able to output audio.
This only works for some audio outputs, such as ``wasapi`` and
``coreaudio``. Other audio outputs silently ignore this options. They either
have no concept of exclusive mode, or the mpv side of the implementation is
missing.
This only works for some audio outputs, such as ``wasapi``, ``coreaudio``
and ``pipewire``. Other audio outputs silently ignore this option.
They either have no concept of exclusive mode, or the mpv side of the
implementation is missing.
``--audio-fallback-to-null=<yes|no>``
If no audio device can be opened, behave as if ``--ao=null`` was given. This

View File

@ -554,6 +554,9 @@ static int init(struct ao *ao)
PW_STREAM_FLAG_MAP_BUFFERS |
PW_STREAM_FLAG_RT_PROCESS;
if (ao->init_flags & AO_INIT_EXCLUSIVE)
flags |= PW_STREAM_FLAG_EXCLUSIVE;
if (pw_stream_connect(p->stream,
PW_DIRECTION_OUTPUT, PW_ID_ANY, flags, params, 1) < 0) {
pw_thread_loop_unlock(p->loop);