diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-12 15:05:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-12 15:05:09 +0100 |
| commit | f9068dcbfbb09082e29e2a779ef1a7a2f6ee849e (patch) | |
| tree | 40054a96c986c133b2edb00c7c9a127d8d36a1a2 /src/lib/dcp_content.cc | |
| parent | bccc426dd0924bf6be63000835d7c86fd390ff59 (diff) | |
Rename split-by-video content slightly; fix referencing to multi-reel DCPs.
Diffstat (limited to 'src/lib/dcp_content.cc')
| -rw-r--r-- | src/lib/dcp_content.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index cb9dcf53d..f39b2fb4a 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -23,9 +23,13 @@ #include "film.h" #include "config.h" #include "compose.hpp" +#include "dcp_decoder.h" #include <dcp/dcp.h> #include <dcp/exceptions.h> +#include <dcp/reel_picture_asset.h> +#include <dcp/reel.h> #include <libxml++/libxml++.h> +#include <boost/foreach.hpp> #include <iterator> #include <iostream> @@ -245,3 +249,20 @@ DCPContent::set_reference_subtitle (bool r) signal_changed (DCPContentProperty::REFERENCE_SUBTITLE); } + +list<DCPTime> +DCPContent::reel_split_points () const +{ + list<DCPTime> s; + DCPDecoder decoder (shared_from_this(), false); + DCPTime t = position(); + + shared_ptr<const Film> film = _film.lock (); + DCPOMATIC_ASSERT (film); + BOOST_FOREACH (shared_ptr<dcp::Reel> k, decoder.reels()) { + s.push_back (t); + t += DCPTime::from_frames (k->main_picture()->duration(), film->video_frame_rate()); + } + + return s; +} |
