_movie_title = xml->string_child ("MovieTitle");
_load_font_nodes = type_children<dcp::InteropLoadFontNode> (xml, "LoadFont");
- list<cxml::NodePtr> f = xml->node_children ("Font");
list<shared_ptr<dcp::FontNode> > font_nodes;
- BOOST_FOREACH (cxml::NodePtr& i, f) {
- font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, 250)));
+ BOOST_FOREACH (cxml::NodePtr const & i, xml->node_children ("Font")) {
+ font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, 250, "Id")));
}
- parse_subtitles (xml, font_nodes);
+ list<shared_ptr<dcp::SubtitleNode> > subtitle_nodes;
+ BOOST_FOREACH (cxml::NodePtr const & i, xml->node_children ("Subtitle")) {
+ subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, 250, "Id")));
+ }
+
+ parse_subtitles (xml, font_nodes, subtitle_nodes);
}
InteropSubtitleAsset::InteropSubtitleAsset ()
}
-Glib::ustring
+string
InteropSubtitleAsset::xml_as_string () const
{
xmlpp::Document doc;
throw FileError ("Could not open file for writing", p, -1);
}
- Glib::ustring const s = xml_as_string ();
- fwrite (s.c_str(), 1, s.bytes(), f);
+ string const s = xml_as_string ();
+ /* length() here gives bytes not characters */
+ fwrite (s.c_str(), 1, s.length(), f);
fclose (f);
_file = p;
++j;
}
if (j != _fonts.end ()) {
- fwrite (j->data.data.get(), 1, j->data.size, f);
+ fwrite (j->data.data().get(), 1, j->data.size(), f);
j->file = file;
}
fclose (f);