summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-12-01 19:53:57 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-12-09 04:31:07 +0200
commit02efad79a28345e5814af1b60e0bb3c40cb5a941 (patch)
tree83c164e897ed46b24701f8190412d2883f085ba2 /command.c
parent95f35c4d205daafe4797f28d7ec79f3ebb1952a1 (diff)
downloadmpv-02efad79a28345e5814af1b60e0bb3c40cb5a941.tar.bz2
mpv-02efad79a28345e5814af1b60e0bb3c40cb5a941.tar.xz
Update OSD while paused
When OSD contents change while paused, try to change the OSD drawn in the currently visible frame. If such OSD updates are not supported then advance by one frame and draw the OSD normally. Add some support for OSD redrawing to vo xv. The new xv code makes a copy of the original frame contents before drawing the OSD if MPlayer is already paused when the frame is drawn. If such a copy of the current frame exists then the frame contents can be restored and a different OSD drawn on top of the same frame.
Diffstat (limited to 'command.c')
-rw-r--r--command.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/command.c b/command.c
index 72fe83c2e7..6487a8b346 100644
--- a/command.c
+++ b/command.c
@@ -573,10 +573,14 @@ static int mp_property_pause(m_option_t *prop, int action, void *arg,
return M_PROPERTY_OK;
case M_PROPERTY_STEP_UP:
case M_PROPERTY_STEP_DOWN:
- if (mpctx->paused)
+ if (mpctx->paused) {
unpause_player(mpctx);
- else
+ mpctx->osd_function = OSD_PLAY;
+ }
+ else {
pause_player(mpctx);
+ mpctx->osd_function = OSD_PAUSE;
+ }
return M_PROPERTY_OK;
default:
return m_property_flag(prop, action, arg, &mpctx->paused);
@@ -2520,8 +2524,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
} break;
case MP_CMD_FRAME_STEP:
- mpctx->step_frames++;
- unpause_player(mpctx);
+ add_step_frame(mpctx);
break;
case MP_CMD_FILE_FILTER: