- 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);
+ LOG_DEBUG_VIDEO_VIEW("%1 -> %2; delay %3", next.seconds(), _viewer->time().seconds(), max((next.seconds() - _viewer->time().seconds()) * 1000, 1.0));
+ _timer.Start (max(1, time_until_next_frame().get_value_or(0)), wxTIMER_ONE_SHOT);
+
+ if (_viewer->butler()) {
+ _viewer->butler()->rethrow ();
+ }
+}
+
+void
+SimpleVideoView::start ()
+{
+ VideoView::start ();
+ timer ();
+}
+
+/** Try to get a frame from the butler and display it.
+ * @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.
+ */
+VideoView::NextFrameResult
+SimpleVideoView::display_next_frame (bool non_blocking)
+{
+ auto const r = get_next_frame (non_blocking);
+ if (r != SUCCESS) {
+ return r;
+ }
+
+ update ();
+
+ try {
+ _viewer->butler()->rethrow ();
+ } catch (DecodeError& e) {
+ error_dialog (get(), e.what());
+ }
+
+ return SUCCESS;
+}
+
+void
+SimpleVideoView::update ()
+{
+ if (!player_video().first) {
+ set_image (shared_ptr<Image>());
+ refresh_panel ();
+ return;
+ }