Set up OV/VF in name according to whether DCP content has been referenced.
[dcpomatic.git] / src / lib / dcp_subtitle_content.cc
index 742773043a8fc931b319e9af9a8110736dfe767b..8e24cb4c660d43f28ed2e07e1fa68df43eecc512 100644 (file)
@@ -23,6 +23,7 @@
 #include <dcp/interop_subtitle_asset.h>
 #include <dcp/smpte_subtitle_asset.h>
 #include <dcp/interop_load_font_node.h>
+#include <libxml++/libxml++.h>
 #include <boost/foreach.hpp>
 
 #include "i18n.h"
@@ -36,7 +37,7 @@ DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, boost::file
        : Content (film, path)
        , SubtitleContent (film, path)
 {
-       
+
 }
 
 DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
@@ -56,7 +57,7 @@ DCPSubtitleContent::examine (shared_ptr<Job> job)
 
        /* Default to turning these subtitles on */
        set_use_subtitles (true);
-       
+
        boost::mutex::scoped_lock lm (_mutex);
 
        shared_ptr<dcp::InteropSubtitleAsset> iop = dynamic_pointer_cast<dcp::InteropSubtitleAsset> (sc);
@@ -71,7 +72,7 @@ DCPSubtitleContent::examine (shared_ptr<Job> job)
        _length = DCPTime::from_seconds (sc->latest_subtitle_out().as_seconds ());
 
        BOOST_FOREACH (shared_ptr<dcp::LoadFontNode> i, sc->load_font_nodes ()) {
-               _fonts.push_back (shared_ptr<Font> (new Font (i->id)));
+               add_font (shared_ptr<Font> (new Font (i->id)));
        }
 }
 
@@ -95,7 +96,7 @@ DCPSubtitleContent::technical_summary () const
 {
        return Content::technical_summary() + " - " + _("DCP XML subtitles");
 }
-      
+
 void
 DCPSubtitleContent::as_xml (xmlpp::Node* node) const
 {