From fdb5601d6551eb60d835bc03896d9799d0707d9f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 24 Apr 2021 23:26:20 +0200 Subject: [PATCH] Make Piece::frc private. --- src/lib/piece.cc | 10 +++++----- src/lib/piece.h | 4 ++-- 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 c, shared_ptr 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 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 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 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; boost::optional ignore_video; - FrameRateChange frc; bool done = false; private: friend struct overlap_video_test1; std::shared_ptr _content; + FrameRateChange _frc; std::map _stream_last_push_end; }; -- 2.30.2