Use an enum instead of a bool in PictureAsset::start_write().
[libdcp.git] / test / encryption_test.cc
index 93cea8dc396272b297e5c442163c269b33e9ec73..f2a4084322d64ba77f48e7c47dd19db3cc3b3817 100644 (file)
@@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
        mp->set_metadata (mxf_metadata);
        mp->set_key (key);
 
-       auto writer = mp->start_write ("build/test/DCP/encryption_test/video.mxf", false);
+       auto writer = mp->start_write("build/test/DCP/encryption_test/video.mxf", dcp::PictureAsset::Behaviour::MAKE_NEW);
        dcp::ArrayData j2c ("test/data/flat_red.j2c");
        for (int i = 0; i < 24; ++i) {
                writer->write (j2c.data (), j2c.size ());
@@ -103,7 +103,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");
+       auto sound_writer = ms->start_write("build/test/DCP/encryption_test/audio.mxf", {}, dcp::SoundAsset::AtmosSync::DISABLED, dcp::SoundAsset::MCASubDescriptors::ENABLED);
 
        SF_INFO info;
        info.format = 0;
@@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
        channels[0] = buffer;
        while (true) {
                auto N = sf_readf_float (sndfile, buffer, 4096);
-               sound_writer->write (channels, N);
+               sound_writer->write(channels, 1, N);
                if (N < 4096) {
                        break;
                }