summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-02-12 17:28:33 +0100
committerCarl Hetherington <cth@carlh.net>2026-02-12 17:28:33 +0100
commit67b997fb833c6e470852615c767fa2f9d333df2a (patch)
tree36bb8fefebb50084a085ac3e1c6394226f82b3ba
parent6e912b760fbe5a88e2816da619b53e08883dcaab (diff)
FIXME: Fix MainSoundConfiguration CPL tag with Atmos content.
Needs libdcp version bump.
-rw-r--r--cscript2
-rw-r--r--src/lib/writer.cc7
-rw-r--r--test/atmos_test.cc17
3 files changed, 22 insertions, 4 deletions
diff --git a/cscript b/cscript
index 7b8abec8c..4a8998d46 100644
--- a/cscript
+++ b/cscript
@@ -502,7 +502,7 @@ def build_with_cpp17(target):
def dependencies(target, options):
- deps = [('libdcp', 'v1.10.48', {'c++17': build_with_cpp17(target)})]
+ deps = [('libdcp', '47eca1672334a9cf0f4b37de2f28a59b66403118', {'c++17': build_with_cpp17(target)})]
deps.append(('libsub', 'v1.6.59'))
deps.append(('leqm-nrt', 'd75d0af984d9c14bfefca8f1bdbc215c3bf3a388'))
if target.platform != 'linux' or target.distro != 'arch':
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index be14e6ef0..01b84b141 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -677,6 +677,13 @@ Writer::finish()
}
}
+ if (film()->contains_atmos_content()) {
+ if (msc.channels() < 14) {
+ msc.set_channels(14);
+ }
+ msc.set_mapping(13, dcp::Channel::SYNC_SIGNAL);
+ }
+
cpl->set_main_sound_configuration(msc);
cpl->set_main_sound_sample_rate(film()->audio_frame_rate());
cpl->set_main_picture_stored_area(film()->frame_size());
diff --git a/test/atmos_test.cc b/test/atmos_test.cc
index 63da157b5..885541a5c 100644
--- a/test/atmos_test.cc
+++ b/test/atmos_test.cc
@@ -45,17 +45,29 @@ BOOST_AUTO_TEST_CASE(atmos_passthrough_test)
{
Cleanup cl;
+ auto atmos = content_factory(TestPaths::private_data() / "atmos_asset.mxf")[0];
+ auto picture = content_factory("test/data/flat_red.png")[0];
+
auto film = new_test_film(
"atmos_passthrough_test",
- content_factory(TestPaths::private_data() / "atmos_asset.mxf"),
+ { atmos, picture },
&cl
);
- make_and_verify_dcp(film, {dcp::VerificationNote::Code::MISSING_CPL_METADATA});
+ make_and_verify_dcp(film);
auto ref = TestPaths::private_data() / "atmos_asset.mxf";
BOOST_REQUIRE(mxf_atmos_files_same(ref, dcp_file(film, "atmos"), true));
+ dcp::DCP dcp(film->dir(film->dcp_name()));
+ dcp.read();
+ BOOST_REQUIRE_EQUAL(dcp.cpls().size(), 1U);
+ auto cpl = dcp.cpls()[0];
+ auto msc = cpl->main_sound_configuration();
+ BOOST_REQUIRE(msc);
+ BOOST_REQUIRE(msc->channels() > 13);
+ BOOST_CHECK(msc->mapping(13).get_value_or(dcp::Channel::LEFT) == dcp::Channel::SYNC_SIGNAL);
+
cl.run();
}
@@ -180,4 +192,3 @@ BOOST_AUTO_TEST_CASE(atmos_multi_reel_test)
BOOST_CHECK(reels[i]->atmos());
}
}
-