summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-05-18 00:51:45 +0200
committerCarl Hetherington <cth@carlh.net>2024-05-18 00:51:45 +0200
commitef20ef5082586ac7c54e6e5f2d3520249f9e2139 (patch)
tree724748bb22b19675010d1c4cdf7d76ab280e9533
parent4347717803d202a41792faf42e846fd73a0586bf (diff)
fixup! Introduce SMPTEFlavour and use it to decide which optional things to write.smpte-a
-rw-r--r--test/dcp_test.cc6
-rw-r--r--test/decryption_test.cc2
-rw-r--r--test/encryption_test.cc2
-rw-r--r--test/mca_test.cc4
-rw-r--r--test/sound_asset_writer_test.cc4
-rw-r--r--test/sync_test.cc4
-rw-r--r--test/test.cc2
7 files changed, 12 insertions, 12 deletions
diff --git a/test/dcp_test.cc b/test/dcp_test.cc
index 5456092c..9d38ef6e 100644
--- a/test/dcp_test.cc
+++ b/test/dcp_test.cc
@@ -119,7 +119,7 @@ BOOST_AUTO_TEST_CASE (dcp_test2)
auto ms = make_shared<dcp::SoundAsset>(dcp::Fraction(24, 1), 48000, 1, dcp::LanguageTag("en-GB"), dcp::Standard::SMPTE);
ms->set_metadata (mxf_meta);
- auto sound_writer = ms->start_write("build/test/DCP/dcp_test2/audio.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto sound_writer = ms->start_write("build/test/DCP/dcp_test2/audio.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
SF_INFO info;
info.format = 0;
@@ -210,7 +210,7 @@ test_rewriting_sound(string name, bool modify)
auto reader = A_sound->asset()->start_read();
auto sound = make_shared<dcp::SoundAsset>(A_sound->asset()->edit_rate(), A_sound->asset()->sampling_rate(), A_sound->asset()->channels(), dcp::LanguageTag("en-US"), dcp::Standard::SMPTE);
- auto writer = sound->start_write(path("build") / "test" / name / "pcm_8246f87f-e1df-4c42-a290-f3b3069ff021.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto writer = sound->start_write(path("build") / "test" / name / "pcm_8246f87f-e1df-4c42-a290-f3b3069ff021.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
bool need_to_modify = modify;
for (int i = 0; i < A_sound->asset()->intrinsic_duration(); ++i) {
@@ -301,7 +301,7 @@ BOOST_AUTO_TEST_CASE (dcp_test5)
auto ms = make_shared<dcp::SoundAsset>(dcp::Fraction(24, 1), 48000, 1, dcp::LanguageTag("en-GB"), dcp::Standard::SMPTE);
ms->set_metadata (mxf_meta);
- auto sound_writer = ms->start_write("build/test/DCP/dcp_test5/audio.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto sound_writer = ms->start_write("build/test/DCP/dcp_test5/audio.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
SF_INFO info;
info.format = 0;
diff --git a/test/decryption_test.cc b/test/decryption_test.cc
index 8f3dbff7..5553e720 100644
--- a/test/decryption_test.cc
+++ b/test/decryption_test.cc
@@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE (decryption_test2)
auto sound_asset = std::make_shared<dcp::SoundAsset>(dcp::Fraction(24, 1), 48000, 2, dcp::LanguageTag("en-GB"), dcp::Standard::SMPTE);
sound_asset->set_key (key);
sound_asset->set_context_id (context_id);
- auto sound_writer = sound_asset->start_write(dir / "sound.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto sound_writer = sound_asset->start_write(dir / "sound.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
std::array<float, 48000> left;
std::array<float, 48000> right;
for (int i = 0; i < 48000; ++i) {
diff --git a/test/encryption_test.cc b/test/encryption_test.cc
index 358a3fd9..703bfd1f 100644
--- a/test/encryption_test.cc
+++ b/test/encryption_test.cc
@@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
auto ms = make_shared<dcp::SoundAsset>(dcp::Fraction (24, 1), 48000, 1, dcp::LanguageTag("en-GB"), dcp::Standard::SMPTE);
ms->set_metadata (mxf_metadata);
ms->set_key (key);
- auto sound_writer = ms->start_write("build/test/DCP/encryption_test/audio.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto sound_writer = ms->start_write("build/test/DCP/encryption_test/audio.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
SF_INFO info;
info.format = 0;
diff --git a/test/mca_test.cc b/test/mca_test.cc
index bdfc9484..8e3739c8 100644
--- a/test/mca_test.cc
+++ b/test/mca_test.cc
@@ -97,7 +97,7 @@ BOOST_AUTO_TEST_CASE (parse_mca_descriptors_from_mxf_test)
BOOST_AUTO_TEST_CASE (write_mca_descriptors_to_mxf_test)
{
auto sound_asset = make_shared<dcp::SoundAsset>(dcp::Fraction(24, 1), 48000, 6, dcp::LanguageTag("en-US"), dcp::Standard::SMPTE);
- auto writer = sound_asset->start_write("build/test/write_mca_descriptors_to_mxf_test.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto writer = sound_asset->start_write("build/test/write_mca_descriptors_to_mxf_test.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
float* samples[6];
for (int i = 0; i < 6; ++i) {
@@ -153,7 +153,7 @@ check_mca_descriptors(int suffix, vector<dcp::Channel> extra_active_channels, ve
boost::filesystem::create_directories(dir);
auto sound_asset = make_shared<dcp::SoundAsset>(dcp::Fraction(24, 1), 48000, 16, dcp::LanguageTag("en-US"), dcp::Standard::SMPTE);
- auto writer = sound_asset->start_write(dir / "mxf.mxf", extra_active_channels, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto writer = sound_asset->start_write(dir / "mxf.mxf", extra_active_channels, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
vector<vector<float>> samples(6);
float* pointers[6];
diff --git a/test/sound_asset_writer_test.cc b/test/sound_asset_writer_test.cc
index d5a66489..99128e32 100644
--- a/test/sound_asset_writer_test.cc
+++ b/test/sound_asset_writer_test.cc
@@ -48,7 +48,7 @@ void
no_padding_test(boost::filesystem::path path, std::function<void (shared_ptr<dcp::SoundAssetWriter>, boost::random::mt19937&, boost::random::uniform_int_distribution<>&)> write)
{
dcp::SoundAsset asset({24, 1}, 48000, 6, dcp::LanguageTag{"en-GB"}, dcp::Standard::SMPTE);
- auto writer = asset.start_write(path, {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto writer = asset.start_write(path, {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
boost::random::mt19937 rng(1);
boost::random::uniform_int_distribution<> dist(0, 32767);
@@ -119,7 +119,7 @@ void
padding_test(boost::filesystem::path path, std::function<void (shared_ptr<dcp::SoundAssetWriter>, boost::random::mt19937&, boost::random::uniform_int_distribution<>&)> write)
{
dcp::SoundAsset asset({24, 1}, 48000, 14, dcp::LanguageTag{"en-GB"}, dcp::Standard::SMPTE);
- auto writer = asset.start_write(path, {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto writer = asset.start_write(path, {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
boost::random::mt19937 rng(1);
boost::random::uniform_int_distribution<> dist(0, 32767);
diff --git a/test/sync_test.cc b/test/sync_test.cc
index 67920e2f..5e0f7d72 100644
--- a/test/sync_test.cc
+++ b/test/sync_test.cc
@@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE (sync_test1)
}
}
- auto writer = asset.start_write("build/test/foo.mxf", {}, dcp::SoundAsset::AtmosSync::ENABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto writer = asset.start_write("build/test/foo.mxf", {}, dcp::SoundAsset::AtmosSync::ENABLED, dcp::SMPTEFlavour::BV21);
/* Compare the sync bits made by SoundAssetWriter to the "proper" ones in the MXF */
BOOST_CHECK (ref == writer->create_sync_packets());
@@ -124,7 +124,7 @@ BOOST_AUTO_TEST_CASE (sync_test2)
asset._id = "e004046e09234f90a4ae4355e7e83506";
boost::system::error_code ec;
boost::filesystem::remove ("build/test/foo.mxf", ec);
- auto writer = asset.start_write("build/test/foo.mxf", {}, dcp::SoundAsset::AtmosSync::ENABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto writer = asset.start_write("build/test/foo.mxf", {}, dcp::SoundAsset::AtmosSync::ENABLED, dcp::SMPTEFlavour::BV21);
int const frames = 2000;
float** junk = new float*[channels];
diff --git a/test/test.cc b/test/test.cc
index d384bdfa..78099c81 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -312,7 +312,7 @@ simple_sound(boost::filesystem::path path, string suffix, dcp::MXFMetadata mxf_m
}
ms->_language = language;
ms->set_metadata (mxf_meta);
- auto sound_writer = ms->start_write(path / dcp::String::compose("audio%1.mxf", suffix), {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
+ auto sound_writer = ms->start_write(path / dcp::String::compose("audio%1.mxf", suffix), {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SMPTEFlavour::BV21);
int const samples_per_frame = sample_rate / 24;