summaryrefslogtreecommitdiff
path: root/src/wx/simple_video_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-06 01:09:13 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-08 21:56:47 +0100
commit805487369e57e5eb57911805ba6de78b653d79ad (patch)
tree73c07ac5f6617c915df2f50d695367d3d6c56a6c /src/wx/simple_video_view.cc
parent694a9f48880efd428c8137e975de3581ad0a75a9 (diff)
Various timing hacks and development.
Diffstat (limited to 'src/wx/simple_video_view.cc')
-rw-r--r--src/wx/simple_video_view.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc
index 619a35cce..e66ed815e 100644
--- a/src/wx/simple_video_view.cc
+++ b/src/wx/simple_video_view.cc
@@ -149,7 +149,7 @@ SimpleVideoView::timer ()
return;
}
- get (false);
+ display_next_frame (false);
DCPTime const next = _viewer->position() + _viewer->one_video_frame();
if (next >= _viewer->film()->length()) {
@@ -173,21 +173,21 @@ SimpleVideoView::start ()
}
/** Try to get a frame from the butler and display it.
- * @param lazy true to return false quickly if no video is available quickly (i.e. we are waiting for the butler).
+ * @param non_blocking true to return false quickly if no video is available quickly (i.e. we are waiting for the butler).
* false to ask the butler to block until it has video (unless it is suspended).
* @return true on success, false if we did nothing because it would have taken too long.
*/
bool
-SimpleVideoView::get (bool lazy)
+SimpleVideoView::display_next_frame (bool non_blocking)
{
- bool r = get_next_frame (lazy);
+ bool r = get_next_frame (non_blocking);
if (!r) {
- if (lazy) {
+ if (non_blocking) {
/* No video available; return saying we failed */
return false;
} else {
/* Player was suspended; come back later */
- signal_manager->when_idle (boost::bind(&SimpleVideoView::get, this, false));
+ signal_manager->when_idle (boost::bind(&SimpleVideoView::display_next_frame, this, false));
return false;
}
}
@@ -210,7 +210,6 @@ SimpleVideoView::display_player_video ()
/* Too late; just drop this frame before we try to get its image (which will be the time-consuming
part if this frame is J2K).
*/
- _viewer->_video_position = _player_video.second;
++_viewer->_dropped;
return;
}
@@ -243,7 +242,6 @@ SimpleVideoView::display_player_video ()
_viewer->ImageChanged (_player_video.first);
_viewer->_state_timer.unset ();
- _viewer->_video_position = _player_video.second;
_viewer->_inter_position = _player_video.first->inter_position ();
_viewer->_inter_size = _player_video.first->inter_size ();