Piece::Piece (shared_ptr<Content> c, shared_ptr<Decoder> d, FrameRateChange f)
: _content (c)
, decoder (d)
- , frc (f)
+ , _frc (f)
{
if (_content->audio) {
for (auto j: _content->audio->streams()) {
Piece::content_video_to_dcp (Frame f) const
{
/* See comment in resampled_audio_to_dcp */
- auto const d = DCPTime::from_frames(f * frc.factor(), frc.dcp) - DCPTime(_content->trim_start(), frc);
+ auto const d = DCPTime::from_frames(f * _frc.factor(), _frc.dcp) - DCPTime(_content->trim_start(), _frc);
return d + _content->position();
}
Instead we convert the DCPTime using the DCP video rate then account for any skip/repeat.
*/
return DCPTime::from_frames(f, film->audio_frame_rate())
- - DCPTime(_content->trim_start(), frc)
+ - DCPTime(_content->trim_start(), _frc)
+ _content->position();
}
{
auto s = t - _content->position ();
s = min (_content->length_after_trim(film), s);
- return max (ContentTime(), ContentTime(s, frc) + _content->trim_start());
+ return max (ContentTime(), ContentTime(s, _frc) + _content->trim_start());
}
return {};
}
- return max (DCPTime(), DCPTime(t - _content->trim_start(), frc) + _content->position());
+ return max (DCPTime(), DCPTime(t - _content->trim_start(), _frc) + _content->position());
}
VideoFrameType video_frame_type () const;
FrameRateChange frame_rate_change () const {
- return frc;
+ return _frc;
}
dcpomatic::DCPTime position () const;
std::shared_ptr<Decoder> decoder;
boost::optional<dcpomatic::DCPTimePeriod> ignore_video;
- FrameRateChange frc;
bool done = false;
private:
friend struct overlap_video_test1;
std::shared_ptr<Content> _content;
+ FrameRateChange _frc;
std::map<AudioStreamPtr, dcpomatic::DCPTime> _stream_last_push_end;
};