2 Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 /* Test creation of a DCP from very simple inputs */
21 BOOST_AUTO_TEST_CASE (dcp_test)
23 Kumu::libdcp_test = true;
25 /* Some known metadata */
26 libdcp::XMLMetadata xml_meta;
27 xml_meta.issuer = "OpenDCP 0.0.25";
28 xml_meta.creator = "OpenDCP 0.0.25";
29 xml_meta.issue_date = "2012-07-17T04:45:18+00:00";
30 libdcp::MXFMetadata mxf_meta;
31 mxf_meta.company_name = "OpenDCP";
32 mxf_meta.product_name = "OpenDCP";
33 mxf_meta.product_version = "0.0.25";
35 /* We're making build/test/foo */
36 boost::filesystem::remove_all ("build/test/foo");
37 boost::filesystem::create_directories ("build/test/foo");
38 libdcp::DCP d ("build/test/foo");
39 shared_ptr<libdcp::CPL> cpl (new libdcp::CPL ("build/test/foo", "A Test DCP", libdcp::FEATURE, 24, 24));
41 shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset (
48 libdcp::Size (32, 32),
53 shared_ptr<libdcp::SoundAsset> ms (new libdcp::SoundAsset (
65 cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ())));
68 d.write_xml (false, xml_meta);
70 /* build/test/foo is checked against test/ref/DCP/foo by run-tests.sh */