#include "dcp.h"
#include "certificate_chain.h"
#include "cpl.h"
-#include "mono_picture_asset.h"
-#include "picture_asset_writer.h"
+#include "filesystem.h"
+#include "mono_j2k_picture_asset.h"
+#include "j2k_picture_asset_writer.h"
#include "sound_asset_writer.h"
#include "sound_asset.h"
#include "reel.h"
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 ());
kdm.encrypt (signer, signer->leaf(), vector<string>(), dcp::Formulation::MODIFIED_TRANSITIONAL_1, true, 0).as_xml("build/test/encryption_test.kdm.xml");
+ /* Make sure we aren't in a UNC current working directory otherwise the use of cmd.exe
+ * in system() below will fail.
+ */
+ boost::filesystem::current_path(dcp::filesystem::unfix_long_path(boost::filesystem::current_path()));
+
int r = system (
"xmllint --path schema --nonet --noout --schema schema/SMPTE-430-1-2006-Amd-1-2009-KDM.xsd build/test/encryption_test.kdm.xml "
#ifndef LIBDCP_WINDOWS