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()) {
- for (auto text: i->text) {
+ for (auto const& text: i->text) {
if (text->use() && text->type() == TextType::OPEN_SUBTITLE && text->language()) {
if (text->language_is_additional()) {
result.second.push_back(text->language().get());
for (auto const& item: dcp::filesystem::directory_iterator(dir)) {
if (
dcp::filesystem::is_directory(item) &&
- item.path().leaf() != "j2c" && item.path().leaf() != "video" && item.path().leaf() != "info" && item.path().leaf() != "analysis"
+ item.path().filename() != "j2c" && item.path().filename() != "video" && item.path().filename() != "info" && item.path().filename() != "analysis"
) {
try {
maybe_set_container_and_resolution ();
if (c->atmos) {
- set_audio_channels (14);
+ if (_audio_channels < 14) {
+ set_audio_channels(14);
+ }
set_interop (false);
}
}