diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-23 01:52:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-23 01:52:21 +0100 |
| commit | 6516fb170b0e7a83c582a858fb54d1f83f751cc0 (patch) | |
| tree | 2182093659f83d482352e844c2170dd3c550a15a /src/wx/video_view.h | |
| parent | e026ba2c11f16fe2d486acdd489050538e66fece (diff) | |
Various tweaks to fix playback at the end of a film (#1858).
The most questionable change here is probably how
SimpleVideoView::display_next_frame no longer re-schedules
itself if the call to get_next_frame returned AGAIN; it seems
wrong to do that when FilmViewer::idle_handler() also reschedules
itself when display_next_frame() returns AGAIN.
Diffstat (limited to 'src/wx/video_view.h')
| -rw-r--r-- | src/wx/video_view.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wx/video_view.h b/src/wx/video_view.h index 2b4bd4717..e5fbb671d 100644 --- a/src/wx/video_view.h +++ b/src/wx/video_view.h @@ -50,8 +50,15 @@ public: virtual void start (); /** Called when playback stops */ virtual void stop () {} + + enum NextFrameResult { + FAIL, + AGAIN, + SUCCESS + }; + /** Get the next frame and display it; used after seek */ - virtual bool display_next_frame (bool) = 0; + virtual NextFrameResult display_next_frame (bool) = 0; void clear (); bool reset_metadata (boost::shared_ptr<const Film> film, dcp::Size player_video_container_size); @@ -112,7 +119,7 @@ public: } protected: - bool get_next_frame (bool non_blocking); + NextFrameResult get_next_frame (bool non_blocking); boost::optional<int> time_until_next_frame () const; dcpomatic::DCPTime one_video_frame () const; |
