summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-24 23:26:20 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-07 09:29:59 +0200
commitfdb5601d6551eb60d835bc03896d9799d0707d9f (patch)
treeb6ccbab8f769c62183bb206ad83ee3a422fc94cc
parent37b560667d40397f61a52123de2bc20b5096335b (diff)
Make Piece::frc private.
-rw-r--r--src/lib/piece.cc10
-rw-r--r--src/lib/piece.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/piece.cc b/src/lib/piece.cc
index 736c9ae17..6dddc798c 100644
--- a/src/lib/piece.cc
+++ b/src/lib/piece.cc
@@ -40,7 +40,7 @@ using namespace dcpomatic;
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()) {
@@ -76,7 +76,7 @@ DCPTime
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();
}
@@ -92,7 +92,7 @@ Piece::resampled_audio_to_dcp (Frame f, shared_ptr<const Film> film) const
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();
}
@@ -102,7 +102,7 @@ Piece::dcp_to_content_time (DCPTime t, shared_ptr<const Film> film) const
{
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());
}
@@ -113,7 +113,7 @@ Piece::content_time_to_dcp (shared_ptr<const Content> content, ContentTime t) co
return {};
}
- return max (DCPTime(), DCPTime(t - _content->trim_start(), frc) + _content->position());
+ return max (DCPTime(), DCPTime(t - _content->trim_start(), _frc) + _content->position());
}
diff --git a/src/lib/piece.h b/src/lib/piece.h
index a69c6f5cc..527f65c62 100644
--- a/src/lib/piece.h
+++ b/src/lib/piece.h
@@ -56,7 +56,7 @@ public:
VideoFrameType video_frame_type () const;
FrameRateChange frame_rate_change () const {
- return frc;
+ return _frc;
}
dcpomatic::DCPTime position () const;
@@ -74,13 +74,13 @@ public:
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;
};