X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_content.cc;h=f39b2fb4a221c8070199d01aa3629972fc07a352;hb=f9068dcbfbb09082e29e2a779ef1a7a2f6ee849e;hp=cb9dcf53d6dc184caaa47f098fb3954b2a3eec8a;hpb=4e6f15f602c605804f95c6b06af9bf79eaf2dde1;p=dcpomatic.git 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 #include +#include +#include #include +#include #include #include @@ -245,3 +249,20 @@ DCPContent::set_reference_subtitle (bool r) signal_changed (DCPContentProperty::REFERENCE_SUBTITLE); } + +list +DCPContent::reel_split_points () const +{ + list s; + DCPDecoder decoder (shared_from_this(), false); + DCPTime t = position(); + + shared_ptr film = _film.lock (); + DCPOMATIC_ASSERT (film); + BOOST_FOREACH (shared_ptr k, decoder.reels()) { + s.push_back (t); + t += DCPTime::from_frames (k->main_picture()->duration(), film->video_frame_rate()); + } + + return s; +}