}
}
+ for (auto i = _pieces.begin(); i != _pieces.end(); ++i) {
+ if (auto video = (*i)->content->video) {
+ if (video->use() && video->frame_type() != VideoFrameType::THREE_D_LEFT && video->frame_type() != VideoFrameType::THREE_D_RIGHT) {
+ /* Look for content later in the content list with in-use video that overlaps this */
+ auto period = DCPTimePeriod((*i)->content->position(), (*i)->content->end(_film));
+ auto j = i;
+ ++j;
+ for (; j != _pieces.end(); ++j) {
+ if ((*j)->content->video && (*j)->content->video->use()) {
+ (*i)->ignore_video = DCPTimePeriod((*j)->content->position(), (*j)->content->end(_film)).overlap(period);
+ }
+ }
+ }
+ }
+ }
+
_black = Empty (_film, playlist(), bind(&have_video, _1), _playback_length);
_silent = Empty (_film, playlist(), bind(&have_audio, _1), _playback_length);
- _last_video_time = {};
+ _last_video_time = boost::optional<dcpomatic::DCPTime>();
_last_video_eyes = Eyes::BOTH;
- _last_audio_time = {};
+ _last_audio_time = boost::optional<dcpomatic::DCPTime>();
}
return;
}
+ if (piece->ignore_video && piece->ignore_video->contains(time)) {
+ return;
+ }
+
/* Fill gaps that we discover now that we have some video which needs to be emitted.
This is where we need to fill to.
*/
void
Player::emit_video (shared_ptr<PlayerVideo> pv, DCPTime time)
{
+ if (!_film->three_d()) {
+ if (pv->eyes() == Eyes::LEFT) {
+ /* Use left-eye images for both eyes... */
+ pv->set_eyes (Eyes::BOTH);
+ } else if (pv->eyes() == Eyes::RIGHT) {
+ /* ...and discard the right */
+ return;
+ }
+ }
+
/* We need a delay to give a little wiggle room to ensure that relevent subtitles arrive at the
player before the video that requires them.
*/