root->add_child("ContentVersion")->add_child_text(i);
}
root->add_child("NameLanguage")->add_child_text(_name_language.to_string());
+ root->add_child("TerritoryType")->add_child_text(territory_type_to_string(_territory_type));
if (_release_territory) {
root->add_child("ReleaseTerritory")->add_child_text(_release_territory->subtag());
}
if (name_language) {
_name_language = dcp::LanguageTag (*name_language);
}
+ auto territory_type = f.optional_string_child("TerritoryType");
+ if (territory_type) {
+ _territory_type = string_to_territory_type(*territory_type);
+ }
auto release_territory = f.optional_string_child("ReleaseTerritory");
if (release_territory) {
_release_territory = dcp::LanguageTag::RegionSubtag (*release_territory);
}
_studio = isdcf->optional_string_child("Studio");
_facility = isdcf->optional_string_child("Facility");
- _temp_version = isdcf->optional_bool_child("TempVersion").get_value_or("false");
- _pre_release = isdcf->optional_bool_child("PreRelease").get_value_or("false");
- _red_band = isdcf->optional_bool_child("RedBand").get_value_or("false");
- _two_d_version_of_three_d = isdcf->optional_bool_child("TwoDVersionOfThreeD").get_value_or("false");
+ _temp_version = isdcf->optional_bool_child("TempVersion").get_value_or(false);
+ _pre_release = isdcf->optional_bool_child("PreRelease").get_value_or(false);
+ _red_band = isdcf->optional_bool_child("RedBand").get_value_or(false);
+ _two_d_version_of_three_d = isdcf->optional_bool_child("TwoDVersionOfThreeD").get_value_or(false);
_chain = isdcf->optional_string_child("Chain");
}
pair<optional<dcp::LanguageTag>, vector<dcp::LanguageTag>>
-Film::subtitle_languages () const
+Film::subtitle_languages(bool* burnt_in) const
{
+ if (burnt_in) {
+ *burnt_in = true;
+ }
+
pair<optional<dcp::LanguageTag>, vector<dcp::LanguageTag>> result;
for (auto i: content()) {
- for (auto 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());
- } else {
- result.first = text->language().get();
+ for (auto const& text: i->text) {
+ if (text->use() && text->type() == TextType::OPEN_SUBTITLE) {
+ if (!text->burn() && burnt_in) {
+ *burnt_in = false;
+ }
+ if (text->language()) {
+ if (text->language_is_additional()) {
+ result.second.push_back(text->language().get());
+ } else {
+ result.first = text->language().get();
+ }
}
}
}
isdcf_name += "_" + to_upper (audio_language);
- auto burnt_in = true;
- for (auto i: content_list) {
- for (auto text: i->text) {
- if (text->type() == TextType::OPEN_SUBTITLE && text->use() && !text->burn()) {
- burnt_in = false;
- }
- }
- }
-
- auto sub_langs = subtitle_languages();
+ bool burnt_in;
+ auto sub_langs = subtitle_languages(&burnt_in);
auto ccap_langs = closed_caption_languages();
if (sub_langs.first && sub_langs.first->language()) {
auto lang = entry_for_language(*sub_langs.first);
isdcf_name += "-XX";
}
- if (_release_territory) {
+ if (_territory_type == TerritoryType::INTERNATIONAL_TEXTED) {
+ isdcf_name += "_INT-TD";
+ } else if (_territory_type == TerritoryType::INTERNATIONAL_TEXTLESS) {
+ isdcf_name += "_INT-TL";
+ } else if (_release_territory) {
auto territory = _release_territory->subtag();
isdcf_name += "_" + to_upper (territory);
if (!_ratings.empty()) {
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);
}
}
return our_micro < micro;
}
+
+void
+Film::set_territory_type(TerritoryType type)
+{
+ FilmChangeSignaller ch(this, FilmProperty::TERRITORY_TYPE);
+ _territory_type = type;
+}
+