summaryrefslogtreecommitdiffstats
path: root/mp_core.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-29 08:09:57 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-12-09 04:31:07 +0200
commit77c709ad31ebe997dbd824506c145a0ac24581d0 (patch)
tree9a5b2ddde33191d6f47d1f424a7d9017a4e32d6e /mp_core.h
parent6fa90873ccc8006e479061afdd0edfbfdadf17ec (diff)
downloadmpv-77c709ad31ebe997dbd824506c145a0ac24581d0.tar.bz2
mpv-77c709ad31ebe997dbd824506c145a0ac24581d0.tar.xz
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).
Diffstat (limited to 'mp_core.h')
-rw-r--r--mp_core.h8
1 files changed, 7 insertions, 1 deletions
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 */