1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-05 06:30:06 +00:00
mpv/player
wm4 f061befb33 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.
2015-02-12 17:17:41 +01:00
..
lua lua: do not use math.pow() 2015-01-25 01:23:29 +01:00
timeline tl_matroska: only check the chapter count when adding chapters 2015-02-06 11:55:16 +01:00
audio.c player: use af_scaletempo when slowing down audio too 2015-02-12 11:58:35 +01:00
client.c client API: add mpv_wait_async_requests() 2015-02-02 18:07:37 +01:00
client.h vo_opengl_cb: simplify API uninitialization 2014-12-31 20:31:19 +01:00
command.c audio: add device change notification for hotplugging 2015-02-12 17:17:41 +01:00
command.h audio: add device change notification for hotplugging 2015-02-12 17:17:41 +01:00
configfiles.c options: add option for ignoring patch in resume mechanism 2014-12-13 00:04:08 +01:00
core.h command: new commands audio_add/audio_remove/audio_reload 2015-02-03 13:53:39 +01:00
discnav.c osc, dvd, bd: fix mouse state when changing menu modes 2014-12-05 16:04:04 +01:00
loadfile.c player: do not autoload audio with audio files, enable autoloading 2015-02-05 22:14:17 +01:00
lua.c client API: be more lenient about mpv_suspend/resume mismatches 2014-12-15 14:44:47 +01:00
main_fn.c
main.c Revert "player: make --force-window create the window immediately on start" 2015-02-12 12:01:12 +01:00
misc.c player: don't display zero duration for files with unknown duration 2014-10-29 21:54:59 +01:00
osd.c command: improve A-B loop behavior 2014-11-18 20:28:54 +01:00
playloop.c player: move more code out of central playloop function 2015-01-29 15:15:13 +01:00
screenshot.c options: list correct default value for --screenshot-template 2015-01-26 11:38:23 +01:00
screenshot.h
scripting.c scripting: fix/improve deprecation message 2014-12-15 06:24:05 +01:00
sub.c player: fix crash wtih --secondary-sid 2015-01-13 02:45:51 +01:00
video.c player: remove --fixed-vo 2015-02-03 23:11:08 +01:00