summaryrefslogtreecommitdiffstats
path: root/video/mp_image_pool.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-17 18:21:29 +0100
committerwm4 <wm4@nowhere>2014-03-17 18:21:29 +0100
commit88aa3b8c986e0fdb74ae805b6a09d43789fb903e (patch)
tree85a27f65fefa77439d5993233b49bfcb93a490f5 /video/mp_image_pool.h
parent638950731451cbef616015bd81d411e7cdbb9ff0 (diff)
downloadmpv-88aa3b8c986e0fdb74ae805b6a09d43789fb903e.tar.bz2
mpv-88aa3b8c986e0fdb74ae805b6a09d43789fb903e.tar.xz
mp_image_pool: add features needed for use with hwaccel
The plan is to get rid of the custom VAAPI and possibly VDPAU surface allocators. Add custom surface allocation, because hwaccel surfaces are allocated completely differently from software surfaces. Add optional LRU allocation, which is (probably) helpful for hwaccel, but (probably) less optimal for software surfaces. mp_image_pool_get_no_alloc() is specifically for VAAPI, which can't allocate new decoder surfaces after decoder init.
Diffstat (limited to 'video/mp_image_pool.h')
-rw-r--r--video/mp_image_pool.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/mp_image_pool.h b/video/mp_image_pool.h
index 6ea041c527..d9ab2ee9e1 100644
--- a/video/mp_image_pool.h
+++ b/video/mp_image_pool.h
@@ -8,6 +8,15 @@ struct mp_image *mp_image_pool_get(struct mp_image_pool *pool, int fmt,
int w, int h);
void mp_image_pool_clear(struct mp_image_pool *pool);
+void mp_image_pool_set_lru(struct mp_image_pool *pool);
+
+struct mp_image *mp_image_pool_get_no_alloc(struct mp_image_pool *pool, int fmt,
+ int w, int h);
+
+typedef struct mp_image *(*mp_image_allocator)(void *data, int fmt, int w, int h);
+void mp_image_pool_set_allocator(struct mp_image_pool *pool,
+ mp_image_allocator cb, void *cb_data);
+
struct mp_image *mp_image_pool_new_copy(struct mp_image_pool *pool,
struct mp_image *img);
void mp_image_pool_make_writeable(struct mp_image_pool *pool,