diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-04-17 22:19:02 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-17 22:19:02 +0200 |
| commit | 869462070671b273ac528e075ac1c00a417cc8a0 (patch) | |
| tree | c6a98899ff9a7f86ab061730a5fdc9b52d787a2c /src/cpl.cc | |
| parent | 0a8f2a1a2058f0461a7f978295e31af34a03bb40 (diff) | |
Make some not-so-important CPL read errors non-fatal (DoM #2797).v1.8.99
Diffstat (limited to 'src/cpl.cc')
| -rw-r--r-- | src/cpl.cc | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -104,7 +104,7 @@ CPL::CPL (string annotation_text, ContentKind content_kind, Standard standard) } -CPL::CPL (boost::filesystem::path file) +CPL::CPL (boost::filesystem::path file, vector<dcp::VerificationNote>* notes) : Asset (file) , _content_kind (ContentKind::FEATURE) { @@ -116,7 +116,17 @@ CPL::CPL (boost::filesystem::path file) } else if (f.namespace_uri() == cpl_smpte_ns) { _standard = Standard::SMPTE; } else { - boost::throw_exception (XMLError ("Unrecognised CPL namespace " + f.namespace_uri())); + if (notes) { + notes->push_back( + dcp::VerificationNote( + dcp::VerificationNote::Type::ERROR, + dcp::VerificationNote::Code::INVALID_CPL_NAMESPACE, + f.namespace_uri(), + file + ) + ); + } + _standard = Standard::INTEROP; } _id = remove_urn_uuid (f.string_child ("Id")); @@ -139,7 +149,16 @@ CPL::CPL (boost::filesystem::path file) content_version->done (); } else if (_standard == Standard::SMPTE) { /* ContentVersion is required in SMPTE */ - throw XMLError ("Missing ContentVersion tag in CPL"); + if (notes) { + notes->push_back( + dcp::VerificationNote( + dcp::VerificationNote::Type::ERROR, + dcp::VerificationNote::Code::MISSING_CPL_CONTENT_VERSION, + _id, + file + ) + ); + } } auto rating_list = f.node_child ("RatingList"); for (auto i: rating_list->node_children("Rating")) { |
