From 3041ee8d6c97fbccfe891edad5b57143fb1c6c2a Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 6 Oct 2011 20:46:01 +0200 Subject: 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). --- input/input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'input') 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" }, -- cgit v1.2.3