From 58d196c07e4faae0e9e7c03c64029c5c36e03c9a Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 11 Dec 2012 18:16:42 +0100 Subject: video: different way to enable hardware decoding, add software fallback Deprecate the hardware specific video codec entries (like ffh264vdpau). Replace them with the --hwdec switch, which requests that a specific hardware decoding API should be used. The codecs.conf entries will be removed at a later time, but for now they are useful for testing and compatibility. Instead of --vc=ffh264vdpau, --hwdec=vdpau should be used. Add a fallback if hardware decoding fails. Most hardware decoders (including vdpau) support only a subset of h264, and having such a fallback is supposed to enable a better user experience. --- core/cfg-mplayer.h | 6 ++++++ core/options.h | 3 +++ 2 files changed, 9 insertions(+) (limited to 'core') diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index 8ddf4616a0..9627a25140 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -467,6 +467,12 @@ const m_option_t common_opts[] = { {"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, {"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, + OPT_CHOICE("hwdec", hwdec_api, 0, + ({"no", 0}, + {"vdpau", 1}, + {"vda", 2}, + {"crystalhd", 3})), + // postprocessing: {"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL}, #ifdef CONFIG_LIBPOSTPROC diff --git a/core/options.h b/core/options.h index d6bac625df..9accec1f0a 100644 --- a/core/options.h +++ b/core/options.h @@ -126,6 +126,9 @@ typedef struct MPOpts { char *ass_styles_file; int ass_style_override; int ass_hinting; + + int hwdec_api; + struct lavc_param { int workaround_bugs; int error_resilience; -- cgit v1.2.3