auto crypt_cert = c->decryption_chain()->leaf();
/* Cinema A: UTC +4:30 */
- auto cinema_a = make_shared<Cinema>("Cinema A", list<string>(), "", 4, 30);
+ auto cinema_a = make_shared<Cinema>("Cinema A", vector<string>(), "", 4, 30);
cinema_a_screen_1 = std::make_shared<dcpomatic::Screen>("Screen 1", "", crypt_cert, boost::none, vector<TrustedDevice>());
cinema_a->add_screen (cinema_a_screen_1);
cinema_a_screen_2 = std::make_shared<dcpomatic::Screen>("Screen 2", "", crypt_cert, boost::none, vector<TrustedDevice>());
c->add_cinema (cinema_a);
/* Cinema B: UTC -1:00 */
- auto cinema_b = make_shared<Cinema>("Cinema B", list<string>(), "", -1, 0);
+ auto cinema_b = make_shared<Cinema>("Cinema B", vector<string>(), "", -1, 0);
cinema_b_screen_x = std::make_shared<dcpomatic::Screen>("Screen X", "", crypt_cert, boost::none, vector<TrustedDevice>());
cinema_b->add_screen (cinema_b_screen_x);
cinema_b_screen_y = std::make_shared<dcpomatic::Screen>("Screen Y", "", crypt_cert, boost::none, vector<TrustedDevice>());
std::vector<KDMCertificatePeriod> period_checks;
auto cpl = cpls.front().cpl_file;
+ std::function<dcp::DecryptedKDM (dcp::LocalTime, dcp::LocalTime)> make_kdm = [film, cpl](dcp::LocalTime begin, dcp::LocalTime end) {
+ return film->make_kdm(cpl, begin, end);
+ };
auto kdm = kdm_for_screen (
- film,
- cpls.front().cpl_file,
+ make_kdm,
cinema_a_screen_1,
boost::posix_time::time_from_string(from_string),
boost::posix_time::time_from_string(until_string),
string const from_string = from.date() + " " + from.time_of_day(true, false);
string const until_string = until.date() + " " + until.time_of_day(true, false);
- list<shared_ptr<dcpomatic::Screen>> screens = {
+ vector<shared_ptr<dcpomatic::Screen>> screens = {
cinema_a_screen_2, cinema_b_screen_x, cinema_a_screen_1, (cinema_b_screen_z)
};
std::vector<KDMCertificatePeriod> period_checks;
list<KDMWithMetadataPtr> kdms;
+
+ std::function<dcp::DecryptedKDM (dcp::LocalTime, dcp::LocalTime)> make_kdm = [film, cpls](dcp::LocalTime begin, dcp::LocalTime end) {
+ return film->make_kdm(cpls.front().cpl_file, begin, end);
+ };
+
for (auto i: screens) {
auto kdm = kdm_for_screen (
- film,
- cpls.front().cpl_file,
+ make_kdm,
i,
boost::posix_time::time_from_string(from_string),
boost::posix_time::time_from_string(until_string),