From fe938d4dd52ab41be4cdd441d5d4289deae6190d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 31 Mar 2026 22:28:41 +0200 Subject: INVALID_MAIN_SOUND_CONFIGURATION: note -> error. --- src/cpl.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cpl.cc') diff --git a/src/cpl.cc b/src/cpl.cc index 27481939..0bc333c2 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -328,9 +328,8 @@ CPL::read_composition_metadata_asset(cxml::ConstNodePtr node, vectorpush_back( dcp::VerificationNote( dcp::VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION, - fmt::format("{} could not be parsed", _main_sound_configuration->as_string()), *_file - ).set_cpl_id(_id) + ).set_cpl_id(_id).set_error(fmt::format("{} could not be parsed", _main_sound_configuration->as_string())) ); } } -- cgit v1.2.3 From 7c9d62fc64ca6d66a34063d2d01988d800b770c8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 31 Mar 2026 23:38:46 +0200 Subject: INVALID_{CPL,PKL}_NAMESPACE: note -> xml_namespace. --- src/cpl.cc | 6 +----- src/pkl.cc | 6 +----- src/verify.cc | 4 ++-- src/verify.h | 4 ++-- 4 files changed, 6 insertions(+), 14 deletions(-) (limited to 'src/cpl.cc') diff --git a/src/cpl.cc b/src/cpl.cc index 0bc333c2..6ef529c7 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -127,11 +127,7 @@ CPL::CPL(boost::filesystem::path file, vector* notes) } else { if (notes) { notes->push_back( - dcp::VerificationNote( - dcp::VerificationNote::Code::INVALID_CPL_NAMESPACE, - f.namespace_uri(), - file - ) + dcp::VerificationNote(dcp::VerificationNote::Code::INVALID_CPL_NAMESPACE, file).set_xml_namespace(f.namespace_uri()) ); } _standard = Standard::INTEROP; diff --git a/src/pkl.cc b/src/pkl.cc index 3b154316..0e36dbe6 100644 --- a/src/pkl.cc +++ b/src/pkl.cc @@ -80,11 +80,7 @@ PKL::PKL(boost::filesystem::path file, vector* notes) _standard = Standard::SMPTE; if (notes) { notes->push_back( - dcp::VerificationNote( - dcp::VerificationNote::Code::INVALID_PKL_NAMESPACE, - pkl.namespace_uri(), - file - ) + dcp::VerificationNote(dcp::VerificationNote::Code::INVALID_PKL_NAMESPACE, file).set_xml_namespace(pkl.namespace_uri()) ); } } else { diff --git a/src/verify.cc b/src/verify.cc index 08b85d3d..40087346 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -2211,11 +2211,11 @@ dcp::note_to_string(VerificationNote note, function process_str case VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT: return compose("CPL has valid %1", *note.content_version()); case VerificationNote::Code::INVALID_CPL_NAMESPACE: - return compose("The namespace %1 in CPL %2 is invalid", note.note().get(), note.cpl_id().get()); + return compose("The namespace %1 in CPL %2 is invalid", *note.xml_namespace(), note.cpl_id().get()); case VerificationNote::Code::MISSING_CPL_CONTENT_VERSION: return compose("The CPL %1 has no tag", note.cpl_id().get()); case VerificationNote::Code::INVALID_PKL_NAMESPACE: - return compose("The namespace %1 in PKL %2 is invalid", note.note().get(), note.file()->filename()); + return compose("The namespace %1 in PKL %2 is invalid", *note.xml_namespace(), note.file()->filename()); } return ""; diff --git a/src/verify.h b/src/verify.h index 96945ca3..5f678bae 100644 --- a/src/verify.h +++ b/src/verify.h @@ -584,7 +584,7 @@ public: */ VALID_CONTENT_VERSION_LABEL_TEXT, /** The CPL namespace is not valid - * note contains the invalid namespace + * xml_namespace contains the invalid namespace * file contains the CPL filename */ INVALID_CPL_NAMESPACE, @@ -593,7 +593,7 @@ public: */ MISSING_CPL_CONTENT_VERSION, /** The PKL namespace is not valid - * note contains the invalid namespace + * xml_namespace contains the invalid namespace * file contains the PKL filename */ INVALID_PKL_NAMESPACE, -- cgit v1.2.3 From a0814a2e44e56d0378c6a47ca9c741de5cfe6356 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 1 Apr 2026 00:27:34 +0200 Subject: Remove VerificationNote::note. --- src/cpl.cc | 8 ++------ src/verify.cc | 8 -------- src/verify.h | 26 -------------------------- test/verify_test.cc | 11 +---------- 4 files changed, 3 insertions(+), 50 deletions(-) (limited to 'src/cpl.cc') diff --git a/src/cpl.cc b/src/cpl.cc index 6ef529c7..cac3c2eb 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -155,12 +155,8 @@ CPL::CPL(boost::filesystem::path file, vector* notes) /* ContentVersion is required in SMPTE */ if (notes) { notes->push_back( - dcp::VerificationNote( - dcp::VerificationNote::Code::MISSING_CPL_CONTENT_VERSION, - _id, - file - ) - ); + dcp::VerificationNote(dcp::VerificationNote::Code::MISSING_CPL_CONTENT_VERSION, file).set_cpl_id(_id) + ); } } auto rating_list = f.node_child("RatingList"); diff --git a/src/verify.cc b/src/verify.cc index 40087346..ac12800b 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -2361,7 +2361,6 @@ dcp::operator== (dcp::VerificationNote const& a, dcp::VerificationNote const& b) { return a.type() == b.type() && a.code() == b.code() && - a.note() == b.note() && a.file() == b.file() && a.line() == b.line() && a.frame() == b.frame() && @@ -2469,10 +2468,6 @@ dcp::operator< (dcp::VerificationNote const& a, dcp::VerificationNote const& b) return a.code() < b.code(); } - if (a.note() != b.note()) { - return less_than_optional(a.note(), b.note()); - } - if (a.file() != b.file()) { return less_than_optional(a.file(), b.file()); } @@ -2621,9 +2616,6 @@ std::ostream& dcp::operator<< (std::ostream& s, dcp::VerificationNote const& note) { s << note_to_string (note); - if (note.note()) { - s << " [" << note.note().get() << "]"; - } if (note.file()) { s << " [" << note.file().get() << "]"; } diff --git a/src/verify.h b/src/verify.h index 44bb94a6..cb9801ef 100644 --- a/src/verify.h +++ b/src/verify.h @@ -603,25 +603,12 @@ public: : _code(code) {} - VerificationNote(Code code, std::string note) - : _code(code) - { - _data[Data::NOTE] = note; - } - VerificationNote(Code code, boost::filesystem::path file) : _code(code) { _data[Data::FILE] = file; } - VerificationNote(Code code, std::string note, boost::filesystem::path file) - : _code(code) - { - _data[Data::NOTE] = note; - _data[Data::FILE] = file; - } - VerificationNote(Code code, boost::filesystem::path file, uint64_t line) : _code (code) { @@ -629,14 +616,6 @@ public: _data[Data::LINE] = line; } - VerificationNote(Code code, std::string note, boost::filesystem::path file, uint64_t line) - : _code (code) - { - _data[Data::NOTE] = note; - _data[Data::FILE] = file; - _data[Data::LINE] = line; - } - Type type() const; Code code () const { @@ -668,7 +647,6 @@ private: LINE, ///< error line number within the FILE LOAD_FONT_ID, MAIN_PICTURE_ACTIVE_AREA, - NOTE, ///< further information about the error OTHER_ASSET_ID, OTHER_DURATION, PKL_ID, @@ -695,10 +673,6 @@ private: } public: - boost::optional note () const { - return data(Data::NOTE); - } - boost::optional file () const { return data(Data::FILE); } diff --git a/test/verify_test.cc b/test/verify_test.cc index 7f32c438..e3cff85a 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -242,10 +242,9 @@ string to_string(dcp::VerificationNote const& note) { string s = note_to_string(note) + dcp::String::compose( - "\n [%1 %2 %3 %4 %5 %6 %7 ", + "\n [%1 %2 %3 %4 %5 %6 ", static_cast(note.type()), static_cast(note.code()), - note.note().get_value_or(""), note.file().get_value_or(""), note.line().get_value_or(0), note.frame().get_value_or(0), @@ -418,14 +417,6 @@ note(dcp::VerificationNote::Code code, shared_ptr cpl) } -static -dcp::VerificationNote -note(dcp::VerificationNote::Code code, string note, shared_ptr cpl) -{ - return dcp::VerificationNote(code, note).set_cpl_id(cpl->id()); -} - - static dcp::VerificationNote note(dcp::VerificationNote::Code code, boost::filesystem::path path, shared_ptr cpl) -- cgit v1.2.3