diff options
author | wm4 <wm4@nowhere> | 2017-01-17 10:56:16 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-17 15:48:56 +0100 |
commit | cda31b71debdd52cfe9a36e8eea318899acdd0d2 (patch) | |
tree | 76f4abd393b15075b7922b1c02dd5c5cf5bfc1f9 /video/decode/lavc.h | |
parent | a4cdd8bb823dbb8f981a4b5efcfcb0f9d118844e (diff) | |
download | mpv-cda31b71debdd52cfe9a36e8eea318899acdd0d2.tar.bz2 mpv-cda31b71debdd52cfe9a36e8eea318899acdd0d2.tar.xz |
vaapi: move AVHWFramesContext setup code to common code
In a way it can be reused. For now, sw_format and initial_pool_size
determination are still vaapi-specific. I'm hoping this can be eventally
moved to libavcodec in some way. Checking the supported_formats array is
not really vaapi-specific, and could be moved to the generic code path
too, but for now it would make things more complex.
hw_cuda.c can't use this, but hw_vdpau.c will in the following commit.
Diffstat (limited to 'video/decode/lavc.h')
-rw-r--r-- | video/decode/lavc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h index fe7f9937f4..fd1c7feb42 100644 --- a/video/decode/lavc.h +++ b/video/decode/lavc.h @@ -64,6 +64,8 @@ typedef struct lavc_ctx { int hwdec_fail_count; struct mp_image_pool *hwdec_swpool; + + AVBufferRef *cached_hw_frames_ctx; } vd_ffmpeg_ctx; struct vd_lavc_hwdec { @@ -118,6 +120,8 @@ const struct hwdec_profile_entry *hwdec_find_profile( bool hwdec_check_codec_support(const char *codec, const struct hwdec_profile_entry *table); int hwdec_get_max_refs(struct lavc_ctx *ctx); +int hwdec_setup_hw_frames_ctx(struct lavc_ctx *ctx, AVBufferRef *device_ctx, + int av_sw_format, int initial_pool_size); const char *hwdec_find_decoder(const char *codec, const char *suffix); |