return true;
}
- cout << "Pass " << earliest->content->path(0) << "\n";
earliest->decoder->pass ();
/* Emit any audio that is ready */
/* Fill gaps */
- if (_last_video_time) {
- for (DCPTime i = _last_video_time.get(); i < time; i += DCPTime::from_frames (1, _film->video_frame_rate())) {
+ if (_last_time) {
+ /* XXX: this may not work for 3D */
+ DCPTime const frame = DCPTime::from_frames (1, _film->video_frame_rate());
+ for (DCPTime i = _last_time.get() + frame; i < time; i += frame) {
if (_playlist->video_content_at(i) && _last_video) {
Video (shared_ptr<PlayerVideo> (new PlayerVideo (*_last_video)), i);
} else {
_last_video->set_subtitle (subtitles.get ());
}
- _last_video_time = time;
+ _last_time = time;
- cout << "Video @ " << to_string(_last_video_time.get()) << "\n";
- Video (_last_video, *_last_video_time);
+ Video (_last_video, *_last_time);
/* Discard any subtitles we no longer need */
}
if (accurate) {
- _last_video_time = time - DCPTime::from_frames (1, _film->video_frame_rate ());
+ _last_time = time - DCPTime::from_frames (1, _film->video_frame_rate ());
} else {
- _last_video_time = optional<DCPTime> ();
+ _last_time = optional<DCPTime> ();
}
}
/** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */
bool _play_referenced;
+ /** Last PlayerVideo that was emitted */
boost::shared_ptr<PlayerVideo> _last_video;
- boost::optional<DCPTime> _last_video_time;
+ /** Time of the last thing we emitted, or the last seek time */
+ boost::optional<DCPTime> _last_time;
AudioMerger _audio_merger;
DCPTime _last_audio_time;