From 539e95730a0da36c85ddd7e9d5cbf6491f7baafc Mon Sep 17 00:00:00 2001 From: llyyr Date: Fri, 5 Jul 2024 19:17:04 +0530 Subject: [PATCH] ao_pipewire: bump minimum libpipewire version to 0.3.57 available on debian stable --- audio/out/ao_pipewire.c | 15 --------------- meson.build | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c index 486f877a90..5e6bb1fa4f 100644 --- a/audio/out/ao_pipewire.c +++ b/audio/out/ao_pipewire.c @@ -44,17 +44,6 @@ #include "internal.h" #include "osdep/timer.h" -#if !PW_CHECK_VERSION(0, 3, 50) -static inline int pw_stream_get_time_n(struct pw_stream *stream, struct pw_time *time, size_t size) { - return pw_stream_get_time(stream, time); -} -#endif - -#if !PW_CHECK_VERSION(0, 3, 57) -// Earlier versions segfault on zeroed hooks -#define spa_hook_remove(hook) if ((hook)->link.prev) spa_hook_remove(hook) -#endif - #if !PW_CHECK_VERSION(1, 0, 4) static uint64_t pw_stream_get_nsec(struct pw_stream *stream) { @@ -191,10 +180,8 @@ static void on_process(void *userdata) struct spa_buffer *buf = b->buffer; int nframes = buf->datas[0].maxsize / ao->sstride; -#if PW_CHECK_VERSION(0, 3, 49) if (b->requested != 0) nframes = MPMIN(b->requested, nframes); -#endif for (int i = 0; i < buf->n_datas; i++) data[i] = buf->datas[i].data; @@ -209,9 +196,7 @@ static void on_process(void *userdata) end_time += MP_TIME_S_TO_NS(nframes) / ao->samplerate; end_time += MP_TIME_S_TO_NS(time.delay) * time.rate.num / time.rate.denom; end_time += MP_TIME_S_TO_NS(time.queued) / ao->samplerate; -#if PW_CHECK_VERSION(0, 3, 50) end_time += MP_TIME_S_TO_NS(time.buffered) / ao->samplerate; -#endif end_time -= pw_stream_get_nsec(p->stream) - time.now; int samples = ao_read_data(ao, data, nframes, end_time, NULL, false, false); diff --git a/meson.build b/meson.build index d368f92fda..9700a3fe19 100644 --- a/meson.build +++ b/meson.build @@ -862,7 +862,7 @@ if features['oss-audio'] sources += files('audio/out/ao_oss.c') endif -pipewire = dependency('libpipewire-0.3', version: '>= 0.3.48', required: get_option('pipewire')) +pipewire = dependency('libpipewire-0.3', version: '>= 0.3.57', required: get_option('pipewire')) features += {'pipewire': pipewire.found()} if features['pipewire'] dependencies += pipewire