diff options
author | wm4 <wm4@nowhere> | 2018-01-16 11:46:16 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-18 00:59:07 -0800 |
commit | cda7203934012c56072d3da91e019673a4f9feab (patch) | |
tree | 2b5ee3339e19e907f66041a2656b57d8c7ea8d17 /video/mp_image_pool.h | |
parent | 0536ef306c5cdf03d4593f783cda9c0b6cebec60 (diff) | |
download | mpv-cda7203934012c56072d3da91e019673a4f9feab.tar.bz2 mpv-cda7203934012c56072d3da91e019673a4f9feab.tar.xz |
mp_image_pool: add helper functions for FFmpeg hw frames pools
FFmpeg has its own rather "special" image pools (AVHWFramesContext)
specifically for hardware decoding. So it's not really practical to use
our own pool implementation. Add these helpers, which make it easier to
use FFmpeg's code in mpv.
Diffstat (limited to 'video/mp_image_pool.h')
-rw-r--r-- | video/mp_image_pool.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/video/mp_image_pool.h b/video/mp_image_pool.h index a49771ffbb..7c9f0463cb 100644 --- a/video/mp_image_pool.h +++ b/video/mp_image_pool.h @@ -31,4 +31,12 @@ struct mp_image *mp_image_hw_download(struct mp_image *img, bool mp_image_hw_upload(struct mp_image *hw_img, struct mp_image *src); +struct AVBufferRef; +bool mp_update_av_hw_frames_pool(struct AVBufferRef **hw_frames_ctx, + struct AVBufferRef *hw_device_ctx, + int imgfmt, int sw_imgfmt, int w, int h); + +struct mp_image *mp_av_pool_image_hw_upload(struct AVBufferRef *hw_frames_ctx, + struct mp_image *src); + #endif |