- Content::examine (job);
- dcp::SubtitleContent sc (path (0), false);
- _length = DCPTime::from_frames (sc.intrinsic_duration(), sc.edit_rate().as_float ());
+ Content::examine (film, job);
+
+ auto sc = load (path(0));
+
+ auto iop = dynamic_pointer_cast<dcp::InteropSubtitleAsset>(sc);
+ auto smpte = dynamic_pointer_cast<dcp::SMPTESubtitleAsset>(sc);
+ if (smpte) {
+ set_video_frame_rate (smpte->edit_rate().numerator);
+ }
+
+ boost::mutex::scoped_lock lm (_mutex);
+
+ /* Default to turning these subtitles on */
+ only_text()->set_use (true);
+
+ _length = ContentTime::from_seconds (sc->latest_subtitle_out().as_seconds());
+
+ sc->fix_empty_font_ids ();
+
+ for (auto i: sc->load_font_nodes()) {
+ only_text()->add_font(make_shared<Font>(i->id));
+ }