From c871f79f49087582c6ea7a42e79fd5fd3968bf00 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 12 May 2020 12:35:07 +0200 Subject: Add a note when verifying if the DCP refers to assets that are not mentioned in its ASSETMAP (i.e. a VF). --- src/dcp.cc | 13 +++++++++++-- src/verify.cc | 2 ++ src/verify.h | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dcp.cc b/src/dcp.cc index 09db9523..2929b5d8 100644 --- a/src/dcp.cc +++ b/src/dcp.cc @@ -256,8 +256,17 @@ DCP::read (list* notes, bool ignore_incorrect_picture_mxf } } - BOOST_FOREACH (shared_ptr i, cpls ()) { - i->resolve_refs (other_assets); + resolve_refs (other_assets); + + /* While we've got the ASSETMAP lets look and see if this DCP refers to things that are not in its ASSETMAP */ + if (notes) { + BOOST_FOREACH (shared_ptr i, cpls()) { + BOOST_FOREACH (shared_ptr j, i->reel_mxfs()) { + if (!j->asset_ref().resolved() && paths.find(j->asset_ref().id()) == paths.end()) { + notes->push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::EXTERNAL_ASSET)); + } + } + } } } diff --git a/src/verify.cc b/src/verify.cc index 11eb75d2..0820c7b0 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -659,6 +659,8 @@ dcp::note_to_string (dcp::VerificationNote note) return String::compose("The instantaneous bit rate of the picture asset %1 is larger than the limit of 250Mbit/s in at least one place", note.file()->filename()); case dcp::VerificationNote::PICTURE_FRAME_NEARLY_TOO_LARGE: return String::compose("The instantaneous bit rate of the picture asset %1 is close to the limit of 250Mbit/s in at least one place", note.file()->filename()); + case dcp::VerificationNote::EXTERNAL_ASSET: + return "An asset that this DCP refers to is not included in the DCP. It may be a VF."; } return ""; diff --git a/src/verify.h b/src/verify.h index 405c6b09..87d52d44 100644 --- a/src/verify.h +++ b/src/verify.h @@ -87,6 +87,8 @@ public: PICTURE_FRAME_TOO_LARGE, /** The JPEG2000 data in at least one picture frame is larger than the equivalent of 230Mbit/s */ PICTURE_FRAME_NEARLY_TOO_LARGE, + /** An asset that the CPL requires is not in this DCP; the DCP may be a VF */ + EXTERNAL_ASSET, }; VerificationNote (Type type, Code code) -- cgit v1.2.3