summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-18 00:53:17 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-18 00:53:17 +0100
commit7c0e02d933c243f0559631402e02fb598caf4647 (patch)
tree71594f519e77a89103636cd0b63b4cf442912fd7
parent7ba0648f7f48a5cc8fc5fca1c2a037ee473583d5 (diff)
Add -ISDCF to ISDCF name as required (#2416).
-rw-r--r--src/lib/film.cc4
-rw-r--r--test/isdcf_name_test.cc9
2 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 0ce56a436..e0aa08a77 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -1002,6 +1002,10 @@ Film::isdcf_name (bool if_created_now) const
isdcf_name += "-VI";
}
+ if (find_if(content_list.begin(), content_list.end(), [](shared_ptr<Content> c) { return static_cast<bool>(c->atmos); }) != content_list.end()) {
+ isdcf_name += "-ATMOS";
+ }
+
isdcf_name += "_" + resolution_to_string (_resolution);
if (_studio && _studio->length() >= 2) {
diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc
index b15612895..5365dc08a 100644
--- a/test/isdcf_name_test.cc
+++ b/test/isdcf_name_test.cc
@@ -236,6 +236,15 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
/* Check that nothing is added for non-existant ratings */
film->set_ratings({});
BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_QBP-fr_US_71-HI-VI_4K_DI_20140704_PPF_SMPTE_OV");
+}
+
+
+BOOST_AUTO_TEST_CASE(isdcf_name_with_atmos)
+{
+ auto content = content_factory(TestPaths::private_data() / "atmos_asset.mxf");
+ auto film = new_test_film2("isdcf_name_with_atmos", content);
+ film->set_name("Hello");
+ BOOST_CHECK_EQUAL(film->isdcf_name(false), "Hello_TST-1_F_XX-XX_MOS-ATMOS_2K_20230118_SMPTE_OV");
}