diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-05 11:48:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-05 11:48:54 +0100 |
| commit | b60186064405914b41780021f74dd7830f2ffecb (patch) | |
| tree | e5a1f1522dc8c96c981e8c91f3338d60ec198f7a /src/lib/playlist.cc | |
| parent | 3f9891137747cd7434ce20f69b8d88b967dbdfaf (diff) | |
Back port active_frame_rate_change stuff from v2, removing specification of video frame rate for sndfile sources.
Diffstat (limited to 'src/lib/playlist.cc')
| -rw-r--r-- | src/lib/playlist.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index 1f00d4d67..247c4837b 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -397,3 +397,20 @@ Playlist::move_later (shared_ptr<Content> c) Changed (); } + +FrameRateChange +Playlist::active_frame_rate_change (Time t, int dcp_video_frame_rate) const +{ + for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) { + shared_ptr<const VideoContent> vc = dynamic_pointer_cast<const VideoContent> (*i); + if (!vc) { + break; + } + + if (vc->position() >= t && t < vc->end()) { + return FrameRateChange (vc->video_frame_rate(), dcp_video_frame_rate); + } + } + + return FrameRateChange (dcp_video_frame_rate, dcp_video_frame_rate); +} |
