diff options
Diffstat (limited to 'video/decode/lavc.h')
-rw-r--r-- | video/decode/lavc.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h index 25ed2b8ac5..3611530400 100644 --- a/video/decode/lavc.h +++ b/video/decode/lavc.h @@ -10,7 +10,7 @@ #include "demux/stheader.h" #include "video/mp_image.h" -typedef struct ffmpeg_ctx { +typedef struct lavc_ctx { AVCodecContext *avctx; AVFrame *pic; struct hwdec *hwdec; @@ -23,11 +23,28 @@ typedef struct ffmpeg_ctx { enum AVDiscard skip_frame; const char *software_fallback_decoder; + // From VO + struct mp_hwdec_info *hwdec_info; + + // For free use by hwdec implementation + void *hwdec_priv; + + // Legacy bool do_dr1; struct FramePool *dr1_buffer_pool; struct mp_image_pool *non_dr1_pool; } vd_ffmpeg_ctx; +struct vd_lavc_hwdec_functions { + // If not-NULL, a 0 terminated list of IMGFMT_ formats. Only one of these + // formats is accepted when handling the libavcodec get_format callback. + const int *image_formats; + int (*init)(struct lavc_ctx *ctx); + void (*uninit)(struct lavc_ctx *ctx); + struct mp_image *(*allocate_image)(struct lavc_ctx *ctx, AVFrame *frame); + void (*fix_image)(struct lavc_ctx *ctx, struct mp_image *img); +}; + // lavc_dr1.c int mp_codec_get_buffer(AVCodecContext *s, AVFrame *frame); void mp_codec_release_buffer(AVCodecContext *s, AVFrame *frame); |