X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;h=099bacfdcb7b5513358f968555e03a864703e338;hb=4e5d5c7dcc6470b8dc918d03a00e30c07df60efe;hp=1290cbda21fc67f44b924d323607262c1799bff4;hpb=f71a23109d774dc65e4262e5dba41360732cf342;p=dcpomatic.git diff --git a/src/lib/film.cc b/src/lib/film.cc index 1290cbda2..099bacfdc 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -853,7 +853,7 @@ Film::move_content_later (shared_ptr c) _playlist->move_later (c); } -Time +DCPTime Film::length () const { return _playlist->length (); @@ -865,12 +865,18 @@ Film::has_subtitles () const return _playlist->has_subtitles (); } -OutputVideoFrame +VideoFrame Film::best_video_frame_rate () const { return _playlist->best_dcp_frame_rate (); } +FrameRateChange +Film::active_frame_rate_change (DCPTime t) const +{ + return _playlist->active_frame_rate_change (t, video_frame_rate ()); +} + void Film::playlist_content_changed (boost::weak_ptr c, int p) { @@ -889,31 +895,31 @@ Film::playlist_changed () signal_changed (CONTENT); } -OutputAudioFrame -Film::time_to_audio_frames (Time t) const +AudioFrame +Film::time_to_audio_frames (DCPTime t) const { return t * audio_frame_rate () / TIME_HZ; } -OutputVideoFrame -Film::time_to_video_frames (Time t) const +VideoFrame +Film::time_to_video_frames (DCPTime t) const { return t * video_frame_rate () / TIME_HZ; } -Time -Film::audio_frames_to_time (OutputAudioFrame f) const +DCPTime +Film::audio_frames_to_time (AudioFrame f) const { return f * TIME_HZ / audio_frame_rate (); } -Time -Film::video_frames_to_time (OutputVideoFrame f) const +DCPTime +Film::video_frames_to_time (VideoFrame f) const { return f * TIME_HZ / video_frame_rate (); } -OutputAudioFrame +AudioFrame Film::audio_frame_rate () const { /* XXX */