X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_content.cc;h=54bd631cb6586a03dc7ee15c9831193e78c78e56;hb=673ba43fb66eb0dee43807501753749f144254a7;hp=a8e98d4264b3d82f12293b9f22c6eccbeebe4ceb;hpb=24dcab1d4d8d7a28a939c7c4d786197684f155f6;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc index a8e98d426..54bd631cb 100644 --- a/src/lib/dcp_subtitle_content.cc +++ b/src/lib/dcp_subtitle_content.cc @@ -37,23 +37,23 @@ using boost::shared_ptr; using boost::dynamic_pointer_cast; using dcp::raw_convert; -DCPSubtitleContent::DCPSubtitleContent (shared_ptr film, boost::filesystem::path path) - : Content (film, path) +DCPSubtitleContent::DCPSubtitleContent (boost::filesystem::path path) + : Content (path) { text.push_back (shared_ptr (new TextContent (this, TEXT_OPEN_SUBTITLE, TEXT_OPEN_SUBTITLE))); } -DCPSubtitleContent::DCPSubtitleContent (shared_ptr film, cxml::ConstNodePtr node, int version) - : Content (film, node) +DCPSubtitleContent::DCPSubtitleContent (cxml::ConstNodePtr node, int version) + : Content (node) , _length (node->number_child ("Length")) { text = TextContent::from_xml (this, node, version); } void -DCPSubtitleContent::examine (shared_ptr job) +DCPSubtitleContent::examine (shared_ptr film, shared_ptr job) { - Content::examine (job); + Content::examine (film, job); shared_ptr sc = load (path (0)); @@ -82,12 +82,18 @@ DCPSubtitleContent::examine (shared_ptr job) } DCPTime -DCPSubtitleContent::full_length () const +DCPSubtitleContent::full_length (shared_ptr film) const { - FrameRateChange const frc (active_video_frame_rate(), film()->video_frame_rate()); + FrameRateChange const frc (film, shared_from_this()); return DCPTime (_length, frc); } +DCPTime +DCPSubtitleContent::approximate_length () const +{ + return DCPTime (_length, FrameRateChange()); +} + string DCPSubtitleContent::summary () const {