X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fdcp_test.cc;h=f70c6ce88ec4686040d42e277a8b067f3a5a103d;hb=81450a3f659c466ba178a1173fbd79465f3060d5;hp=9699eeb278ea981aaaeec84baddf53bd7aab2ae8;hpb=ac08ad9d8e10aa1c8e13645ea83438376329d678;p=libdcp.git diff --git a/test/dcp_test.cc b/test/dcp_test.cc index 9699eeb2..f70c6ce8 100644 --- a/test/dcp_test.cc +++ b/test/dcp_test.cc @@ -17,6 +17,18 @@ */ +#include +#include "dcp.h" +#include "metadata.h" +#include "cpl.h" +#include "mono_picture_asset.h" +#include "sound_asset.h" +#include "reel.h" +#include "test.h" +#include "KM_util.h" + +using boost::shared_ptr; + /* Test creation of a DCP from very simple inputs */ BOOST_AUTO_TEST_CASE (dcp_test) { @@ -38,34 +50,28 @@ BOOST_AUTO_TEST_CASE (dcp_test) libdcp::DCP d ("build/test/foo"); shared_ptr cpl (new libdcp::CPL ("build/test/foo", "A Test DCP", libdcp::FEATURE, 24, 24)); - shared_ptr mp (new libdcp::MonoPictureAsset ( - j2c, - "build/test/foo", - "video.mxf", - &d.Progress, - 24, - 24, - false, - libdcp::Size (32, 32), - mxf_meta - )); + shared_ptr mp (new libdcp::MonoPictureAsset ("build/test/foo", "video.mxf")); + mp->set_progress (&d.Progress); + mp->set_edit_rate (24); + mp->set_intrinsic_duration (24); + mp->set_duration (24); + mp->set_size (libdcp::Size (32, 32)); + mp->set_metadata (mxf_meta); + mp->create (j2c); - shared_ptr ms (new libdcp::SoundAsset ( - wav, - "build/test/foo", - "audio.mxf", - &(d.Progress), - 24, - 24, - 2, - false, - mxf_meta - )); + shared_ptr ms (new libdcp::SoundAsset ("build/test/foo", "audio.mxf")); + ms->set_progress (&d.Progress); + ms->set_edit_rate (24); + ms->set_intrinsic_duration (24); + ms->set_duration (24); + ms->set_channels (2); + ms->set_metadata (mxf_meta); + ms->create (wav); cpl->add_reel (shared_ptr (new libdcp::Reel (mp, ms, shared_ptr ()))); d.add_cpl (cpl); - d.write_xml (xml_meta); + d.write_xml (false, xml_meta); /* build/test/foo is checked against test/ref/DCP/foo by run-tests.sh */ }