summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 03:17:41 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 07:48:31 +0200
commit3cb3bbbddc1d09dab1471a3630f1a9aa4392ed50 (patch)
tree4989a29dbae266e0bb83bddca9fcdef1058c4a17 /input
parent2be10f22b24712b959fa2883a4dcfa7caf72ab79 (diff)
downloadmpv-3cb3bbbddc1d09dab1471a3630f1a9aa4392ed50.tar.bz2
mpv-3cb3bbbddc1d09dab1471a3630f1a9aa4392ed50.tar.xz
Add a simple capture feature (-capture)
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
Diffstat (limited to 'input')
-rw-r--r--input/input.c2
-rw-r--r--input/input.h1
2 files changed, 3 insertions, 0 deletions
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,