shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent>(_content[0]);
return dcp && dcp->reference_audio();
}
+
+
+bool
+Piece::video_use () const
+{
+ return _content[0]->video && _content[0]->video->use();
+}
dcpomatic::DCPTime position () const;
dcpomatic::DCPTime end (boost::shared_ptr<const Film> film) const;
+ FrameRateChange frame_rate_change () const {
+ return _frc;
+ }
+
+ bool video_use () const;
dcpomatic::DCPTime content_video_to_dcp (Frame f) const;
dcpomatic::DCPTime resampled_audio_to_dcp (boost::shared_ptr<const Film> film, Frame f) const;
return;
}
- if (!piece->content->video->use()) {
+ if (!piece->video_use()) {
return;
}
- FrameRateChange frc (_film, piece->content);
+ FrameRateChange const frc = piece->frame_rate_change();
if (frc.skip && (video.frame % 2) == 1) {
return;
}
/* Time of the first frame we will emit */
- DCPTime const time = content_video_to_dcp (piece, video.frame);
+ DCPTime const time = piece->content_video_to_dcp (video.frame);
LOG_DEBUG_PLAYER("Received video frame %1 at %2", video.frame, to_string(time));
/* Discard if it's before the content's period or the last accurate seek. We can't discard