diff options
author | wm4 <wm4@nowhere> | 2014-07-30 23:24:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-30 23:29:00 +0200 |
commit | 1423bd0bfd671ffc023778839a540fffd1dd3686 (patch) | |
tree | eb284a16d71ea8f6ecc6acb815a77ed711ef46da /player/core.h | |
parent | 8f2e9f1d613f686a834446c73465f0ca41156db3 (diff) | |
download | mpv-1423bd0bfd671ffc023778839a540fffd1dd3686.tar.bz2 mpv-1423bd0bfd671ffc023778839a540fffd1dd3686.tar.xz |
player: move video display code out of the playloop
Basically move the code from playloop.c to video.c. The new function
write_video() now contains the code that was part of run_playloop().
There are no functional changes, except handling "new_frame_shown"
slightly differently. This is done so that we don't need new a new
MPContext field or a return value for write_video() to signal this
condition. Instead, it's handled indirectly.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/player/core.h b/player/core.h index c24a6c1f94..6b3cf55f8b 100644 --- a/player/core.h +++ b/player/core.h @@ -88,6 +88,8 @@ enum { MAX_TERM_OSD_LEVEL = 1, OSD_LEVEL_INVISIBLE = 4, OSD_BAR_SEEK = 256, + + MAX_NUM_VO_PTS = 100, }; enum seek_type { @@ -138,17 +140,6 @@ struct track { bool preloaded; }; -enum { - MAX_NUM_VO_PTS = 100, - - // update_video() - code also uses: <0 error, 0 eof, >0 progress - VD_ERROR = -1, - VD_EOF = 0, // end of file - no new output - VD_PROGRESS = 1, // progress, but no output; repeat call with no waiting - VD_NEW_FRAME = 2, // the call produced a new frame - VD_WAIT = 3, // no EOF, but no output; wait until wakeup -}; - /* Note that playback can be paused, stopped, etc. at any time. While paused, * playback restart is still active, because you want seeking to work even * if paused. @@ -501,8 +492,7 @@ void build_cue_timeline(struct MPContext *mpctx); void reset_video_state(struct MPContext *mpctx); int reinit_video_chain(struct MPContext *mpctx); int reinit_video_filters(struct MPContext *mpctx); -int update_video(struct MPContext *mpctx, double endpts, bool reconfig_ok, - double *frame_duration); +void write_video(struct MPContext *mpctx, double endpts); void mp_force_video_refresh(struct MPContext *mpctx); void update_fps(struct MPContext *mpctx); |