diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-02-19 01:09:43 +0000 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2023-03-05 11:23:01 -0800 |
commit | c0ca5f1a37a8e779337503d90e7ed2f0257d61f1 (patch) | |
tree | 0e31c492be89eea00e7438402187ff3493b60b94 /audio/out | |
parent | 291e05ec1ad1ce66f0071db848f4432633d2ee60 (diff) | |
download | mpv-c0ca5f1a37a8e779337503d90e7ed2f0257d61f1.tar.bz2 mpv-c0ca5f1a37a8e779337503d90e7ed2f0257d61f1.tar.xz |
ao_pipewire: use realtime scheduling for data thread
By making the data thread realtime it is able to serve requests faster
and more reliable reducing crackling in certain situations.
As the mpv callbacks that are running on the data thread are all
non-blocking and very short this should be safe.
The same mechanism is also used by pw-cat and the alsa plugin shipped by
pipewire.
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_pipewire.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c index 5e83a635ea..c2d785b841 100644 --- a/audio/out/ao_pipewire.c +++ b/audio/out/ao_pipewire.c @@ -487,7 +487,10 @@ static int pipewire_init_boilerplate(struct ao *ao) if (pw_thread_loop_start(p->loop) < 0) goto error; - context = pw_context_new(pw_thread_loop_get_loop(p->loop), NULL, 0); + context = pw_context_new( + pw_thread_loop_get_loop(p->loop), + pw_properties_new(PW_KEY_CONFIG_NAME, "client-rt.conf", NULL), + 0); if (!context) goto error; |