diff options
author | wm4 <wm4@nowhere> | 2015-02-12 16:53:56 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-12 17:17:41 +0100 |
commit | f061befb3338c5cd6837701b4232dad48340ab6c (patch) | |
tree | 13d8526248cc5bf68fb5d563fbf4cdd6e5dcc2aa /DOCS/man/input.rst | |
parent | c152c590843a192761cff585a84ce57385d83d40 (diff) | |
download | mpv-f061befb3338c5cd6837701b4232dad48340ab6c.tar.bz2 mpv-f061befb3338c5cd6837701b4232dad48340ab6c.tar.xz |
audio: add device change notification for hotplugging
Not very important for the command line player; but GUI applications
will want to know about this.
This only adds the internal API; support for specific audio outputs
comes later.
This reuses the ao struct as context for the hotplug event listener,
similar to how the "old" device listing API did. This is probably a bit
unclean and confusing. One argument got reusing it is that otherwise
rewriting parts of ao_pulse would be required (because the PulseAudio
API requires so damn much boilerplate). Another is that --ao-defaults is
applied to the hotplug dummy ao struct, which automatically applies such
defaults even to the hotplug context.
Notification works through the property observation mechanism in the
client API. The notification chain is a bit complicated: the AO notifies
the player, which in turn notifies the clients, which in turn will
actually retrieve the device list. (It still has the advantage that it's
slightly cleaner, since the AO stuff doesn't need to know about client
API issues.)
The weird handling of atomic flags in ao.c is because we still don't
require real atomics from the compiler. Otherwise we'd just use atomic
bitwise operations.
Diffstat (limited to 'DOCS/man/input.rst')
-rw-r--r-- | DOCS/man/input.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 954520147a..f2efd080b8 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1640,6 +1640,13 @@ Property list human readable free form text. The description is an empty string if none was received. + The special entry with the name set to ``auto`` selects the default audio + output driver and the default device. + + The property can be watched with the property observation mechanism in + the client API and in Lua scripts. (Technically, change notification is + enabled the first time this property is read.) + ``audio-device`` (RW) Set the audio device. This directly reads/writes the ``--audio-device`` option, but on write accesses, the audio output will be scheduled for |