diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 11 | ||||
| -rw-r--r-- | src/verify.h | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/verify.cc b/src/verify.cc index a8c5001c..66cd25e4 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -448,9 +448,12 @@ dcp::verify ( validate_xml (pkl->file().get(), xsd_dtd_directory, notes); } - stage ("Checking ASSETMAP", dcp->asset_map_path().get()); - validate_xml (dcp->asset_map_path().get(), xsd_dtd_directory, notes); - + if (dcp->asset_map_path()) { + stage ("Checking ASSETMAP", dcp->asset_map_path().get()); + validate_xml (dcp->asset_map_path().get(), xsd_dtd_directory, notes); + } else { + notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::MISSING_ASSETMAP)); + } } return notes; @@ -482,6 +485,8 @@ dcp::note_to_string (dcp::VerificationNote note) return "The DCP contains both SMPTE and Interop parts."; case dcp::VerificationNote::XML_VALIDATION_ERROR: return String::compose("An XML file is badly formed: %1 (%2:%3)", note.note().get(), note.file()->filename(), note.line().get()); + case dcp::VerificationNote::MISSING_ASSETMAP: + return "No ASSETMAP or ASSETMAP.xml was found"; case dcp::VerificationNote::INTRINSIC_DURATION_TOO_SMALL: return String::compose("The intrinsic duration of an asset is less than 1 second long: %1", note.note().get()); case dcp::VerificationNote::DURATION_TOO_SMALL: diff --git a/src/verify.h b/src/verify.h index c56cfb9d..38c9ee75 100644 --- a/src/verify.h +++ b/src/verify.h @@ -77,6 +77,8 @@ public: MISMATCHED_STANDARD, /** Some XML fails to validate against the XSD/DTD */ XML_VALIDATION_ERROR, + /** No ASSETMAP{.xml} was found */ + MISSING_ASSETMAP /** An asset's IntrinsicDuration is less than 1 second */ INTRINSIC_DURATION_TOO_SMALL, /** An asset's Duration is less than 1 second */ |
