From d6890c19dd0e34a71383e8fd1b7acdc0f9f08f69 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 12 Feb 2018 18:26:18 +0100 Subject: input: add a keybinding to toggle hardware decoding We sure as hell won't enable hardware decoding by default, but we can make it more accessible with a key binding. --- DOCS/man/mpv.rst | 3 +++ etc/input.conf | 1 + player/command.c | 1 + 3 files changed, 5 insertions(+) diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index 7f4561c6a9..696e5e1c7d 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -180,6 +180,9 @@ d A Cycle aspect ratio override. +Ctrl h + Toggle hardware video decoding on/off. + (The following keys are valid only when using a video output that supports the corresponding adjustment, or the software equalizer (``--vf=eq``).) diff --git a/etc/input.conf b/etc/input.conf index d60e792808..a35d439ea4 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -143,6 +143,7 @@ #L cycle-values loop-file "inf" "no" # toggle infinite looping #ctrl+c quit 4 #DEL script-binding osc/visibility # cycle OSC display +#ctrl+h cycle-values hwdec "auto" "no" # cycle hardware decoding # Apple Remote section #AR_PLAY cycle pause diff --git a/player/command.c b/player/command.c index b282edda4c..e4e5246cc4 100644 --- a/player/command.c +++ b/player/command.c @@ -4321,6 +4321,7 @@ static const struct property_osd_display { {"ab-loop-a", "A-B loop start"}, {"ab-loop-b", .msg = "A-B loop: ${ab-loop-a} - ${ab-loop-b}"}, {"audio-device", "Audio device"}, + {"hwdec", .msg = "Hardware decoding: ${hwdec-current}"}, // By default, don't display the following properties on OSD {"pause", NULL}, {"fullscreen", NULL}, -- cgit v1.2.3