summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-04 16:55:26 +0200
committerwm4 <wm4@nowhere>2016-05-04 16:55:26 +0200
commit833375f88d0392cac49b30ee3a4704fbab58e814 (patch)
tree225c7d03869f633524d80c0eba3ecd698c1c1d63 /video
parent86b5f1463c9084d83fbfb60bcd15bdb67795bb25 (diff)
downloadmpv-833375f88d0392cac49b30ee3a4704fbab58e814.tar.bz2
mpv-833375f88d0392cac49b30ee3a4704fbab58e814.tar.xz
command: change some hwdec properties
Introduce hwdec-current and hwdec-interop properties. Deprecate hwdec-detected, which never made a lot of sense, and which is replaced by the new properties. hwdec-active also becomes useless, as hwdec-current is a superset, so it's deprecated too (for now).
Diffstat (limited to 'video')
-rw-r--r--video/hwdec.h1
-rw-r--r--video/out/opengl/hwdec.c2
-rw-r--r--video/out/opengl/hwdec.h2
3 files changed, 4 insertions, 1 deletions
diff --git a/video/hwdec.h b/video/hwdec.h
index 377f6779d1..94667774e7 100644
--- a/video/hwdec.h
+++ b/video/hwdec.h
@@ -26,6 +26,7 @@ extern const struct m_opt_choice_alternatives mp_hwdec_names[];
struct mp_hwdec_ctx {
enum hwdec_type type;
+ const char *driver_name; // NULL if unknown/not loaded
void *priv; // for free use by hwdec implementation
diff --git a/video/out/opengl/hwdec.c b/video/out/opengl/hwdec.c
index 02aa0c2cd2..9c3bec1a0f 100644
--- a/video/out/opengl/hwdec.c
+++ b/video/out/opengl/hwdec.c
@@ -79,6 +79,8 @@ static struct gl_hwdec *load_hwdec_driver(struct mp_log *log, GL *gl,
mp_verbose(log, "Loading failed.\n");
return NULL;
}
+ if (hwdec->hwctx && !hwdec->hwctx->driver_name)
+ hwdec->hwctx->driver_name = hwdec->driver->name;
return hwdec;
}
diff --git a/video/out/opengl/hwdec.h b/video/out/opengl/hwdec.h
index 5126d7f0fa..a9d524a1d7 100644
--- a/video/out/opengl/hwdec.h
+++ b/video/out/opengl/hwdec.h
@@ -27,7 +27,7 @@ struct gl_hwdec {
};
struct gl_hwdec_driver {
- // Name of the interop backend. This is used for logging only.
+ // Name of the interop backend. This is used for informational purposes only.
const char *name;
// Used to explicitly request a specific API.
enum hwdec_type api;