From 97cf6acdab92ebe3f0f4c6aad3a400c8768fa911 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 25 Sep 2008 17:40:33 +0000 Subject: Add an experimental pausing_keep_force slave mode command prefix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27665 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/tech/slave.txt | 4 ++++ input/input.c | 3 +++ mplayer.c | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/DOCS/tech/slave.txt b/DOCS/tech/slave.txt index 051920b89c..65c919c777 100644 --- a/DOCS/tech/slave.txt +++ b/DOCS/tech/slave.txt @@ -26,6 +26,10 @@ after processing the command. "pausing_keep " tells MPlayer to do so only if it was already in paused mode. "pausing_toggle " tells MPlayer to do so only if it was not already in paused mode. Please note that "as soon as possible" can be before the command is fully executed. +As a temporary hack, there is also the _experimental_ "pausing_keep_force " +prefix, with which MPlayer will not exit the pause loop at all. +Like this you can avoid the "frame stepping" effect of "pausing_keep " +but most commands will either not work at all or behave in unexpected ways. Available commands ('mplayer -input cmdlist' will print a list): diff --git a/input/input.c b/input/input.c index 0a9b571f0e..f828a48038 100644 --- a/input/input.c +++ b/input/input.c @@ -771,6 +771,9 @@ mp_input_parse_cmd(char* str) { } else if (strncmp(str, "pausing_toggle ", 15) == 0) { pausing = 3; str = &str[15]; + } else if (strncmp(str, "pausing_keep_force ", 19) == 0) { + pausing = 4; + str = &str[19]; } for(ptr = str ; ptr[0] != '\0' && ptr[0] != '\t' && ptr[0] != ' ' ; ptr++) diff --git a/mplayer.c b/mplayer.c index 1d4845a102..0fc1e75967 100644 --- a/mplayer.c +++ b/mplayer.c @@ -2353,9 +2353,10 @@ static void pause_loop(void) mpctx->audio_out->pause(); // pause audio, keep data if possible while ( (cmd = mp_input_get_cmd(20, 1, 1)) == NULL - || cmd->id == MP_CMD_SET_MOUSE_POS) { + || cmd->id == MP_CMD_SET_MOUSE_POS || cmd->pausing == 4) { if (cmd) { cmd = mp_input_get_cmd(0,1,0); + run_command(mpctx, cmd); mp_cmd_free(cmd); continue; } -- cgit v1.2.3