summaryrefslogtreecommitdiff
path: root/src/lib/dcp_subtitle_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-12-15 16:56:18 +0000
committerCarl Hetherington <cth@carlh.net>2014-12-15 16:56:18 +0000
commita5902c6008fd20392c7248c30bc469310122c527 (patch)
tree8b2712fd09a64c4ca3ea01f2d6304f39837abddd /src/lib/dcp_subtitle_content.cc
parent99dc00531b985aa1efa23bec5a00b1a5ad26e86c (diff)
Start of Fonts dialog for setting up subtitle fonts.
Diffstat (limited to 'src/lib/dcp_subtitle_content.cc')
-rw-r--r--src/lib/dcp_subtitle_content.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc
index 85c28d038..351d8c26e 100644
--- a/src/lib/dcp_subtitle_content.cc
+++ b/src/lib/dcp_subtitle_content.cc
@@ -17,8 +17,10 @@
*/
+#include "font.h"
#include "dcp_subtitle_content.h"
#include <dcp/interop_subtitle_content.h>
+#include <dcp/interop_load_font.h>
#include <dcp/raw_convert.h>
#include "i18n.h"
@@ -47,9 +49,18 @@ void
DCPSubtitleContent::examine (shared_ptr<Job> job, bool calculate_digest)
{
Content::examine (job, calculate_digest);
+
dcp::InteropSubtitleContent sc (path (0));
+
+ boost::mutex::scoped_lock lm (_mutex);
+
_subtitle_language = sc.language ();
_length = DCPTime::from_seconds (sc.latest_subtitle_out().to_seconds ());
+
+ list<shared_ptr<dcp::InteropLoadFont> > fonts = sc.load_font_nodes ();
+ for (list<shared_ptr<dcp::InteropLoadFont> >::const_iterator i = fonts.begin(); i != fonts.end(); ++i) {
+ _fonts.push_back (shared_ptr<Font> (new Font ((*i)->id)));
+ }
}
DCPTime