diff options
author | wm4 <wm4@nowhere> | 2014-11-10 18:15:22 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-10 18:15:22 +0100 |
commit | 5d46e44160fe9ab6a922b594d10f2e4e70242ab7 (patch) | |
tree | 80a4d8e6ddb549e1949034d727156fc4682425a0 /audio/audio.h | |
parent | c3d446ee2eeecfe862e24ae77bc2305be1910191 (diff) | |
download | mpv-5d46e44160fe9ab6a922b594d10f2e4e70242ab7.tar.bz2 mpv-5d46e44160fe9ab6a922b594d10f2e4e70242ab7.tar.xz |
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.
Diffstat (limited to 'audio/audio.h')
-rw-r--r-- | audio/audio.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 |