From 6aa4efd1e3205c9b1385865df1b5b09646d2160c Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 20 Feb 2017 08:39:55 +0100 Subject: vd_lavc, vaapi: move hw device creation to generic code hw_vaapi.c didn't do much interesting anymore. Other than the function to create a device for decoding with vaapi-copy, everything can be done by generic code. Other libavcodec hwaccels are planned to provide the same API as vaapi. It will be possible to drop the other hw_ files in the future. They will use this generic code instead. --- video/hwdec.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'video/hwdec.h') diff --git a/video/hwdec.h b/video/hwdec.h index f8a089e8c6..86b5521975 100644 --- a/video/hwdec.h +++ b/video/hwdec.h @@ -53,6 +53,9 @@ struct mp_hwdec_ctx { // List of IMGFMT_s, terminated with 0. NULL if N/A. int *supported_formats; + // Hint to generic code: it's using a wrapper API + bool emulated; + // Optional. Legacy. (New code should use AVHWFramesContext and // mp_image_hw_download().) // Allocates a software image from the pool, downloads the hw image from @@ -62,6 +65,9 @@ struct mp_hwdec_ctx { struct mp_image *(*download_image)(struct mp_hwdec_ctx *ctx, struct mp_image *mpi, struct mp_image_pool *swpool); + + // Optional. Do not set for VO-bound devices. + void (*destroy)(struct mp_hwdec_ctx *ctx); }; // Used to communicate hardware decoder device handles from VO to video decoder. -- cgit v1.2.3