summaryrefslogtreecommitdiffstats
path: root/video/hwdec.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-20 08:39:55 +0100
committerwm4 <wm4@nowhere>2017-02-20 08:39:55 +0100
commit6aa4efd1e3205c9b1385865df1b5b09646d2160c (patch)
tree4a0f78718f21f7f644f9ca7de4fbcfb8a83aafa9 /video/hwdec.h
parent6e2d3d991912f230ee66448307e8e2657237ffd2 (diff)
downloadmpv-6aa4efd1e3205c9b1385865df1b5b09646d2160c.tar.bz2
mpv-6aa4efd1e3205c9b1385865df1b5b09646d2160c.tar.xz
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.
Diffstat (limited to 'video/hwdec.h')
-rw-r--r--video/hwdec.h6
1 files changed, 6 insertions, 0 deletions
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.