X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.cc;h=f2ec68bddd8786a9a73f6258dc8d757c8600b50b;hp=cf4835c062057fd99b278882737001e9b1d7c15c;hb=86eb90b563efb7ef093d5b17a5d6db0fc330e301;hpb=3855bfd7991b1d7411934fc564dd5714eca6bc1b diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index cf4835c06..f2ec68bdd 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -59,7 +60,6 @@ using boost::optional; DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) - : DCP (content, tolerant) { shared_ptr cpl; @@ -67,9 +67,11 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) _text_count[i] = 0; } + auto cpls = dcp::find_and_resolve_cpls (content->directories(), tolerant); + if (content->cpl ()) { /* Use the CPL that the content was using before */ - for (auto i: cpls()) { + for (auto i: cpls) { if (i->id() == content->cpl().get()) { cpl = i; } @@ -79,7 +81,7 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) int least_unsatisfied = INT_MAX; - for (auto i: cpls()) { + for (auto i: cpls) { int unsatisfied = 0; for (auto j: i->reels()) { if (j->main_picture() && !j->main_picture()->asset_ref().resolved()) { @@ -107,6 +109,10 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) throw DCPError ("No CPLs found in DCP"); } + if (content->kdm()) { + cpl->add (decrypt_kdm_with_helpful_error(content->kdm().get())); + } + _cpl = cpl->id (); _name = cpl->content_title_text (); _content_kind = cpl->content_kind ();