summaryrefslogtreecommitdiffstats
path: root/video/hwdec.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-07 14:25:37 +0200
committerwm4 <wm4@nowhere>2015-07-07 15:05:32 +0200
commit1d29177c5c150e700cace0c875185c6fa5e92d3c (patch)
treec1ccbcfbbfb607120bbc14bab3f98768dd3b2f77 /video/hwdec.h
parentdc33eb56f4ae28b75ddc4127bd9e766606096c25 (diff)
downloadmpv-1d29177c5c150e700cace0c875185c6fa5e92d3c.tar.bz2
mpv-1d29177c5c150e700cace0c875185c6fa5e92d3c.tar.xz
options: cleanup hwdec name mappings
Now there's a "canonical" table for mapping the names, that other code can use, without having to rely too much on option code magic. Also, use the central HWDEC constants, instead of magic values. (There used to be semi-ok reasons to do this, but now it makes no sense anymore.)
Diffstat (limited to 'video/hwdec.h')
-rw-r--r--video/hwdec.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/video/hwdec.h b/video/hwdec.h
index 761b8d699b..c9eb8e6a95 100644
--- a/video/hwdec.h
+++ b/video/hwdec.h
@@ -1,9 +1,11 @@
#ifndef MP_HWDEC_H_
#define MP_HWDEC_H_
+#include "options/m_option.h"
+
struct mp_image_pool;
-// keep in sync with --hwdec option
+// keep in sync with --hwdec option (see mp_hwdec_names)
enum hwdec_type {
HWDEC_AUTO = -1,
HWDEC_NONE = 0,
@@ -15,6 +17,9 @@ enum hwdec_type {
HWDEC_RPI = 7,
};
+// hwdec_type names (options.c)
+extern const struct m_opt_choice_alternatives mp_hwdec_names[];
+
struct mp_hwdec_ctx {
enum hwdec_type type;