summaryrefslogtreecommitdiffstats
path: root/video/hwdec.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-11 16:18:58 +0200
committerwm4 <wm4@nowhere>2016-05-11 16:20:13 +0200
commit70b35612704a992dac45856e069608216f41ea89 (patch)
tree6ed76d1cfc9f4dad857b0c8d56c7fd6db1bb24fc /video/hwdec.h
parent2ec26b8396c8d44def148351ee370fde4b950cbf (diff)
downloadmpv-70b35612704a992dac45856e069608216f41ea89.tar.bz2
mpv-70b35612704a992dac45856e069608216f41ea89.tar.xz
video: add --hwdec=auto-copy mode
This uses the normal autoprobing rules like "auto", but rejects anything that isn't flagged as copying data back to system memory. The chunk in command.c was dead code, so remove it instead of updating it.
Diffstat (limited to 'video/hwdec.h')
-rw-r--r--video/hwdec.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/hwdec.h b/video/hwdec.h
index 48ec6a2a21..5d563c983b 100644
--- a/video/hwdec.h
+++ b/video/hwdec.h
@@ -9,6 +9,7 @@ struct mp_image_pool;
enum hwdec_type {
HWDEC_NONE = 0,
HWDEC_AUTO,
+ HWDEC_AUTO_COPY,
HWDEC_VDPAU,
HWDEC_VIDEOTOOLBOX,
HWDEC_VAAPI,
@@ -21,11 +22,13 @@ enum hwdec_type {
HWDEC_MEDIACODEC,
};
+#define HWDEC_IS_AUTO(x) ((x) == HWDEC_AUTO || (x) == HWDEC_AUTO_COPY)
+
// hwdec_type names (options.c)
extern const struct m_opt_choice_alternatives mp_hwdec_names[];
struct mp_hwdec_ctx {
- enum hwdec_type type; // (never HWDEC_NONE or HWDEC_AUTO)
+ enum hwdec_type type; // (never HWDEC_NONE or HWDEC_IS_AUTO)
const char *driver_name; // NULL if unknown/not loaded
// This is never NULL. Its meaning depends on the .type field: