From 5d46e44160fe9ab6a922b594d10f2e4e70242ab7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 10 Nov 2014 18:15:22 +0100 Subject: audio: add mp_audio_pool A helper to allocate refcounted audio frames from a pool. This will replace the static buffer many audio filters use (af->data), because such static buffers are incompatible with refcounting. --- audio/audio.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'audio/audio.h') diff --git a/audio/audio.h b/audio/audio.h index aa03f2450c..c2699d8906 100644 --- a/audio/audio.h +++ b/audio/audio.h @@ -68,4 +68,8 @@ void mp_audio_copy(struct mp_audio *dst, int dst_offset, struct mp_audio *src, int src_offset, int length); void mp_audio_skip_samples(struct mp_audio *data, int samples); +struct mp_audio_pool *mp_audio_pool_create(void *ta_parent); +struct mp_audio *mp_audio_pool_get(struct mp_audio_pool *pool, + const struct mp_audio *fmt, int samples); + #endif -- cgit v1.2.3