diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-20 21:22:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-20 21:22:52 +0100 |
| commit | d8d7ddd4c39e3ea347afd1fccc037d8b0a31bc87 (patch) | |
| tree | a9071c33d3a6e60f970e5e6c08c70a9efa142838 /src/lib/dcp_decoder.cc | |
| parent | 72ae435a9b2a554d5de7280ad51793ed6a835f42 (diff) | |
Basic support for decryption of imported DCPs.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index d0642d8b6..bf016ef87 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -31,6 +31,7 @@ #include "dcp_content.h" #include "j2k_image_proxy.h" #include "image.h" +#include "config.h" using std::list; using std::cout; @@ -46,6 +47,9 @@ DCPDecoder::DCPDecoder (shared_ptr<const DCPContent> c, shared_ptr<Log> log) { dcp::DCP dcp (c->directory ()); dcp.read (); + if (c->kdm ()) { + dcp.add (dcp::DecryptedKDM (c->kdm().get (), Config::instance()->decryption_private_key ())); + } assert (dcp.cpls().size() == 1); _reels = dcp.cpls().front()->reels (); _reel = _reels.begin (); @@ -54,7 +58,7 @@ DCPDecoder::DCPDecoder (shared_ptr<const DCPContent> c, shared_ptr<Log> log) bool DCPDecoder::pass () { - if (_reel == _reels.end ()) { + if (_reel == _reels.end () || !_dcp_content->can_be_played ()) { return true; } |
