#include "reel.h"
#include "reel_subtitle_asset.h"
#include "test.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/test/unit_test.hpp>
using std::list;
using std::string;
using std::vector;
-using boost::shared_ptr;
+using std::shared_ptr;
BOOST_AUTO_TEST_CASE (cpl_metadata_bad_values_test)
dcp::MainSoundConfiguration msc("51/L,R,C,LFE,-,-");
BOOST_CHECK_EQUAL (msc.to_string(), "51/L,R,C,LFE,-,-");
BOOST_CHECK_EQUAL (msc.channels(), 6);
- BOOST_CHECK_EQUAL (msc.field(), dcp::MainSoundConfiguration::FIVE_POINT_ONE);
+ BOOST_CHECK_EQUAL (msc.field(), dcp::FIVE_POINT_ONE);
BOOST_CHECK_EQUAL (msc.mapping(0).get(), dcp::LEFT);
BOOST_CHECK_EQUAL (msc.mapping(1).get(), dcp::RIGHT);
BOOST_CHECK_EQUAL (msc.mapping(2).get(), dcp::CENTRE);
dcp::MainSoundConfiguration msc("71/L,R,C,LFE,-,-");
BOOST_CHECK_EQUAL (msc.to_string(), "71/L,R,C,LFE,-,-");
BOOST_CHECK_EQUAL (msc.channels(), 6);
- BOOST_CHECK_EQUAL (msc.field(), dcp::MainSoundConfiguration::SEVEN_POINT_ONE);
+ BOOST_CHECK_EQUAL (msc.field(), dcp::SEVEN_POINT_ONE);
BOOST_CHECK_EQUAL (msc.mapping(0).get(), dcp::LEFT);
BOOST_CHECK_EQUAL (msc.mapping(1).get(), dcp::RIGHT);
BOOST_CHECK_EQUAL (msc.mapping(2).get(), dcp::CENTRE);
dcp::MainSoundConfiguration msc("71/L,-,C,LFE,Lss,Rss");
BOOST_CHECK_EQUAL (msc.to_string(), "71/L,-,C,LFE,Lss,Rss");
BOOST_CHECK_EQUAL (msc.channels(), 6);
- BOOST_CHECK_EQUAL (msc.field(), dcp::MainSoundConfiguration::SEVEN_POINT_ONE);
+ BOOST_CHECK_EQUAL (msc.field(), dcp::SEVEN_POINT_ONE);
BOOST_CHECK_EQUAL (msc.mapping(0).get(), dcp::LEFT);
BOOST_CHECK (!msc.mapping(1));
BOOST_CHECK_EQUAL (msc.mapping(2).get(), dcp::CENTRE);
dcp::MainSoundConfiguration msc("71/L,-,C,LFE,Lss,Rss,-,-,-,-,-,-,-,-,-");
BOOST_CHECK_EQUAL (msc.to_string(), "71/L,-,C,LFE,Lss,Rss,-,-,-,-,-,-,-,-,-");
BOOST_CHECK_EQUAL (msc.channels(), 15);
- BOOST_CHECK_EQUAL (msc.field(), dcp::MainSoundConfiguration::SEVEN_POINT_ONE);
+ BOOST_CHECK_EQUAL (msc.field(), dcp::SEVEN_POINT_ONE);
BOOST_CHECK_EQUAL (msc.mapping(0).get(), dcp::LEFT);
BOOST_CHECK (!msc.mapping(1));
BOOST_CHECK_EQUAL (msc.mapping(2).get(), dcp::CENTRE);
BOOST_AUTO_TEST_CASE (main_sound_configuration_test5)
{
- dcp::MainSoundConfiguration msc("71/L,-,C,LFE,Lss,Rss,HI,VIN,-,-,Lrs,Rrs,DBOX,Sync,Sign");
- BOOST_CHECK_EQUAL (msc.to_string(), "71/L,-,C,LFE,Lss,Rss,HI,VIN,-,-,Lrs,Rrs,DBOX,Sync,Sign");
+ dcp::MainSoundConfiguration msc("71/L,-,C,LFE,Lss,Rss,HI,VIN,-,-,Lrs,Rrs,DBOX,FSKSync,SLVS");
+ BOOST_CHECK_EQUAL (msc.to_string(), "71/L,-,C,LFE,Lss,Rss,HI,VIN,-,-,Lrs,Rrs,DBOX,FSKSync,SLVS");
BOOST_CHECK_EQUAL (msc.channels(), 15);
- BOOST_CHECK_EQUAL (msc.field(), dcp::MainSoundConfiguration::SEVEN_POINT_ONE);
+ BOOST_CHECK_EQUAL (msc.field(), dcp::SEVEN_POINT_ONE);
BOOST_CHECK_EQUAL (msc.mapping(0).get(), dcp::LEFT);
BOOST_CHECK (!msc.mapping(1));
BOOST_CHECK_EQUAL (msc.mapping(2).get(), dcp::CENTRE);
BOOST_CHECK (cpl.main_picture_stored_area().get() == dcp::Size(1998, 1080));
BOOST_CHECK (cpl.main_picture_active_area().get() == dcp::Size(1440, 1080));
- list<shared_ptr<dcp::Reel> > reels = cpl.reels ();
+ auto reels = cpl.reels ();
BOOST_REQUIRE_EQUAL (reels.size(), 1);
- BOOST_CHECK_EQUAL (reels.front()->main_subtitle()->language().get(), dcp::LanguageTag("de-DE"));
+ BOOST_REQUIRE (reels.front()->main_subtitle()->language());
+ BOOST_CHECK_EQUAL (reels.front()->main_subtitle()->language().get(), "de-DE");
vector<string> asl = cpl.additional_subtitle_languages();
BOOST_REQUIRE_EQUAL (asl.size(), 2);
cpl.set_distributor ("the-distributor");
cpl.set_facility ("the-facility");
cpl.set_luminance (dcp::Luminance(4.5, dcp::Luminance::FOOT_LAMBERT));
+ cpl.set_issuer ("libdcp1.6.4devel");
+ cpl.set_creator ("libdcp1.6.4devel");
- dcp::MainSoundConfiguration msc(dcp::MainSoundConfiguration::SEVEN_POINT_ONE, 16);
+ dcp::MainSoundConfiguration msc(dcp::SEVEN_POINT_ONE, 16);
msc.set_mapping (0, dcp::LEFT);
msc.set_mapping (1, dcp::RIGHT);
msc.set_mapping (2, dcp::CENTRE);
check_xml (
dcp::file_to_string("test/ref/cpl_metadata_test1.xml"),
dcp::file_to_string("build/test/cpl_metadata_write_test1.xml"),
- list<string>()
+ vector<string>()
);
}
{
dcp::CPL cpl ("test/ref/cpl_metadata_test1.xml");
cpl.write_xml ("build/test/cpl_metadata_roundtrip_test1.xml", dcp::SMPTE, shared_ptr<dcp::CertificateChain>());
- list<string> ignore;
+ vector<string> ignore;
ignore.push_back ("Id");
check_xml (
dcp::file_to_string("test/ref/cpl_metadata_test1.xml"),
dcp::CPL cpl("", dcp::FEATURE);
cpl.set_issue_date ("2020-08-28T13:35:06+02:00");
cpl.set_content_version (dcp::ContentVersion("id", "version"));
+ cpl.set_issuer ("libdcp1.6.4devel");
+ cpl.set_creator ("libdcp1.6.4devel");
- dcp::MainSoundConfiguration msc(dcp::MainSoundConfiguration::SEVEN_POINT_ONE, 16);
+ dcp::MainSoundConfiguration msc(dcp::SEVEN_POINT_ONE, 16);
msc.set_mapping (0, dcp::LEFT);
msc.set_mapping (1, dcp::RIGHT);
msc.set_mapping (2, dcp::CENTRE);
check_xml (
dcp::file_to_string("test/ref/cpl_metadata_test2.xml"),
dcp::file_to_string("build/test/cpl_metadata_write_test2.xml"),
- list<string>()
+ vector<string>()
);
}
BOOST_CHECK (cpl.main_picture_stored_area().get() == dcp::Size(1998, 1080));
BOOST_CHECK (cpl.main_picture_active_area().get() == dcp::Size(1440, 1080));
- list<shared_ptr<dcp::Reel> > reels = cpl.reels ();
+ auto reels = cpl.reels ();
BOOST_REQUIRE_EQUAL (reels.size(), 1);
}
{
dcp::CPL cpl ("test/ref/cpl_metadata_test2.xml");
cpl.write_xml ("build/test/cpl_metadata_roundtrip_test2.xml", dcp::SMPTE, shared_ptr<dcp::CertificateChain>());
- list<string> ignore;
+ vector<string> ignore;
ignore.push_back ("Id");
check_xml (
dcp::file_to_string("test/ref/cpl_metadata_test2.xml"),