diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-22 00:39:35 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-22 00:46:32 +0200 |
| commit | 16723e76c4a712f9c35df46d15fbd09917724e07 (patch) | |
| tree | bb40d314aa7797187595df852029a44c7f56d129 /src/lib | |
| parent | 9e5d71ceede8bcafc1e401814b38e2fc8b17e9c7 (diff) | |
Remove unused methods.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 26 | ||||
| -rw-r--r-- | src/lib/player.h | 2 |
2 files changed, 4 insertions, 24 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index b45401fa9..f3aa97cb0 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -378,13 +378,10 @@ Player::black_player_video_frame (Eyes eyes) const ); } -Frame -Player::dcp_to_content_video (shared_ptr<const Piece> piece, DCPTime t) const -{ - DCPTime s = t - piece->content->position (); - s = min (piece->content->length_after_trim(_film), s); - s = max (DCPTime(), s + DCPTime (piece->content->trim_start(), piece->frc)); +DCPTime +Player::content_video_to_dcp (shared_ptr<const Piece> piece, Frame f) const +{ /* It might seem more logical here to convert s to a ContentTime (using the FrameRateChange) then convert that ContentTime to frames at the content's rate. However this fails for situations like content at 29.9978733fps, DCP at 30fps. The accuracy of the Time type is not @@ -392,30 +389,15 @@ Player::dcp_to_content_video (shared_ptr<const Piece> piece, DCPTime t) const Instead we convert the DCPTime using the DCP video rate then account for any skip/repeat. */ - return s.frames_floor (piece->frc.dcp) / piece->frc.factor (); -} - -DCPTime -Player::content_video_to_dcp (shared_ptr<const Piece> piece, Frame f) const -{ - /* See comment in dcp_to_content_video */ DCPTime const d = DCPTime::from_frames (f * piece->frc.factor(), piece->frc.dcp) - DCPTime(piece->content->trim_start(), piece->frc); return d + piece->content->position(); } -Frame -Player::dcp_to_resampled_audio (shared_ptr<const Piece> piece, DCPTime t) const -{ - DCPTime s = t - piece->content->position (); - s = min (piece->content->length_after_trim(_film), s); - /* See notes in dcp_to_content_video */ - return max (DCPTime (), DCPTime (piece->content->trim_start (), piece->frc) + s).frames_floor (_film->audio_frame_rate ()); -} DCPTime Player::resampled_audio_to_dcp (shared_ptr<const Piece> piece, Frame f) const { - /* See comment in dcp_to_content_video */ + /* See notes in content_video_to_dcp */ return DCPTime::from_frames (f, _film->audio_frame_rate()) - DCPTime (piece->content->trim_start(), piece->frc) + piece->content->position(); diff --git a/src/lib/player.h b/src/lib/player.h index ea81ae939..f4bd26d9f 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -126,9 +126,7 @@ private: void film_change (ChangeType, Film::Property); void playlist_change (ChangeType); void playlist_content_change (ChangeType, int, bool); - Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const; dcpomatic::DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const; - Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const; dcpomatic::DCPTime resampled_audio_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const; dcpomatic::ContentTime dcp_to_content_time (boost::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const; dcpomatic::DCPTime content_time_to_dcp (boost::shared_ptr<const Piece> piece, dcpomatic::ContentTime t) const; |
