summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2011-10-06 20:46:01 +0200
committerUoti Urpala <uau@mplayer2.org>2011-11-25 23:56:28 +0200
commit3041ee8d6c97fbccfe891edad5b57143fb1c6c2a (patch)
tree6edbd27ec73ec92432c559459d20a8303109a648 /input/input.c
parent01cf896a2f0d8be92c6d6633095fa2719a8c0e58 (diff)
downloadmpv-3041ee8d6c97fbccfe891edad5b57143fb1c6c2a.tar.bz2
mpv-3041ee8d6c97fbccfe891edad5b57143fb1c6c2a.tar.xz
core: add screenshot mode for actual VO window contents
The screenshot command normally converts the currently displayed video frame to an image. Add support for an alternative screenshot mode that is supposed to capture the real window contents. Such a screenshot contains a possibly scaled version of the frame, the OSD, and subtitles. Add a default key binding Alt+s for taking screenshots in this mode. This needs special VO support, and might not work with all VOs (this commit does not yet contain an implementation for any VO, only the infrastructure).
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c
index 7c02be5fa9..e1c001077a 100644
--- a/input/input.c
+++ b/input/input.c
@@ -176,7 +176,7 @@ static const mp_cmd_t mp_cmds[] = {
{ MP_CMD_VO_ONTOP, "vo_ontop", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
{ MP_CMD_VO_ROOTWIN, "vo_rootwin", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
{ MP_CMD_VO_BORDER, "vo_border", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
- { MP_CMD_SCREENSHOT, "screenshot", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
+ { MP_CMD_SCREENSHOT, "screenshot", 0, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
{ MP_CMD_PANSCAN, "panscan",1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
{ MP_CMD_SWITCH_VSYNC, "switch_vsync", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
{ MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
@@ -507,6 +507,8 @@ static const struct cmd_bind def_cmd_binds[] = {
{ { 'C', 0 }, "step_property_osd capturing" },
{ { 's', 0 }, "screenshot 0" },
{ { 'S', 0 }, "screenshot 1" },
+ { { KEY_MODIFIER_ALT + 's', 0 }, "screenshot 0 1" },
+ { { KEY_MODIFIER_ALT + 'S', 0 }, "screenshot 1 1" },
{ { 'w', 0 }, "panscan -0.1" },
{ { 'e', 0 }, "panscan +0.1" },