root->add_child("UserExplicitVideoFrameRate")->add_child_text(_user_explicit_video_frame_rate ? "1" : "0");
for (auto const& marker: _markers) {
auto m = root->add_child("Marker");
- m->set_attribute("Type", dcp::marker_to_string(marker.first));
+ m->set_attribute("type", dcp::marker_to_string(marker.first));
m->add_child_text(raw_convert<string>(marker.second.get()));
}
for (auto i: _ratings) {
_user_explicit_video_frame_rate = f.optional_bool_child("UserExplicitVideoFrameRate").get_value_or(false);
for (auto i: f.node_children("Marker")) {
- _markers[dcp::marker_from_string(i->string_attribute("Type"))] = DCPTime(dcp::raw_convert<DCPTime::Type>(i->content()));
+ auto type = i->optional_string_attribute("Type");
+ if (!type) {
+ type = i->string_attribute("type");
+ }
+ _markers[dcp::marker_from_string(*type)] = DCPTime(dcp::raw_convert<DCPTime::Type>(i->content()));
}
for (auto i: f.node_children("Rating")) {
pair<optional<dcp::LanguageTag>, vector<dcp::LanguageTag>> result;
for (auto i: content()) {
+ auto dcp = dynamic_pointer_cast<DCPContent>(i);
for (auto const& text: i->text) {
- if (text->use() && text->type() == TextType::OPEN_SUBTITLE) {
+ auto const use = text->use() || (dcp && dcp->reference_text(TextType::OPEN_SUBTITLE));
+ if (use && text->type() == TextType::OPEN_SUBTITLE) {
if (!text->burn() && burnt_in) {
*burnt_in = false;
}