, _closed_captions_dialog (new ClosedCaptionsDialog(p, this))
, _outline_content (false)
, _pad_black (false)
-#ifdef DCPOMATIC_VARIANT_SWAROOP
- , _background_image (false)
-#endif
, _idle_get (false)
{
switch (Config::instance()->video_view_type()) {
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,
bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24),
+ VIDEO_RANGE_FULL,
false,
true
)
}
_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 ();
void
FilmViewer::config_changed (Config::Property p)
{
-#ifdef DCPOMATIC_VARIANT_SWAROOP
- if (p == Config::PLAYER_BACKGROUND_IMAGE) {
- _video_view->update ();
- return;
- }
-#endif
-
if (p == Config::AUDIO_MAPPING) {
recreate_butler ();
return;
if (_audio.getDeviceInfo(st).name == Config::instance()->sound_output().get()) {
break;
}
-#ifdef DCPOMATIC_USE_RTERROR
- } catch (RtError&) {
-#else
} catch (RtAudioError&) {
-#endif
/* Something went wrong with that device so we don't want to use it anyway */
}
++st;
sp.nChannels = _audio_channels;
sp.firstChannel = 0;
_audio.openStream (&sp, 0, RTAUDIO_FLOAT32, 48000, &_audio_block_size, &rtaudio_callback, this);
-#ifdef DCPOMATIC_USE_RTERROR
- } catch (RtError& e) {
-#else
} catch (RtAudioError& e) {
-#endif
_audio_channels = 0;
error_dialog (
_video_view->get(),