using std::bad_alloc;
using std::make_pair;
using std::exception;
-using boost::shared_ptr;
-using boost::dynamic_pointer_cast;
-using boost::weak_ptr;
+using std::shared_ptr;
+using std::dynamic_pointer_cast;
+using std::weak_ptr;
using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
return;
}
- if (_video_view->display_next_frame(true)) {
- _idle_get = false;
- } else {
+ if (_video_view->display_next_frame(true) == VideoView::AGAIN) {
/* get() could not complete quickly so we'll try again later */
signal_manager->when_idle (boost::bind(&FilmViewer::idle_handler, this));
+ } else {
+ _idle_get = false;
}
}
_butler.reset(
new Butler(
+ _film,
_player,
Config::instance()->audio_mapping(_audio_channels),
_audio_channels,
}
_playing = true;
- _video_view->start ();
+ /* Calling start() below may directly result in Stopped being emitted, and if that
+ * happens we want it to come after the Started signal, so do that first.
+ */
Started (position());
+ _video_view->start ();
}
bool
if (!_video_view || !_film || !_player) {
return true;
}
- return _video_view->refresh_metadata (_film, _player->video_container_size(), _film->frame_size());
+ return _video_view->reset_metadata (_film, _player->video_container_size());
}
void
/* We're going to start playing again straight away
so wait for the seek to finish.
*/
- while (!_video_view->display_next_frame(false)) {}
+ while (_video_view->display_next_frame(false) == VideoView::AGAIN) {}
}
resume ();