{
_pad_black = p;
}
+
+/* XXX_b: comment */
+int
+FilmViewer::time_until_next_frame () const
+{
+ DCPTime const next = position() + one_video_frame();
+ return max ((next.seconds() - time().seconds()) * 1000, 1.0);
+}
return _gets;
}
- /* Some accessors that VideoView classes need */
+ /* Some accessors and utility methods that VideoView classes need */
dcp::Size out_size () const {
return _out_size;
}
boost::shared_ptr<Butler> butler () const {
return _butler;
}
+ int time_until_next_frame () const;
boost::signals2::signal<void (boost::weak_ptr<PlayerVideo>)> ImageChanged;
boost::signals2::signal<void ()> PositionChanged;
}
LOG_DEBUG_PLAYER("%1 -> %2; delay %3", next.seconds(), _viewer->time().seconds(), max((next.seconds() - _viewer->time().seconds()) * 1000, 1.0));
- _timer.Start (max ((next.seconds() - _viewer->time().seconds()) * 1000, 1.0), wxTIMER_ONE_SHOT);
+ _timer.Start (_viewer->time_until_next_frame()), wxTIMER_ONE_SHOT);
if (_viewer->butler()) {
_viewer->butler()->rethrow ();