From 8fe4790ec8945cae52ea7600312f54e1dbdf8162 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 11 Aug 2013 23:23:12 +0200 Subject: video: redo hw decoding initialization, add --hwdec=auto Change how the HW decoding stuff is organized, the way it's initialized in particular. Instead of duplicating the list of supported codecs for hwaccel decoders, add a probe function which allows each decoder to report whether it supports a given codec. Add an "auto" choice to the --hwdec option, which automatically enables hardware decoding if libavcodec and/or the VO supports it. What mpv prints on the terminal changes a bit. Now it will just print a single line whether hw decoding is used or not (and nothing at all if no hw decoding at all was requested). The pretty violent fallback from hw decoding to software decoding is still quite verbose and evil-looking though. --- mpvcore/options.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mpvcore') diff --git a/mpvcore/options.c b/mpvcore/options.c index b66556d8bd..ff278cc7a2 100644 --- a/mpvcore/options.c +++ b/mpvcore/options.c @@ -466,6 +466,7 @@ const m_option_t mp_opts[] = { OPT_CHOICE("hwdec", hwdec_api, 0, ({"no", 0}, + {"auto", -1}, {"vdpau", 1}, {"vda", 2}, {"crystalhd", 3})), -- cgit v1.2.3