X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_kdm.cc;h=cc070b45467f8bc9c34f8d7494d92a280364cb7e;hb=1a7c50245309bb0b99001940b2203a267de942ca;hp=7920f7e5756b9994c7147fd5c45bccc1fb87cd9d;hpb=5579acd7ff7e1460f0b5bb54a4deedbd356153cd;p=dcpomatic.git diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 7920f7e57..cc070b454 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -51,10 +51,13 @@ #include #include #include +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include #include #include +DCPOMATIC_ENABLE_WARNINGS #ifdef __WXOSX__ #include #endif @@ -76,6 +79,9 @@ using boost::bind; using boost::optional; using boost::ref; using boost::dynamic_pointer_cast; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif using namespace dcpomatic; enum { @@ -334,6 +340,7 @@ private: name_values['f'] = title; name_values['b'] = begin.date() + " " + begin.time_of_day(true, false); name_values['e'] = end.date() + " " + end.time_of_day(true, false); + name_values['i'] = kdm.id(); /* Encrypt */ kdms.push_back ( @@ -381,24 +388,23 @@ private: kdm.add_key (j); } + dcp::EncryptedKDM const encrypted = kdm.encrypt( + signer, i->recipient.get(), i->trusted_device_thumbprints(), _output->formulation(), + !_output->forensic_mark_video(), _output->forensic_mark_audio() ? boost::optional() : 0 + ); + dcp::NameFormat::Map name_values; name_values['c'] = i->cinema->name; name_values['s'] = i->name; name_values['f'] = title; name_values['b'] = begin.date() + " " + begin.time_of_day(true, false); name_values['e'] = end.date() + " " + end.time_of_day(true, false); + name_values['i'] = encrypted.cpl_id (); /* Encrypt */ kdms.push_back ( KDMWithMetadataPtr( - new DCPKDMWithMetadata( - name_values, - i->cinema, - kdm.encrypt( - signer, i->recipient.get(), i->trusted_device_thumbprints(), _output->formulation(), - !_output->forensic_mark_video(), _output->forensic_mark_audio() ? boost::optional() : 0 - ) - ) + new DCPKDMWithMetadata(name_values, i->cinema.get(), i->cinema->emails, encrypted) ) ); } @@ -718,10 +724,8 @@ private: unsetenv ("UBUNTU_MENUPROXY"); #endif -#ifdef __WXOSX__ - ProcessSerialNumber serial; - GetCurrentProcess (&serial); - TransformProcessType (&serial, kProcessTransformToForegroundApplication); +#ifdef DCPOMATIC_OSX + make_foreground_application (); #endif dcpomatic_setup_path_encoding ();