X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fsubtitle_asset.cc;h=866a6d253706401f96746527bf9eec329782ccc0;hb=d11bf9b19fc0ed5d15a33a1da82044bde859e98e;hp=ca91e2c7991fad20478ced70fb3989579ac16001;hpb=b172ecbede672bdef982e5b45376ac3517440263;p=libdcp.git diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc index ca91e2c7..866a6d25 100644 --- a/src/subtitle_asset.cc +++ b/src/subtitle_asset.cc @@ -20,7 +20,9 @@ #include #include #include +#include #include "subtitle_asset.h" +#include "parse/subtitle.h" #include "util.h" #include "xml.h" @@ -54,7 +56,8 @@ SubtitleAsset::SubtitleAsset (string directory, string movie_title, string langu void SubtitleAsset::read_xml (string xml_file) { - shared_ptr xml (new cxml::File (xml_file, "DCSubtitle")); + shared_ptr xml (new cxml::Document ("DCSubtitle")); + xml->read_file (xml_file); _uuid = xml->string_child ("SubtitleID"); _movie_title = xml->string_child ("MovieTitle"); @@ -276,7 +279,7 @@ SubtitleAsset::add (shared_ptr s) } void -SubtitleAsset::write_to_cpl (xmlpp::Node* node) const +SubtitleAsset::write_to_cpl (xmlpp::Element* node, bool) const { /* XXX: should EditRate, Duration and IntrinsicDuration be in here? */