mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 21:27:08 +00:00
ao_pipewire: add support for exclusive mode
This commit is contained in:
parent
c29692d81d
commit
83681de3c1
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user