X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fkdm.cc;h=c08750961e2c7c77245191e8e99f2b97daf5d875;hb=3574212ee42b2bd924eb95d5c0f4f69ec9e0a2f0;hp=00d2f053781246e9631d7785ba3739e56de46a9c;hpb=79ce26d031d109177ba4b0f637fa2960345a37a3;p=dcpomatic.git diff --git a/src/lib/kdm.cc b/src/lib/kdm.cc index 00d2f0537..c08750961 100644 --- a/src/lib/kdm.cc +++ b/src/lib/kdm.cc @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "kdm.h" #include "cinema.h" #include "exceptions.h" @@ -36,13 +36,13 @@ using boost::shared_ptr; struct ScreenKDM { - ScreenKDM (shared_ptr s, dcp::KDM k) + ScreenKDM (shared_ptr s, dcp::EncryptedKDM k) : screen (s) , kdm (k) {} shared_ptr screen; - dcp::KDM kdm; + dcp::EncryptedKDM kdm; }; static string @@ -102,17 +102,17 @@ static list make_screen_kdms ( shared_ptr film, list > screens, - boost::filesystem::path dcp, - boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::filesystem::path cpl, + dcp::LocalTime from, + dcp::LocalTime to ) { - list kdms = film->make_kdms (screens, dcp, from, to); + list kdms = film->make_kdms (screens, cpl, from, to); list screen_kdms; list >::iterator i = screens.begin (); - list::iterator j = kdms.begin (); + list::iterator j = kdms.begin (); while (i != screens.end() && j != kdms.end ()) { screen_kdms.push_back (ScreenKDM (*i, *j)); ++i; @@ -126,12 +126,12 @@ static list make_cinema_kdms ( shared_ptr film, list > screens, - boost::filesystem::path dcp, - boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::filesystem::path cpl, + dcp::LocalTime from, + dcp::LocalTime to ) { - list screen_kdms = make_screen_kdms (film, screens, dcp, from, to); + list screen_kdms = make_screen_kdms (film, screens, cpl, from, to); list cinema_kdms; while (!screen_kdms.empty ()) { @@ -164,17 +164,20 @@ make_cinema_kdms ( return cinema_kdms; } +/** @param from KDM from time in local time. + * @param to KDM to time in local time. + */ void write_kdm_files ( shared_ptr film, list > screens, - boost::filesystem::path dcp, - boost::posix_time::ptime from, - boost::posix_time::ptime to, + boost::filesystem::path cpl, + dcp::LocalTime from, + dcp::LocalTime to, boost::filesystem::path directory ) { - list screen_kdms = make_screen_kdms (film, screens, dcp, from, to); + list screen_kdms = make_screen_kdms (film, screens, cpl, from, to); /* Write KDMs to the specified directory */ for (list::iterator i = screen_kdms.begin(); i != screen_kdms.end(); ++i) { @@ -188,13 +191,13 @@ void write_kdm_zip_files ( shared_ptr film, list > screens, - boost::filesystem::path dcp, - boost::posix_time::ptime from, - boost::posix_time::ptime to, + boost::filesystem::path cpl, + dcp::LocalTime from, + dcp::LocalTime to, boost::filesystem::path directory ) { - list cinema_kdms = make_cinema_kdms (film, screens, dcp, from, to); + list cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to); for (list::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) { boost::filesystem::path path = directory; @@ -207,12 +210,12 @@ void email_kdms ( shared_ptr film, list > screens, - boost::filesystem::path dcp, - boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::filesystem::path cpl, + dcp::LocalTime from, + dcp::LocalTime to ) { - list cinema_kdms = make_cinema_kdms (film, screens, dcp, from, to); + list cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to); for (list::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) {