From 77c709ad31ebe997dbd824506c145a0ac24581d0 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 29 Nov 2008 08:09:57 +0200 Subject: Start pause handling changes Add separate pause_player() / unpause_player functions(), move some pausing-related state into explicit variables and make commands while paused not unpause. Not everything works properly while paused yet (no screen updates etc). --- mp_core.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mp_core.h') diff --git a/mp_core.h b/mp_core.h index 1287d9ad2b..09df4e7719 100644 --- a/mp_core.h +++ b/mp_core.h @@ -82,6 +82,8 @@ typedef struct MPContext { // In the audio-only case used as a timer since the last seek // by the audio CPU usage meter. double delay; + // AV sync: time until next frame should be shown + float time_frame; // Timestamp from the last time some timing functions read the // current time, in (occasionally wrapping) microseconds. Used @@ -112,7 +114,9 @@ typedef struct MPContext { int last_dvb_step; int dvbin_reopen; - int was_paused; + int paused; + // step this many frames, then pause + int step_frames; #ifdef CONFIG_DVDNAV struct mp_image *nav_smpi; ///< last decoded dvdnav video image @@ -138,5 +142,7 @@ double playing_audio_pts(struct MPContext *mpctx); void exit_player_with_rc(struct MPContext *mpctx, exit_reason_t how, int rc); void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr); int reinit_video_chain(struct MPContext *mpctx); +void pause_player(struct MPContext *mpctx); +void unpause_player(struct MPContext *mpctx); #endif /* MPLAYER_MP_CORE_H */ -- cgit v1.2.3