diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2022-08-29 20:52:02 +0200 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-09-11 20:24:42 -0700 |
commit | 013ec877f6e0d2483a864e963d7f5ccfc1f31973 (patch) | |
tree | 68c4dc1ccff6e609230e2e276f49886ad4aa195d /audio/out/ao.h | |
parent | a9155c6f97e02b09c93ff940e76db422cab7f894 (diff) | |
download | mpv-013ec877f6e0d2483a864e963d7f5ccfc1f31973.tar.bz2 mpv-013ec877f6e0d2483a864e963d7f5ccfc1f31973.tar.xz |
audio: try to use playback AO as hotplug AO first
When a platform has multiple valid AOs that can provide hotplug events
we should try to use the one that also provides playback.
Concretely this will help when introducing hotplug support for
ao_pipewire.
Currently ao_pulse is probed by ao_hotplug_get_device_list() before
ao_pipewire and on the common setups where both AOs could work pulse
will be selected for hotplug handling.
This means that hotplug_init() of ao_pipewire will never be called and
list_devs() has to do its own initialization.
But if ao_pulse is non-functional or not compiled-in suddenly
ao_pipewire *must* implement hotplug_init() for hotplugging events to
work for all.
Also if the hotplug ao_pulse connects to a PulseAudio instance that is
not emulated by the same PipeWire instance as the playback ao_pipewire
the hotplug events are useless.
Diffstat (limited to 'audio/out/ao.h')
-rw-r--r-- | audio/out/ao.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao.h b/audio/out/ao.h index 7d111c46ff..1bca124599 100644 --- a/audio/out/ao.h +++ b/audio/out/ao.h @@ -126,8 +126,8 @@ struct ao_hotplug *ao_hotplug_create(struct mpv_global *global, void *wakeup_ctx); void ao_hotplug_destroy(struct ao_hotplug *hp); bool ao_hotplug_check_update(struct ao_hotplug *hp); -struct ao_device_list *ao_hotplug_get_device_list(struct ao_hotplug *hp); +struct ao_device_list *ao_hotplug_get_device_list(struct ao_hotplug *hp, struct ao *playback_ao); -void ao_print_devices(struct mpv_global *global, struct mp_log *log); +void ao_print_devices(struct mpv_global *global, struct mp_log *log, struct ao *playback_ao); #endif /* MPLAYER_AUDIO_OUT_H */ |