mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 13:17:13 +00:00
ao_pipewire: bump minimum libpipewire version to 0.3.57
available on debian stable
This commit is contained in:
parent
acbd537dac
commit
539e95730a
@ -44,17 +44,6 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "osdep/timer.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)
|
#if !PW_CHECK_VERSION(1, 0, 4)
|
||||||
static uint64_t pw_stream_get_nsec(struct pw_stream *stream)
|
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;
|
struct spa_buffer *buf = b->buffer;
|
||||||
|
|
||||||
int nframes = buf->datas[0].maxsize / ao->sstride;
|
int nframes = buf->datas[0].maxsize / ao->sstride;
|
||||||
#if PW_CHECK_VERSION(0, 3, 49)
|
|
||||||
if (b->requested != 0)
|
if (b->requested != 0)
|
||||||
nframes = MPMIN(b->requested, nframes);
|
nframes = MPMIN(b->requested, nframes);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int i = 0; i < buf->n_datas; i++)
|
for (int i = 0; i < buf->n_datas; i++)
|
||||||
data[i] = buf->datas[i].data;
|
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(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.delay) * time.rate.num / time.rate.denom;
|
||||||
end_time += MP_TIME_S_TO_NS(time.queued) / ao->samplerate;
|
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;
|
end_time += MP_TIME_S_TO_NS(time.buffered) / ao->samplerate;
|
||||||
#endif
|
|
||||||
end_time -= pw_stream_get_nsec(p->stream) - time.now;
|
end_time -= pw_stream_get_nsec(p->stream) - time.now;
|
||||||
|
|
||||||
int samples = ao_read_data(ao, data, nframes, end_time, NULL, false, false);
|
int samples = ao_read_data(ao, data, nframes, end_time, NULL, false, false);
|
||||||
|
@ -862,7 +862,7 @@ if features['oss-audio']
|
|||||||
sources += files('audio/out/ao_oss.c')
|
sources += files('audio/out/ao_oss.c')
|
||||||
endif
|
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()}
|
features += {'pipewire': pipewire.found()}
|
||||||
if features['pipewire']
|
if features['pipewire']
|
||||||
dependencies += pipewire
|
dependencies += pipewire
|
||||||
|
Loading…
Reference in New Issue
Block a user