Add OK note when picture asset hashes are correct.
authorCarl Hetherington <cth@carlh.net>
Tue, 27 Dec 2022 21:45:33 +0000 (22:45 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 14 Apr 2024 15:21:15 +0000 (17:21 +0200)
src/verify.cc
src/verify.h

index 4893fd933609d3255f32fe4100ece973cdef67d4..3edb235ed017702adfa47dd979dbcb042570acab 100644 (file)
@@ -552,6 +552,9 @@ verify_main_picture_asset (
                                });
                                break;
                        default:
+                               notes.push_back ({
+                                       VerificationNote::Type::OK, VerificationNote::Code::CORRECT_PICTURE_HASH, file
+                               });
                                break;
                }
        }
@@ -1973,6 +1976,8 @@ dcp::note_to_string (VerificationNote note)
                return String::compose("The picture in a reel has an invalid frame rate %1.", note.note().get());
        case VerificationNote::Code::INCORRECT_PICTURE_HASH:
                return String::compose("The hash (%1) of the picture asset %2 does not agree with the PKL file (%3).", note.calculated_hash().get(), note.file()->filename(), note.reference_hash().get());
+       case VerificationNote::Code::CORRECT_PICTURE_HASH:
+               return String::compose("The picture asset %1 has the expected hashes in the CPL and PKL.", note.file()->filename());
        case VerificationNote::Code::MISMATCHED_PICTURE_HASHES:
                return String::compose("The PKL and CPL hashes differ for the picture asset %1.", note.file()->filename());
        case VerificationNote::Code::INCORRECT_SOUND_HASH:
index a55218fbc41b7f967abcc05f2a16f1b3ab47b7f5..3e6c478b204ea81c8437f7c3b4712536befdba1f 100644 (file)
@@ -111,6 +111,7 @@ public:
                 *  note contains the invalid frame rate as "<numerator>/<denominator>"
                 */
                INVALID_PICTURE_FRAME_RATE,
+               CORRECT_PICTURE_HASH,
                /** The hash of a main picture asset does not agree with the PKL file
                 *  file contains the picture asset filename
                 *  calculated_hash contains the current hash of the picture MXF