From 3cb3bbbddc1d09dab1471a3630f1a9aa4392ed50 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 2 Nov 2010 03:17:41 +0200 Subject: Add a simple capture feature (-capture) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a specified key is pressed during playback, the current stream is captured to a file, similar to what -dumpstream achieves. original patch by Pásztor Szilárd, don tricon hu Taken from the following svn commits, but with several fixes and modifications (one obvious user-visible difference is that the default key binding is 'C', not 'c'): git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32524 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32529 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32530 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 2 ++ input/input.h | 1 + 2 files changed, 3 insertions(+) (limited to 'input') diff --git a/input/input.c b/input/input.c index 1e2a6e888e..658e34f4dc 100644 --- a/input/input.c +++ b/input/input.c @@ -183,6 +183,7 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_RUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } }, + { MP_CMD_CAPTURING, "capturing", 0, { {-1,{0}} } }, { MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}}, { MP_CMD_TV_TELETEXT_ADD_DEC, "teletext_add_dec", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } }, { MP_CMD_TV_TELETEXT_GO_LINK, "teletext_go_link", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, @@ -475,6 +476,7 @@ static const mp_cmd_bind_t def_cmd_binds[] = { #endif { { 'T', 0 }, "vo_ontop" }, { { 'f', 0 }, "vo_fullscreen" }, + { { 'C', 0 }, "step_property_osd capturing" }, { { 's', 0 }, "screenshot 0" }, { { 'S', 0 }, "screenshot 1" }, { { 'w', 0 }, "panscan -0.1" }, diff --git a/input/input.h b/input/input.h index 51d9f6522e..d922655950 100644 --- a/input/input.h +++ b/input/input.h @@ -41,6 +41,7 @@ typedef enum { MP_CMD_TV_STEP_CHANNEL, MP_CMD_TV_STEP_NORM, MP_CMD_TV_STEP_CHANNEL_LIST, + MP_CMD_CAPTURING, MP_CMD_VO_FULLSCREEN, MP_CMD_SUB_POS, MP_CMD_DVDNAV, -- cgit v1.2.3