X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_content.cc;h=3f9772d597de3b6464fe6b888a3f0be821d503d6;hp=83b0d200cee33146c6f92b33a1de1bd0b34df0da;hb=a5e87b6f0f496f4ed71d9129d40a5baebb68495f;hpb=1f82930e73679d6aec5223caa255f564339a1a2a diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc index 83b0d200c..3f9772d59 100644 --- a/src/lib/dcp_subtitle_content.cc +++ b/src/lib/dcp_subtitle_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,16 +17,19 @@ */ -#include -#include +#include "font.h" #include "dcp_subtitle_content.h" +#include "raw_convert.h" +#include +#include +#include +#include #include "i18n.h" using std::string; using std::list; using boost::shared_ptr; -using dcp::raw_convert; DCPSubtitleContent::DCPSubtitleContent (shared_ptr film, boost::filesystem::path path) : Content (film, path) @@ -47,8 +50,17 @@ void DCPSubtitleContent::examine (shared_ptr job) { Content::examine (job); - dcp::SubtitleContent sc (path (0), false); - _length = DCPTime::from_seconds (sc.latest_subtitle_out().to_seconds ()); + + shared_ptr sc = load (path (0)); + + boost::mutex::scoped_lock lm (_mutex); + + _subtitle_language = sc->language (); + _length = DCPTime::from_seconds (sc->latest_subtitle_out().to_seconds ()); + + BOOST_FOREACH (shared_ptr i, sc->load_font_nodes ()) { + _fonts.push_back (shared_ptr (new Font (i->id))); + } } DCPTime @@ -72,12 +84,6 @@ DCPSubtitleContent::technical_summary () const return Content::technical_summary() + " - " + _("DCP XML subtitles"); } -string -DCPSubtitleContent::information () const -{ - -} - void DCPSubtitleContent::as_xml (xmlpp::Node* node) const {