diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-23 22:41:51 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-01 16:38:52 +0100 |
| commit | 61798477a11c99ba22b4dd733cb0678403e738af (patch) | |
| tree | cc681a88826d62c7ba105b6bfd64698cf3f01232 /src/lib/player.cc | |
| parent | de9cbfbbfcf2ecc9d2579c65703b54f42e4a2c32 (diff) | |
Remove unused methods: this should happen regardless.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 3d6b26156..5e04271e2 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -386,13 +386,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->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 @@ -400,25 +397,10 @@ 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->position(); } -Frame -Player::dcp_to_resampled_audio (shared_ptr<const Piece> piece, DCPTime t) const -{ - DCPTime s = t - piece->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 |
