diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-06-06 22:10:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-06-09 22:33:49 +0100 |
| commit | e6f2a4b0085b35be378f2cdd687146857d61df80 (patch) | |
| tree | 98bf0fe5057db49e1e58afc7769305264073b271 /src/tools | |
| parent | 951d70db4f81b5ddd4093f11853637c8ecbe63c5 (diff) | |
swaroop: support validity periods in ecinema KDMs.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_ecinema.cc | 2 | ||||
| -rw-r--r-- | src/tools/dcpomatic_kdm.cc | 8 | ||||
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 9 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/tools/dcpomatic_ecinema.cc b/src/tools/dcpomatic_ecinema.cc index 740893fa9..719f7d4dd 100644 --- a/src/tools/dcpomatic_ecinema.cc +++ b/src/tools/dcpomatic_ecinema.cc @@ -210,7 +210,7 @@ main (int argc, char* argv[]) avformat_free_context (input_fc); avformat_free_context (output_fc); - DecryptedECinemaKDM decrypted_kdm (id, output_file.filename().string(), key); + DecryptedECinemaKDM decrypted_kdm (id, output_file.filename().string(), key, optional<dcp::LocalTime>(), optional<dcp::LocalTime>()); EncryptedECinemaKDM encrypted_kdm = decrypted_kdm.encrypt (Config::instance()->decryption_chain()->leaf()); cout << encrypted_kdm.as_xml() << "\n"; } diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 9f1c28c99..ef6b783f4 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -318,7 +318,13 @@ private: continue; } - DecryptedECinemaKDM kdm (decrypted.id(), decrypted.name(), decrypted.key()); + DecryptedECinemaKDM kdm ( + decrypted.id(), + decrypted.name(), + decrypted.key(), + dcp::LocalTime (_timing->from(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()), + dcp::LocalTime (_timing->until(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()) + ); /* Encrypt */ screen_kdms.push_back ( diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 6a64bd0de..90cc818ca 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -287,6 +287,15 @@ public: } } +#ifdef DCPOMATIC_VARIANT_SWAROOP + BOOST_FOREACH (shared_ptr<Content> i, _film->content()) { + shared_ptr<FFmpegContent> c = dynamic_pointer_cast<FFmpegContent>(i); + if (c && !c->kdm_timing_window_valid()) { + ok = false; + } + } +#endif + if (!ok) { error_dialog (this, _("The KDM does not allow playback of this content at this time.")); } |
