Cleanup: tidy enum names for verification codes.
authorCarl Hetherington <cth@carlh.net>
Tue, 19 Jan 2021 00:27:23 +0000 (01:27 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 19 Jan 2021 00:27:23 +0000 (01:27 +0100)
src/verify.cc
src/verify.h
test/combine_test.cc
test/verify_test.cc
tools/dcpverify.cc

index 5644d36998c69d2eb5acbe7f6367dee08d49e764..0567fccde0f4647b44ab11c88c98fa79cb38e430 100644 (file)
@@ -346,7 +346,7 @@ validate_xml (T xml, boost::filesystem::path xsd_dtd_directory, vector<Verificat
                notes.push_back (
                        VerificationNote(
                                VerificationNote::VERIFY_ERROR,
-                               VerificationNote::XML_VALIDATION_ERROR,
+                               VerificationNote::INVALID_XML,
                                i.message(),
                                boost::trim_copy(i.public_id() + " " + i.system_id()),
                                i.line()
@@ -403,7 +403,7 @@ verify_language_tag (string tag, vector<VerificationNote>& notes)
        try {
                dcp::LanguageTag test (tag);
        } catch (dcp::LanguageTagError &) {
-               notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::BAD_LANGUAGE, tag));
+               notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_LANGUAGE, tag));
        }
 }
 
@@ -489,14 +489,14 @@ verify_main_picture_asset (
                case VERIFY_ASSET_RESULT_BAD:
                        notes.push_back (
                                VerificationNote(
-                                       VerificationNote::VERIFY_ERROR, VerificationNote::PICTURE_HASH_INCORRECT, file
+                                       VerificationNote::VERIFY_ERROR, VerificationNote::INCORRECT_PICTURE_HASH, file
                                        )
                                );
                        break;
                case VERIFY_ASSET_RESULT_CPL_PKL_DIFFER:
                        notes.push_back (
                                VerificationNote(
-                                       VerificationNote::VERIFY_ERROR, VerificationNote::PKL_CPL_PICTURE_HASHES_DIFFER, file
+                                       VerificationNote::VERIFY_ERROR, VerificationNote::MISMATCHED_PICTURE_HASHES, file
                                        )
                                );
                        break;
@@ -509,14 +509,14 @@ verify_main_picture_asset (
                case VERIFY_PICTURE_ASSET_RESULT_BAD:
                        notes.push_back (
                                VerificationNote(
-                                       VerificationNote::VERIFY_ERROR, VerificationNote::PICTURE_FRAME_TOO_LARGE_IN_BYTES, file
+                                       VerificationNote::VERIFY_ERROR, VerificationNote::INVALID_PICTURE_FRAME_SIZE_IN_BYTES, file
                                        )
                                );
                        break;
                case VERIFY_PICTURE_ASSET_RESULT_FRAME_NEARLY_TOO_LARGE:
                        notes.push_back (
                                VerificationNote(
-                                       VerificationNote::VERIFY_WARNING, VerificationNote::PICTURE_FRAME_NEARLY_TOO_LARGE_IN_BYTES, file
+                                       VerificationNote::VERIFY_WARNING, VerificationNote::NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES, file
                                        )
                                );
                        break;
@@ -533,7 +533,7 @@ verify_main_picture_asset (
                notes.push_back(
                        VerificationNote(
                                VerificationNote::VERIFY_BV21_ERROR,
-                               VerificationNote::PICTURE_ASSET_INVALID_SIZE_IN_PIXELS,
+                               VerificationNote::INVALID_PICTURE_SIZE_IN_PIXELS,
                                String::compose("%1x%2", asset->size().width, asset->size().height),
                                file
                                )
@@ -548,7 +548,7 @@ verify_main_picture_asset (
                notes.push_back(
                        VerificationNote(
                                VerificationNote::VERIFY_BV21_ERROR,
-                               VerificationNote::PICTURE_ASSET_INVALID_FRAME_RATE_FOR_2K,
+                               VerificationNote::INVALID_PICTURE_FRAME_RATE_FOR_2K,
                                String::compose("%1/%2", asset->edit_rate().numerator, asset->edit_rate().denominator),
                                file
                                )
@@ -561,7 +561,7 @@ verify_main_picture_asset (
                        notes.push_back(
                                VerificationNote(
                                        VerificationNote::VERIFY_BV21_ERROR,
-                                       VerificationNote::PICTURE_ASSET_INVALID_FRAME_RATE_FOR_4K,
+                                       VerificationNote::INVALID_PICTURE_FRAME_RATE_FOR_4K,
                                        String::compose("%1/%2", asset->edit_rate().numerator, asset->edit_rate().denominator),
                                        file
                                        )
@@ -573,7 +573,7 @@ verify_main_picture_asset (
                        notes.push_back(
                                VerificationNote(
                                        VerificationNote::VERIFY_BV21_ERROR,
-                                       VerificationNote::PICTURE_ASSET_4K_3D,
+                                       VerificationNote::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D,
                                        file
                                        )
                                );
@@ -600,14 +600,14 @@ verify_main_sound_asset (
                case VERIFY_ASSET_RESULT_BAD:
                        notes.push_back (
                                VerificationNote(
-                                       VerificationNote::VERIFY_ERROR, VerificationNote::SOUND_HASH_INCORRECT, *asset->file()
+                                       VerificationNote::VERIFY_ERROR, VerificationNote::INCORRECT_SOUND_HASH, *asset->file()
                                        )
                                );
                        break;
                case VERIFY_ASSET_RESULT_CPL_PKL_DIFFER:
                        notes.push_back (
                                VerificationNote(
-                                       VerificationNote::VERIFY_ERROR, VerificationNote::PKL_CPL_SOUND_HASHES_DIFFER, *asset->file()
+                                       VerificationNote::VERIFY_ERROR, VerificationNote::MISMATCHED_SOUND_HASHES, *asset->file()
                                        )
                                );
                        break;
@@ -639,7 +639,7 @@ verify_main_subtitle_reel (shared_ptr<const ReelSubtitleAsset> reel_asset, vecto
        if (!reel_asset->entry_point()) {
                notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_SUBTITLE_ENTRY_POINT });
        } else if (reel_asset->entry_point().get()) {
-               notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::SUBTITLE_ENTRY_POINT_NON_ZERO });
+               notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INCORRECT_SUBTITLE_ENTRY_POINT });
        }
 }
 
@@ -655,7 +655,7 @@ verify_closed_caption_reel (shared_ptr<const ReelClosedCaptionAsset> reel_asset,
        if (!reel_asset->entry_point()) {
                notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_CLOSED_CAPTION_ENTRY_POINT });
        } else if (reel_asset->entry_point().get()) {
-               notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::CLOSED_CAPTION_ENTRY_POINT_NON_ZERO });
+               notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INCORRECT_CLOSED_CAPTION_ENTRY_POINT });
        }
 }
 
@@ -682,7 +682,7 @@ verify_smpte_subtitle_asset (
                } else if (state.subtitle_language != language) {
                        notes.push_back (
                                VerificationNote(
-                                       VerificationNote::VERIFY_BV21_ERROR, VerificationNote::SUBTITLE_LANGUAGES_DIFFER, *asset->file()
+                                       VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISMATCHED_SUBTITLE_LANGUAGES, *asset->file()
                                        )
                                );
                }
@@ -696,7 +696,7 @@ verify_smpte_subtitle_asset (
        if (boost::filesystem::file_size(*asset->file()) > 115 * 1024 * 1024) {
                notes.push_back (
                        VerificationNote(
-                               VerificationNote::VERIFY_BV21_ERROR, VerificationNote::TIMED_TEXT_ASSET_TOO_LARGE_IN_BYTES, *asset->file()
+                               VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_TIMED_TEXT_SIZE_IN_BYTES, *asset->file()
                                )
                        );
        }
@@ -711,7 +711,7 @@ verify_smpte_subtitle_asset (
        if (total_size > 10 * 1024 * 1024) {
                notes.push_back (
                        VerificationNote(
-                               VerificationNote::VERIFY_BV21_ERROR, VerificationNote::TIMED_TEXT_FONTS_TOO_LARGE_IN_BYTES, *asset->file()
+                               VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, *asset->file()
                                )
                        );
        }
@@ -724,7 +724,7 @@ verify_smpte_subtitle_asset (
        } else if (asset->start_time() != dcp::Time()) {
                notes.push_back (
                        VerificationNote(
-                               VerificationNote::VERIFY_BV21_ERROR, VerificationNote::SUBTITLE_START_TIME_NON_ZERO, *asset->file())
+                               VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_SUBTITLE_START_TIME, *asset->file())
                        );
        }
 }
@@ -766,7 +766,7 @@ verify_closed_caption_asset (
        if (asset->raw_xml().size() > 256 * 1024) {
                notes.push_back (
                        VerificationNote(
-                               VerificationNote::VERIFY_BV21_ERROR, VerificationNote::CLOSED_CAPTION_XML_TOO_LARGE_IN_BYTES, *asset->file()
+                               VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, *asset->file()
                                )
                        );
        }
@@ -838,7 +838,7 @@ check_text_timing (
        if (too_early) {
                notes.push_back(
                        VerificationNote(
-                               VerificationNote::VERIFY_WARNING, VerificationNote::FIRST_TEXT_TOO_EARLY
+                               VerificationNote::VERIFY_WARNING, VerificationNote::INVALID_SUBTITLE_FIRST_TEXT_TIME
                                )
                        );
        }
@@ -846,7 +846,7 @@ check_text_timing (
        if (too_short) {
                notes.push_back (
                        VerificationNote(
-                               VerificationNote::VERIFY_WARNING, VerificationNote::SUBTITLE_TOO_SHORT
+                               VerificationNote::VERIFY_WARNING, VerificationNote::INVALID_SUBTITLE_DURATION
                                )
                        );
        }
@@ -854,7 +854,7 @@ check_text_timing (
        if (too_close) {
                notes.push_back (
                        VerificationNote(
-                               VerificationNote::VERIFY_WARNING, VerificationNote::SUBTITLE_TOO_CLOSE
+                               VerificationNote::VERIFY_WARNING, VerificationNote::INVALID_SUBTITLE_SPACING
                                )
                        );
        }
@@ -1114,17 +1114,17 @@ dcp::verify (
                try {
                        dcp->read (&notes);
                } catch (ReadError& e) {
-                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what())));
+                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::FAILED_READ, string(e.what())));
                } catch (XMLError& e) {
-                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what())));
+                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::FAILED_READ, string(e.what())));
                } catch (MXFFileError& e) {
-                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what())));
+                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::FAILED_READ, string(e.what())));
                } catch (cxml::Error& e) {
-                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what())));
+                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::FAILED_READ, string(e.what())));
                }
 
                if (dcp->standard() != dcp::SMPTE) {
-                       notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::NOT_SMPTE));
+                       notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_STANDARD));
                }
 
                for (auto cpl: dcp->cpls()) {
@@ -1147,7 +1147,7 @@ dcp::verify (
                                                LanguageTag::RegionSubtag test (terr);
                                        } catch (...) {
                                                if (terr != "001") {
-                                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::BAD_LANGUAGE, terr});
+                                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_LANGUAGE, terr});
                                                }
                                        }
                                }
@@ -1155,9 +1155,9 @@ dcp::verify (
 
                        if (dcp->standard() == dcp::SMPTE) {
                                if (!cpl->annotation_text()) {
-                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_ANNOTATION_TEXT_IN_CPL));
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_CPL_ANNOTATION_TEXT));
                                } else if (cpl->annotation_text().get() != cpl->content_title_text()) {
-                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::CPL_ANNOTATION_TEXT_DIFFERS_FROM_CONTENT_TITLE_TEXT));
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::MISMATCHED_CPL_ANNOTATION_TEXT));
                                }
                        }
 
@@ -1165,7 +1165,7 @@ dcp::verify (
                                /* Check that the CPL's hash corresponds to the PKL */
                                optional<string> h = i->hash(cpl->id());
                                if (h && make_digest(ArrayData(*cpl->file())) != *h) {
-                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::CPL_HASH_INCORRECT));
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::MISMATCHED_CPL_HASHES));
                                }
 
                                /* Check that any PKL with a single CPL has its AnnotationText the same as the CPL's ContentTitleText */
@@ -1186,7 +1186,7 @@ dcp::verify (
                                }
 
                                if (required_annotation_text && i->annotation_text() != required_annotation_text) {
-                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::PKL_ANNOTATION_TEXT_DOES_NOT_MATCH_CPL_CONTENT_TITLE_TEXT, i->file().get()});
+                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT, i->file().get()});
                                }
                        }
 
@@ -1205,10 +1205,10 @@ dcp::verify (
 
                                for (auto i: reel->assets()) {
                                        if (i->duration() && (i->duration().get() * i->edit_rate().denominator / i->edit_rate().numerator) < 1) {
-                                               notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::DURATION_TOO_SMALL, i->id()));
+                                               notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::INVALID_DURATION, i->id()));
                                        }
                                        if ((i->intrinsic_duration() * i->edit_rate().denominator / i->edit_rate().numerator) < 1) {
-                                               notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::INTRINSIC_DURATION_TOO_SMALL, i->id()));
+                                               notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::INVALID_INTRINSIC_DURATION, i->id()));
                                        }
                                        auto mxf = dynamic_pointer_cast<ReelMXF>(i);
                                        if (mxf && !mxf->hash()) {
@@ -1281,11 +1281,11 @@ dcp::verify (
                        if (dcp->standard() == dcp::SMPTE) {
 
                                if (have_main_subtitle && have_no_main_subtitle) {
-                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MAIN_SUBTITLE_NOT_IN_ALL_REELS});
+                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_MAIN_SUBTITLE_FROM_SOME_REELS});
                                }
 
                                if (fewest_closed_captions != most_closed_captions) {
-                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::CLOSED_CAPTION_ASSET_COUNTS_DIFFER});
+                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISMATCHED_CLOSED_CAPTION_ASSET_COUNTS});
                                }
 
                                if (cpl->content_kind() == FEATURE) {
@@ -1321,12 +1321,12 @@ dcp::verify (
                                }
 
                                if (result.line_count_exceeded) {
-                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::TOO_MANY_SUBTITLE_LINES));
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::INVALID_SUBTITLE_LINE_COUNT));
                                }
                                if (result.error_length_exceeded) {
-                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::SUBTITLE_LINE_TOO_LONG));
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::INVALID_SUBTITLE_LINE_LENGTH));
                                } else if (result.warning_length_exceeded) {
-                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::SUBTITLE_LINE_LONGER_THAN_RECOMMENDED));
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_WARNING, VerificationNote::NEARLY_INVALID_SUBTITLE_LINE_LENGTH));
                                }
 
                                result = LinesCharactersResult();
@@ -1339,10 +1339,10 @@ dcp::verify (
                                }
 
                                if (result.line_count_exceeded) {
-                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::TOO_MANY_CLOSED_CAPTION_LINES));
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_CLOSED_CAPTION_LINE_COUNT));
                                }
                                if (result.error_length_exceeded) {
-                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::CLOSED_CAPTION_LINE_TOO_LONG));
+                                       notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_CLOSED_CAPTION_LINE_LENGTH));
                                }
 
                                if (!cpl->full_content_title_text()) {
@@ -1361,7 +1361,7 @@ dcp::verify (
                                        DCP_ASSERT (cpl->file());
                                        doc.read_file (cpl->file().get());
                                        if (!doc.optional_node_child("Signature")) {
-                                               notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::CPL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED, cpl->file().get()});
+                                               notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT, cpl->file().get()});
                                        }
                                }
                        }
@@ -1374,7 +1374,7 @@ dcp::verify (
                                cxml::Document doc ("PackingList");
                                doc.read_file (pkl->file().get());
                                if (!doc.optional_node_child("Signature")) {
-                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::PKL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED, pkl->file().get()});
+                                       notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT, pkl->file().get()});
                                }
                        }
                }
@@ -1394,19 +1394,19 @@ string
 dcp::note_to_string (dcp::VerificationNote note)
 {
        switch (note.code()) {
-       case dcp::VerificationNote::GENERAL_READ:
+       case dcp::VerificationNote::FAILED_READ:
                return *note.note();
-       case dcp::VerificationNote::CPL_HASH_INCORRECT:
+       case dcp::VerificationNote::MISMATCHED_CPL_HASHES:
                return "The hash of the CPL in the PKL does not agree with the CPL file.";
        case dcp::VerificationNote::INVALID_PICTURE_FRAME_RATE:
                return "The picture in a reel has an invalid frame rate.";
-       case dcp::VerificationNote::PICTURE_HASH_INCORRECT:
+       case dcp::VerificationNote::INCORRECT_PICTURE_HASH:
                return dcp::String::compose("The hash of the picture asset %1 does not agree with the PKL file.", note.file()->filename());
-       case dcp::VerificationNote::PKL_CPL_PICTURE_HASHES_DIFFER:
+       case dcp::VerificationNote::MISMATCHED_PICTURE_HASHES:
                return dcp::String::compose("The PKL and CPL hashes differ for the picture asset %1.", note.file()->filename());
-       case dcp::VerificationNote::SOUND_HASH_INCORRECT:
+       case dcp::VerificationNote::INCORRECT_SOUND_HASH:
                return dcp::String::compose("The hash of the sound asset %1 does not agree with the PKL file.", note.file()->filename());
-       case dcp::VerificationNote::PKL_CPL_SOUND_HASHES_DIFFER:
+       case dcp::VerificationNote::MISMATCHED_SOUND_HASHES:
                return dcp::String::compose("The PKL and CPL hashes differ for the sound asset %1.", note.file()->filename());
        case dcp::VerificationNote::EMPTY_ASSET_PATH:
                return "The asset map contains an empty asset path.";
@@ -1414,81 +1414,81 @@ dcp::note_to_string (dcp::VerificationNote note)
                return String::compose("The file for an asset in the asset map cannot be found; missing file is %1.", note.file()->filename());
        case dcp::VerificationNote::MISMATCHED_STANDARD:
                return "The DCP contains both SMPTE and Interop parts.";
-       case dcp::VerificationNote::XML_VALIDATION_ERROR:
+       case dcp::VerificationNote::INVALID_XML:
                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:
+       case dcp::VerificationNote::INVALID_INTRINSIC_DURATION:
                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:
+       case dcp::VerificationNote::INVALID_DURATION:
                return String::compose("The duration of an asset is less than 1 second long: %1", note.note().get());
-       case dcp::VerificationNote::PICTURE_FRAME_TOO_LARGE_IN_BYTES:
+       case dcp::VerificationNote::INVALID_PICTURE_FRAME_SIZE_IN_BYTES:
                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_IN_BYTES:
+       case dcp::VerificationNote::NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES:
                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 String::compose("An asset that this DCP refers to is not included in the DCP.  It may be a VF.  Missing asset is %1.", note.note().get());
-       case dcp::VerificationNote::NOT_SMPTE:
+       case dcp::VerificationNote::INVALID_STANDARD:
                return "This DCP does not use the SMPTE standard, which is required for Bv2.1 compliance.";
-       case dcp::VerificationNote::BAD_LANGUAGE:
+       case dcp::VerificationNote::INVALID_LANGUAGE:
                return String::compose("The DCP specifies a language '%1' which does not conform to the RFC 5646 standard.", note.note().get());
-       case dcp::VerificationNote::PICTURE_ASSET_INVALID_SIZE_IN_PIXELS:
+       case dcp::VerificationNote::INVALID_PICTURE_SIZE_IN_PIXELS:
                return String::compose("A picture asset's size (%1) is not one of those allowed by Bv2.1 (2048x858, 1998x1080, 4096x1716 or 3996x2160)", note.note().get());
-       case dcp::VerificationNote::PICTURE_ASSET_INVALID_FRAME_RATE_FOR_2K:
+       case dcp::VerificationNote::INVALID_PICTURE_FRAME_RATE_FOR_2K:
                return String::compose("A picture asset's frame rate (%1) is not one of those allowed for 2K DCPs by Bv2.1 (24, 25 or 48fps)", note.note().get());
-       case dcp::VerificationNote::PICTURE_ASSET_INVALID_FRAME_RATE_FOR_4K:
+       case dcp::VerificationNote::INVALID_PICTURE_FRAME_RATE_FOR_4K:
                return String::compose("A picture asset's frame rate (%1) is not 24fps as required for 4K DCPs by Bv2.1", note.note().get());
-       case dcp::VerificationNote::PICTURE_ASSET_4K_3D:
+       case dcp::VerificationNote::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D:
                return "3D 4K DCPs are not allowed by Bv2.1";
-       case dcp::VerificationNote::CLOSED_CAPTION_XML_TOO_LARGE_IN_BYTES:
+       case dcp::VerificationNote::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES:
                return String::compose("The XML for the closed caption asset %1 is longer than the 256KB maximum required by Bv2.1", note.file()->filename());
-       case dcp::VerificationNote::TIMED_TEXT_ASSET_TOO_LARGE_IN_BYTES:
+       case dcp::VerificationNote::INVALID_TIMED_TEXT_SIZE_IN_BYTES:
                return String::compose("The total size of the timed text asset %1 is larger than the 115MB maximum required by Bv2.1", note.file()->filename());
-       case dcp::VerificationNote::TIMED_TEXT_FONTS_TOO_LARGE_IN_BYTES:
+       case dcp::VerificationNote::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES:
                return String::compose("The total size of the fonts in timed text asset %1 is larger than the 10MB maximum required by Bv2.1", note.file()->filename());
        case dcp::VerificationNote::MISSING_SUBTITLE_LANGUAGE:
                return String::compose("The XML for a SMPTE subtitle asset has no <Language> tag, which is required by Bv2.1", note.file()->filename());
-       case dcp::VerificationNote::SUBTITLE_LANGUAGES_DIFFER:
+       case dcp::VerificationNote::MISMATCHED_SUBTITLE_LANGUAGES:
                return String::compose("Some subtitle assets have different <Language> tags than others", note.file()->filename());
        case dcp::VerificationNote::MISSING_SUBTITLE_START_TIME:
                return String::compose("The XML for a SMPTE subtitle asset has no <StartTime> tag, which is required by Bv2.1", note.file()->filename());
-       case dcp::VerificationNote::SUBTITLE_START_TIME_NON_ZERO:
+       case dcp::VerificationNote::INVALID_SUBTITLE_START_TIME:
                return String::compose("The XML for a SMPTE subtitle asset has a non-zero <StartTime> tag, which is disallowed by Bv2.1", note.file()->filename());
-       case dcp::VerificationNote::FIRST_TEXT_TOO_EARLY:
+       case dcp::VerificationNote::INVALID_SUBTITLE_FIRST_TEXT_TIME:
                return "The first subtitle or closed caption is less than 4 seconds from the start of the DCP.";
-       case dcp::VerificationNote::SUBTITLE_TOO_SHORT:
+       case dcp::VerificationNote::INVALID_SUBTITLE_DURATION:
                return "At least one subtitle is less than the minimum of 15 frames suggested by Bv2.1";
-       case dcp::VerificationNote::SUBTITLE_TOO_CLOSE:
+       case dcp::VerificationNote::INVALID_SUBTITLE_SPACING:
                return "At least one pair of subtitles are separated by less than the the minimum of 2 frames suggested by Bv2.1";
-       case dcp::VerificationNote::TOO_MANY_SUBTITLE_LINES:
+       case dcp::VerificationNote::INVALID_SUBTITLE_LINE_COUNT:
                return "There are more than 3 subtitle lines in at least one place in the DCP, which Bv2.1 advises against.";
-       case dcp::VerificationNote::SUBTITLE_LINE_LONGER_THAN_RECOMMENDED:
+       case dcp::VerificationNote::NEARLY_INVALID_SUBTITLE_LINE_LENGTH:
                return "There are more than 52 characters in at least one subtitle line, which Bv2.1 advises against.";
-       case dcp::VerificationNote::SUBTITLE_LINE_TOO_LONG:
+       case dcp::VerificationNote::INVALID_SUBTITLE_LINE_LENGTH:
                return "There are more than 79 characters in at least one subtitle line, which Bv2.1 strongly advises against.";
-       case dcp::VerificationNote::TOO_MANY_CLOSED_CAPTION_LINES:
+       case dcp::VerificationNote::INVALID_CLOSED_CAPTION_LINE_COUNT:
                return "There are more than 3 closed caption lines in at least one place, which is disallowed by Bv2.1";
-       case dcp::VerificationNote::CLOSED_CAPTION_LINE_TOO_LONG:
+       case dcp::VerificationNote::INVALID_CLOSED_CAPTION_LINE_LENGTH:
                return "There are more than 32 characters in at least one closed caption line, which is disallowed by Bv2.1";
        case dcp::VerificationNote::INVALID_SOUND_FRAME_RATE:
                return "A sound asset has a sampling rate other than 48kHz, which is disallowed by Bv2.1";
-       case dcp::VerificationNote::MISSING_ANNOTATION_TEXT_IN_CPL:
+       case dcp::VerificationNote::MISSING_CPL_ANNOTATION_TEXT:
                return "The CPL has no <AnnotationText> tag, which is required by Bv2.1";
-       case dcp::VerificationNote::CPL_ANNOTATION_TEXT_DIFFERS_FROM_CONTENT_TITLE_TEXT:
+       case dcp::VerificationNote::MISMATCHED_CPL_ANNOTATION_TEXT:
                return "The CPL's <AnnotationText> differs from its <ContentTitleText>, which Bv2.1 advises against.";
        case dcp::VerificationNote::MISMATCHED_ASSET_DURATION:
                return "All assets in a reel do not have the same duration, which is required by Bv2.1";
-       case dcp::VerificationNote::MAIN_SUBTITLE_NOT_IN_ALL_REELS:
+       case dcp::VerificationNote::MISSING_MAIN_SUBTITLE_FROM_SOME_REELS:
                return "At least one reel contains a subtitle asset, but some reel(s) do not";
-       case dcp::VerificationNote::CLOSED_CAPTION_ASSET_COUNTS_DIFFER:
+       case dcp::VerificationNote::MISMATCHED_CLOSED_CAPTION_ASSET_COUNTS:
                return "At least one reel has closed captions, but reels have different numbers of closed caption assets.";
        case dcp::VerificationNote::MISSING_SUBTITLE_ENTRY_POINT:
                return "Subtitle assets must have an <EntryPoint> tag.";
-       case dcp::VerificationNote::SUBTITLE_ENTRY_POINT_NON_ZERO:
+       case dcp::VerificationNote::INCORRECT_SUBTITLE_ENTRY_POINT:
                return "Subtitle assets must have an <EntryPoint> of 0.";
        case dcp::VerificationNote::MISSING_CLOSED_CAPTION_ENTRY_POINT:
                return "Closed caption assets must have an <EntryPoint> tag.";
-       case dcp::VerificationNote::CLOSED_CAPTION_ENTRY_POINT_NON_ZERO:
+       case dcp::VerificationNote::INCORRECT_CLOSED_CAPTION_ENTRY_POINT:
                return "Closed caption assets must have an <EntryPoint> of 0.";
        case dcp::VerificationNote::MISSING_HASH:
                return String::compose("An asset is missing a <Hash> tag: %1", note.note().get());
@@ -1512,11 +1512,11 @@ dcp::note_to_string (dcp::VerificationNote note)
                return "The CPL metadata must contain <ExtensionMetadata>";
        case dcp::VerificationNote::INVALID_EXTENSION_METADATA:
                return String::compose("The <ExtensionMetadata> is malformed in some way: %1", note.note().get());
-       case dcp::VerificationNote::CPL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED:
+       case dcp::VerificationNote::UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT:
                return String::compose("The CPL %1, which has encrypted content, is not signed", note.file()->filename());
-       case dcp::VerificationNote::PKL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED:
+       case dcp::VerificationNote::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT:
                return String::compose("The PKL %1, which has encrypted content, is not signed", note.file()->filename());
-       case dcp::VerificationNote::PKL_ANNOTATION_TEXT_DOES_NOT_MATCH_CPL_CONTENT_TITLE_TEXT:
+       case dcp::VerificationNote::MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL:
                return String::compose("The PKL %1 has only one CPL but its <AnnotationText> does not match the CPL's <ContentTitleText>", note.file()->filename());
        case dcp::VerificationNote::PARTIALLY_ENCRYPTED:
                return "Some assets are encrypted but some are not";
index 32a369d06b78cec15266519801dda6d21d4d41bf..2f9b244e1d4e754b789e07254248b63908a6f75f 100644 (file)
@@ -54,21 +54,42 @@ public:
                VERIFY_WARNING
        };
 
+       /** Codes for errors or warnings from verifying DCPs.
+        *
+        *  The names should (in general) answer the question "what is wrong?" with an answer that begins "There is a ..."
+        *  e.g. "There is a INCORRECT_CPL_HASH"
+        *       "There is a MISSING_ASSET"
+        *
+        *  In general the pattern should be <negative-adjective> <noun>.
+        *  Some <negative-adjective>s are:
+        *
+        *  - INCORRECT: something, which could have any value, is wrong.
+        *  - INVALID: something, which should only be one of a set of values, is not in the set, or some preformatted
+        *             quantity (e.g. XML) is in the wrong format.
+        *  - MISMATCHED: two things, which should be the same, are not.
+        *  - EMPTY: something, which should have a value, has no value.
+        *  - MISSING: something, which should be present, is not.
+        *  - FAILED: some part of the verification failed in some serious way.
+        *
+        *  Comments should clarify meaning and also say which of the optional fields (e.g. file)
+        *  are filled in when this code is used.
+        *  XXX: this needs checking.
+        */
        enum Code {
                /** An error when reading the DCP.  note contains (probably technical) details. */
-               GENERAL_READ,
+               FAILED_READ,
                /** The hash of the CPL in the PKL does not agree with the CPL file */
-               CPL_HASH_INCORRECT,
+               MISMATCHED_CPL_HASHES,
                /** Frame rate given in a reel for the main picture is not 24, 25, 30, 48, 50 or 60 */
                INVALID_PICTURE_FRAME_RATE,
                /** The hash of a main picture asset does not agree with the PKL file.  file contains the picture asset filename. */
-               PICTURE_HASH_INCORRECT,
+               INCORRECT_PICTURE_HASH,
                /** The hash of a main picture is different in the CPL and PKL */
-               PKL_CPL_PICTURE_HASHES_DIFFER,
+               MISMATCHED_PICTURE_HASHES,
                /** The hash of a main sound asset does not agree with the PKL file.  file contains the sound asset filename. */
-               SOUND_HASH_INCORRECT,
+               INCORRECT_SOUND_HASH,
                /** The hash of a main sound is different in the CPL and PKL */
-               PKL_CPL_SOUND_HASHES_DIFFER,
+               MISMATCHED_SOUND_HASHES,
                /** An assetmap's <Path> entry is empty */
                EMPTY_ASSET_PATH,
                /** A file mentioned in an asset map cannot be found */
@@ -76,81 +97,81 @@ public:
                /** The DCP contains both SMPTE and Interop-standard components */
                MISMATCHED_STANDARD,
                /** Some XML fails to validate against the XSD/DTD */
-               XML_VALIDATION_ERROR,
+               INVALID_XML,
                /** No ASSETMAP{.xml} was found */
                MISSING_ASSETMAP,
                /** An asset's IntrinsicDuration is less than 1 second */
-               INTRINSIC_DURATION_TOO_SMALL,
+               INVALID_INTRINSIC_DURATION,
                /** An asset's Duration is less than 1 second */
-               DURATION_TOO_SMALL,
+               INVALID_DURATION,
                /** The JPEG2000 data in at least one picture frame is larger than the equivalent of 250Mbit/s */
-               PICTURE_FRAME_TOO_LARGE_IN_BYTES,
+               INVALID_PICTURE_FRAME_SIZE_IN_BYTES,
                /** The JPEG2000 data in at least one picture frame is larger than the equivalent of 230Mbit/s */
-               PICTURE_FRAME_NEARLY_TOO_LARGE_IN_BYTES,
+               NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES,
                /** An asset that the CPL requires is not in this DCP; the DCP may be a VF */
                EXTERNAL_ASSET,
                /** DCP is Interop, not SMPTE [Bv2.1_6.1] */
-               NOT_SMPTE,
+               INVALID_STANDARD,
                /** A language or territory does not conform to RFC 5646 [Bv2.1_6.2.1] */
-               BAD_LANGUAGE,
+               INVALID_LANGUAGE,
                /** A picture asset does not have one of the required Bv2.1 sizes (in pixels) [Bv2.1_7.1] */
-               PICTURE_ASSET_INVALID_SIZE_IN_PIXELS,
+               INVALID_PICTURE_SIZE_IN_PIXELS,
                /** A picture asset is 2K but is not at 24, 25 or 48 fps as required by Bv2.1 [Bv2.1_7.1] */
-               PICTURE_ASSET_INVALID_FRAME_RATE_FOR_2K,
+               INVALID_PICTURE_FRAME_RATE_FOR_2K,
                /** A picture asset is 4K but is not at 24fps as required by Bv2.1 [Bv2.1_7.1] */
-               PICTURE_ASSET_INVALID_FRAME_RATE_FOR_4K,
+               INVALID_PICTURE_FRAME_RATE_FOR_4K,
                /** A picture asset is 4K but is 3D which is not allowed by Bv2.1 [Bv2.1_7.1] */
-               PICTURE_ASSET_4K_3D,
+               INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D,
                /** A closed caption's XML file is larger than 256KB [Bv2.1_7.2.1] */
-               CLOSED_CAPTION_XML_TOO_LARGE_IN_BYTES,
+               INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES,
                /** Any timed text asset's total files is larger than 115MB [Bv2.1_7.2.1] */
-               TIMED_TEXT_ASSET_TOO_LARGE_IN_BYTES,
+               INVALID_TIMED_TEXT_SIZE_IN_BYTES,
                /** The total size of all a timed text asset's fonts is larger than 10MB [Bv2.1_7.2.1] */
-               TIMED_TEXT_FONTS_TOO_LARGE_IN_BYTES,
+               INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES,
                /** Some SMPTE subtitle XML has no <Language> tag [Bv2.1_7.2.2] */
                MISSING_SUBTITLE_LANGUAGE,
                /** Not all subtitle assets specify the same <Language> tag [Bv2.1_7.2.2] */
-               SUBTITLE_LANGUAGES_DIFFER,
+               MISMATCHED_SUBTITLE_LANGUAGES,
                /** Some SMPTE subtitle XML has no <StartTime> tag [Bv2.1_7.2.3] */
                MISSING_SUBTITLE_START_TIME,
                /** Some SMPTE subtitle XML has a non-zero <StartTime> tag [Bv2.1_7.2.3] */
-               SUBTITLE_START_TIME_NON_ZERO,
+               INVALID_SUBTITLE_START_TIME,
                /** The first subtitle or closed caption happens before 4s into the first reel [Bv2.1_7.2.4] */
-               FIRST_TEXT_TOO_EARLY,
+               INVALID_SUBTITLE_FIRST_TEXT_TIME,
                /** At least one subtitle is less than the minimum of 15 frames suggested by [Bv2.1_7.2.5] */
-               SUBTITLE_TOO_SHORT,
+               INVALID_SUBTITLE_DURATION,
                /** At least one pair of subtitles are separated by less than the the minimum of 2 frames suggested by [Bv2.1_7.2.5] */
-               SUBTITLE_TOO_CLOSE,
+               INVALID_SUBTITLE_SPACING,
                /** There are more than 3 subtitle lines in at least one place [Bv2.1_7.2.7] */
-               TOO_MANY_SUBTITLE_LINES,
+               INVALID_SUBTITLE_LINE_COUNT,
                /** There are more than 52 characters in at least one subtitle line [Bv2.1_7.2.7] */
-               SUBTITLE_LINE_LONGER_THAN_RECOMMENDED,
+               NEARLY_INVALID_SUBTITLE_LINE_LENGTH,
                /** There are more than 79 characters in at least one subtitle line [Bv2.1_7.2.7] */
-               SUBTITLE_LINE_TOO_LONG,
+               INVALID_SUBTITLE_LINE_LENGTH,
                /** There are more than 3 closed caption lines in at least one place [Bv2.1_7.2.6] */
-               TOO_MANY_CLOSED_CAPTION_LINES,
+               INVALID_CLOSED_CAPTION_LINE_COUNT,
                /** There are more than 32 characters in at least one closed caption line [Bv2.1_7.2.6] */
-               CLOSED_CAPTION_LINE_TOO_LONG,
+               INVALID_CLOSED_CAPTION_LINE_LENGTH,
                /** The audio sampling rate must be 48kHz [Bv2.1_7.3] */
                INVALID_SOUND_FRAME_RATE,
                /** The CPL has no <AnnotationText> tag [Bv2.1_8.1] */
-               MISSING_ANNOTATION_TEXT_IN_CPL,
+               MISSING_CPL_ANNOTATION_TEXT,
                /** The <AnnotationText> is not the same as the <ContentTitleText> [Bv2.1_8.1] */
-               CPL_ANNOTATION_TEXT_DIFFERS_FROM_CONTENT_TITLE_TEXT,
+               MISMATCHED_CPL_ANNOTATION_TEXT,
                /** At least one asset in a reel does not have the same duration as the others */
                MISMATCHED_ASSET_DURATION,
                /** If one reel has a MainSubtitle, all must have them */
-               MAIN_SUBTITLE_NOT_IN_ALL_REELS,
+               MISSING_MAIN_SUBTITLE_FROM_SOME_REELS,
                /** If one reel has at least one ClosedCaption, all reels must have the same number of ClosedCaptions */
-               CLOSED_CAPTION_ASSET_COUNTS_DIFFER,
+               MISMATCHED_CLOSED_CAPTION_ASSET_COUNTS,
                /** MainSubtitle in reels must have <EntryPoint> Bv2.1_8.3.2 */
                MISSING_SUBTITLE_ENTRY_POINT,
                /** MainSubtitle <EntryPoint> must be zero Bv2.1_8.3.2 */
-               SUBTITLE_ENTRY_POINT_NON_ZERO,
+               INCORRECT_SUBTITLE_ENTRY_POINT,
                /** Closed caption in reels must have <EntryPoint> Bv2.1_8.3.2 */
                MISSING_CLOSED_CAPTION_ENTRY_POINT,
                /** Closed caption MainSubtitle <EntryPoint> must be zero Bv2.1_8.3.2 */
-               CLOSED_CAPTION_ENTRY_POINT_NON_ZERO,
+               INCORRECT_CLOSED_CAPTION_ENTRY_POINT,
                /** <Hash> must be present for assets in CPLs */
                MISSING_HASH,
                /** If ContentKind is Feature there must be a FFEC marker */
@@ -174,11 +195,11 @@ public:
                /** <ExtensionMetadata> must have a particular form Bv2.1_8.6.3 */
                INVALID_EXTENSION_METADATA,
                /** CPLs containing encrypted content must be signed Bv2.1_8.7 */
-               CPL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED,
+               UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT,
                /** PKLs containing encrypted content must be signed Bv2.1_8.7 */
-               PKL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED,
+               UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT,
                /** If a PKL has one CPL its <ContentTitleText> must be the same as the PKL's <AnnotationText> */
-               PKL_ANNOTATION_TEXT_DOES_NOT_MATCH_CPL_CONTENT_TITLE_TEXT,
+               MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL,
                /** If any content is encrypted, everything must be encrypted */
                PARTIALLY_ENCRYPTED,
        };
index 62b7ffd50f39583b5321a3dfc302a85b1c0e80f0..81fb08ba1b99783ae7f69ebec3e17dbcd916cfb4 100644 (file)
@@ -89,7 +89,7 @@ check_no_errors (boost::filesystem::path path)
        auto notes = dcp::verify (directories, &stage, &progress, xsd_test);
        vector<dcp::VerificationNote> filtered_notes;
        std::copy_if (notes.begin(), notes.end(), std::back_inserter(filtered_notes), [](dcp::VerificationNote const& i) {
-               return i.code() != dcp::VerificationNote::NOT_SMPTE && i.code() != dcp::VerificationNote::SUBTITLE_TOO_SHORT;
+               return i.code() != dcp::VerificationNote::INVALID_STANDARD && i.code() != dcp::VerificationNote::INVALID_SUBTITLE_DURATION;
        });
        dump_notes (filtered_notes);
        BOOST_CHECK (filtered_notes.empty());
index ab5b625f2028389bc7c544d908fa6ad11cfd183b..9740bc98df314dbb34f097d9fa4df54d0d340453 100644 (file)
@@ -299,8 +299,8 @@ BOOST_AUTO_TEST_CASE (verify_test2)
        check_verify_result (
                directories,
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::PICTURE_HASH_INCORRECT },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::SOUND_HASH_INCORRECT }
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INCORRECT_PICTURE_HASH },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INCORRECT_SOUND_HASH }
                });
 }
 
@@ -317,12 +317,12 @@ BOOST_AUTO_TEST_CASE (verify_test3)
        check_verify_result (
                directories,
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::PKL_CPL_PICTURE_HASHES_DIFFER },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::PKL_CPL_SOUND_HASHES_DIFFER },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR }
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_PICTURE_HASHES },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_SOUND_HASHES },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML }
                });
 }
 
@@ -338,7 +338,7 @@ BOOST_AUTO_TEST_CASE (verify_test4)
 
        check_verify_result (
                directories,
-               {{ dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::GENERAL_READ, string("Bad content kind 'xtrailer'")}}
+               {{ dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::FAILED_READ, string("Bad content kind 'xtrailer'")}}
                );
 }
 
@@ -370,7 +370,7 @@ BOOST_AUTO_TEST_CASE (verify_test5)
        check_verify_result_after_replace (
                        5, &cpl,
                        "<FrameRate>24 1", "<FrameRate>99 1",
-                       { dcp::VerificationNote::CPL_HASH_INCORRECT,
+                       { dcp::VerificationNote::MISMATCHED_CPL_HASHES,
                          dcp::VerificationNote::INVALID_PICTURE_FRAME_RATE }
                        );
 }
@@ -408,23 +408,23 @@ BOOST_AUTO_TEST_CASE (verify_test8)
                        8, &cpl,
                        "http://www.smpte-ra.org/schemas/429-7/2006/CPL", "http://www.digicine.com/PROTO-ASDCP-CPL-20040511#",
                        { dcp::VerificationNote::MISMATCHED_STANDARD,
-                         dcp::VerificationNote::XML_VALIDATION_ERROR,
-                         dcp::VerificationNote::XML_VALIDATION_ERROR,
-                         dcp::VerificationNote::XML_VALIDATION_ERROR,
-                         dcp::VerificationNote::XML_VALIDATION_ERROR,
-                         dcp::VerificationNote::XML_VALIDATION_ERROR,
-                         dcp::VerificationNote::CPL_HASH_INCORRECT }
+                         dcp::VerificationNote::INVALID_XML,
+                         dcp::VerificationNote::INVALID_XML,
+                         dcp::VerificationNote::INVALID_XML,
+                         dcp::VerificationNote::INVALID_XML,
+                         dcp::VerificationNote::INVALID_XML,
+                         dcp::VerificationNote::MISMATCHED_CPL_HASHES }
                        );
 }
 
 /* Badly formatted <Id> in CPL */
 BOOST_AUTO_TEST_CASE (verify_test9)
 {
-       /* There's no CPL_HASH_INCORRECT error here because it can't find the correct hash by ID (since the ID is wrong) */
+       /* There's no MISMATCHED_CPL_HASHES error here because it can't find the correct hash by ID (since the ID is wrong) */
        check_verify_result_after_replace (
                        9, &cpl,
                        "<Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b", "<Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375",
-                       { dcp::VerificationNote::XML_VALIDATION_ERROR }
+                       { dcp::VerificationNote::INVALID_XML }
                        );
 }
 
@@ -434,8 +434,8 @@ BOOST_AUTO_TEST_CASE (verify_test10)
        check_verify_result_after_replace (
                        10, &cpl,
                        "<IssueDate>", "<IssueDate>x",
-                       { dcp::VerificationNote::XML_VALIDATION_ERROR,
-                         dcp::VerificationNote::CPL_HASH_INCORRECT }
+                       { dcp::VerificationNote::INVALID_XML,
+                         dcp::VerificationNote::MISMATCHED_CPL_HASHES }
                        );
 }
 
@@ -445,7 +445,7 @@ BOOST_AUTO_TEST_CASE (verify_test11)
        check_verify_result_after_replace (
                11, &pkl,
                "<Id>urn:uuid:2b9", "<Id>urn:uuid:xb9",
-               { dcp::VerificationNote::XML_VALIDATION_ERROR }
+               { dcp::VerificationNote::INVALID_XML }
                );
 }
 
@@ -455,7 +455,7 @@ BOOST_AUTO_TEST_CASE (verify_test12)
        check_verify_result_after_replace (
                12, &asset_map,
                "<Id>urn:uuid:07e", "<Id>urn:uuid:x7e",
-               { dcp::VerificationNote::XML_VALIDATION_ERROR }
+               { dcp::VerificationNote::INVALID_XML }
                );
 }
 
@@ -511,7 +511,7 @@ BOOST_AUTO_TEST_CASE (verify_test13)
        BOOST_REQUIRE_EQUAL (notes.size(), 1U);
        auto i = notes.begin ();
        BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::VERIFY_BV21_ERROR);
-       BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
+       BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::INVALID_STANDARD);
 }
 
 /* DCP with a short asset */
@@ -521,11 +521,11 @@ BOOST_AUTO_TEST_CASE (verify_test14)
        check_verify_result (
                directories,
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::NOT_SMPTE },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::DURATION_TOO_SMALL },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INTRINSIC_DURATION_TOO_SMALL },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::DURATION_TOO_SMALL },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INTRINSIC_DURATION_TOO_SMALL }
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_STANDARD },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_DURATION },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_INTRINSIC_DURATION },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_DURATION },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_INTRINSIC_DURATION }
                });
 }
 
@@ -569,7 +569,7 @@ BOOST_AUTO_TEST_CASE (verify_test15)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::PICTURE_FRAME_TOO_LARGE_IN_BYTES },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_PICTURE_FRAME_SIZE_IN_BYTES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -597,7 +597,7 @@ BOOST_AUTO_TEST_CASE (verify_test16)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::PICTURE_FRAME_NEARLY_TOO_LARGE_IN_BYTES },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -629,7 +629,7 @@ BOOST_AUTO_TEST_CASE (verify_test18)
        auto reel_asset = make_shared<dcp::ReelSubtitleAsset>(asset, dcp::Fraction(24, 1), 16 * 24, 0);
        write_dcp_with_single_asset (dir, reel_asset, dcp::INTEROP);
 
-       check_verify_result ({dir}, {{ dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::NOT_SMPTE }});
+       check_verify_result ({dir}, {{ dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_STANDARD }});
 }
 
 
@@ -651,9 +651,9 @@ BOOST_AUTO_TEST_CASE (verify_test19)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::NOT_SMPTE },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR }
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_STANDARD },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML }
                });
 }
 
@@ -685,8 +685,8 @@ BOOST_AUTO_TEST_CASE (verify_test21)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_SUBTITLE_START_TIME },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
@@ -806,10 +806,10 @@ BOOST_AUTO_TEST_CASE (verify_test24)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT }
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES }
                });
 }
 
@@ -846,7 +846,7 @@ BOOST_AUTO_TEST_CASE (verify_test25)
 
        check_verify_result (
                { dir },
-               {{ dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::GENERAL_READ }}
+               {{ dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::FAILED_READ }}
                );
 }
 
@@ -867,8 +867,8 @@ BOOST_AUTO_TEST_CASE (verify_test26)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::BAD_LANGUAGE, string("badlang") },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::BAD_LANGUAGE, string("wrong-andbad") },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_LANGUAGE, string("badlang") },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_LANGUAGE, string("wrong-andbad") },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA },
                });
 }
@@ -890,8 +890,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_closed_caption_languages)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::BAD_LANGUAGE, string("badlang") },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::BAD_LANGUAGE, string("wrong-andbad") },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_LANGUAGE, string("badlang") },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_LANGUAGE, string("wrong-andbad") },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -937,10 +937,10 @@ BOOST_AUTO_TEST_CASE (verify_various_invalid_languages)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::BAD_LANGUAGE, string("this-is-wrong") },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::BAD_LANGUAGE, string("andso-is-this") },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::BAD_LANGUAGE, string("fred-jim") },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::BAD_LANGUAGE, string("frobozz") },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_LANGUAGE, string("this-is-wrong") },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_LANGUAGE, string("andso-is-this") },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_LANGUAGE, string("fred-jim") },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_LANGUAGE, string("frobozz") },
                });
 }
 
@@ -1022,7 +1022,7 @@ check_picture_size_bad_frame_size (int width, int height, int frame_rate, bool t
        auto notes = check_picture_size(width, height, frame_rate, three_d);
        BOOST_REQUIRE_EQUAL (notes.size(), 1U);
        BOOST_CHECK_EQUAL (notes.front().type(), dcp::VerificationNote::VERIFY_BV21_ERROR);
-       BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::PICTURE_ASSET_INVALID_SIZE_IN_PIXELS);
+       BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::INVALID_PICTURE_SIZE_IN_PIXELS);
 }
 
 
@@ -1033,7 +1033,7 @@ check_picture_size_bad_2k_frame_rate (int width, int height, int frame_rate, boo
        auto notes = check_picture_size(width, height, frame_rate, three_d);
        BOOST_REQUIRE_EQUAL (notes.size(), 2U);
        BOOST_CHECK_EQUAL (notes.back().type(), dcp::VerificationNote::VERIFY_BV21_ERROR);
-       BOOST_CHECK_EQUAL (notes.back().code(), dcp::VerificationNote::PICTURE_ASSET_INVALID_FRAME_RATE_FOR_2K);
+       BOOST_CHECK_EQUAL (notes.back().code(), dcp::VerificationNote::INVALID_PICTURE_FRAME_RATE_FOR_2K);
 }
 
 
@@ -1044,7 +1044,7 @@ check_picture_size_bad_4k_frame_rate (int width, int height, int frame_rate, boo
        auto notes = check_picture_size(width, height, frame_rate, three_d);
        BOOST_REQUIRE_EQUAL (notes.size(), 1U);
        BOOST_CHECK_EQUAL (notes.front().type(), dcp::VerificationNote::VERIFY_BV21_ERROR);
-       BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::PICTURE_ASSET_INVALID_FRAME_RATE_FOR_4K);
+       BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::INVALID_PICTURE_FRAME_RATE_FOR_4K);
 }
 
 
@@ -1093,7 +1093,7 @@ BOOST_AUTO_TEST_CASE (verify_picture_size)
        auto notes = check_picture_size(3996, 2160, 24, true);
        BOOST_REQUIRE_EQUAL (notes.size(), 1U);
        BOOST_CHECK_EQUAL (notes.front().type(), dcp::VerificationNote::VERIFY_BV21_ERROR);
-       BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::PICTURE_ASSET_4K_3D);
+       BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D);
 }
 
 
@@ -1145,8 +1145,8 @@ BOOST_AUTO_TEST_CASE (verify_closed_caption_xml_too_large)
                { dir },
                {
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_SUBTITLE_START_TIME },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::CLOSED_CAPTION_XML_TOO_LARGE_IN_BYTES },
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::FIRST_TEXT_TOO_EARLY },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_FIRST_TEXT_TIME },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA },
                });
 }
@@ -1183,10 +1183,10 @@ verify_timed_text_asset_too_large (string name)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::TIMED_TEXT_ASSET_TOO_LARGE_IN_BYTES },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::TIMED_TEXT_FONTS_TOO_LARGE_IN_BYTES },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_TIMED_TEXT_SIZE_IN_BYTES },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_SUBTITLE_START_TIME },
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::FIRST_TEXT_TOO_EARLY },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_FIRST_TEXT_TIME },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA },
                });
 }
@@ -1247,7 +1247,7 @@ BOOST_AUTO_TEST_CASE (verify_missing_language_tag_in_subtitle_xml)
                { dir },
                {
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_SUBTITLE_LANGUAGE },
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::FIRST_TEXT_TOO_EARLY }
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_FIRST_TEXT_TIME }
                });
 }
 
@@ -1288,7 +1288,7 @@ BOOST_AUTO_TEST_CASE (verify_inconsistent_subtitle_languages)
                { path },
                {
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_SUBTITLE_START_TIME },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::SUBTITLE_LANGUAGES_DIFFER },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISMATCHED_SUBTITLE_LANGUAGES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_SUBTITLE_START_TIME }
                });
 }
@@ -1342,7 +1342,7 @@ BOOST_AUTO_TEST_CASE (verify_missing_start_time_tag_in_subtitle_xml)
                { dir },
                {
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_SUBTITLE_START_TIME },
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::FIRST_TEXT_TOO_EARLY }
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_FIRST_TEXT_TIME }
                });
 }
 
@@ -1395,8 +1395,8 @@ BOOST_AUTO_TEST_CASE (verify_non_zero_start_time_tag_in_subtitle_xml)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::SUBTITLE_START_TIME_NON_ZERO },
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::FIRST_TEXT_TOO_EARLY }
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_SUBTITLE_START_TIME },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_FIRST_TEXT_TIME }
                });
 }
 
@@ -1444,7 +1444,7 @@ BOOST_AUTO_TEST_CASE (verify_text_too_early)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::FIRST_TEXT_TOO_EARLY },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_FIRST_TEXT_TIME },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 
@@ -1521,7 +1521,7 @@ BOOST_AUTO_TEST_CASE (verify_text_too_close)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::SUBTITLE_TOO_CLOSE },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_SPACING },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1547,7 +1547,7 @@ BOOST_AUTO_TEST_CASE (verify_text_too_short)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::SUBTITLE_TOO_SHORT },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_DURATION },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1575,7 +1575,7 @@ BOOST_AUTO_TEST_CASE (verify_too_many_subtitle_lines1)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::TOO_MANY_SUBTITLE_LINES },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_LINE_COUNT },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1609,7 +1609,7 @@ BOOST_AUTO_TEST_CASE (verify_too_many_subtitle_lines2)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::TOO_MANY_SUBTITLE_LINES },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_LINE_COUNT },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1641,7 +1641,7 @@ BOOST_AUTO_TEST_CASE (verify_subtitle_lines_too_long1)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::SUBTITLE_LINE_LONGER_THAN_RECOMMENDED },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::NEARLY_INVALID_SUBTITLE_LINE_LENGTH },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1658,7 +1658,7 @@ BOOST_AUTO_TEST_CASE (verify_subtitle_lines_too_long2)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::SUBTITLE_LINE_TOO_LONG },
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::INVALID_SUBTITLE_LINE_LENGTH },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1678,7 +1678,7 @@ BOOST_AUTO_TEST_CASE (verify_too_many_closed_caption_lines1)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::TOO_MANY_CLOSED_CAPTION_LINES},
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_CLOSED_CAPTION_LINE_COUNT},
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1712,7 +1712,7 @@ BOOST_AUTO_TEST_CASE (verify_too_many_closed_caption_lines2)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::TOO_MANY_CLOSED_CAPTION_LINES},
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_CLOSED_CAPTION_LINE_COUNT},
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1744,7 +1744,7 @@ BOOST_AUTO_TEST_CASE (verify_closed_caption_lines_too_long1)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::CLOSED_CAPTION_LINE_TOO_LONG },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_CLOSED_CAPTION_LINE_LENGTH },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                });
 }
@@ -1807,8 +1807,8 @@ BOOST_AUTO_TEST_CASE (verify_cpl_must_have_annotation_text)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_ANNOTATION_TEXT_IN_CPL },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT }
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_ANNOTATION_TEXT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES }
                });
 }
 
@@ -1836,8 +1836,8 @@ BOOST_AUTO_TEST_CASE (verify_cpl_annotation_text_should_be_same_as_content_title
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::CPL_ANNOTATION_TEXT_DIFFERS_FROM_CONTENT_TITLE_TEXT },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT }
+                       { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISMATCHED_CPL_ANNOTATION_TEXT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES }
                });
 }
 
@@ -1943,7 +1943,7 @@ BOOST_AUTO_TEST_CASE (verify_subtitles_must_be_in_all_reels)
                check_verify_result (
                        { dir },
                        {
-                               { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MAIN_SUBTITLE_NOT_IN_ALL_REELS },
+                               { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_MAIN_SUBTITLE_FROM_SOME_REELS },
                                { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                        });
 
@@ -2026,7 +2026,7 @@ BOOST_AUTO_TEST_CASE (verify_closed_captions_must_be_in_all_reels)
                check_verify_result (
                        {dir},
                        {
-                               { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::CLOSED_CAPTION_ASSET_COUNTS_DIFFER },
+                               { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISMATCHED_CLOSED_CAPTION_ASSET_COUNTS },
                                { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_CPL_METADATA }
                        });
        }
@@ -2102,7 +2102,7 @@ BOOST_AUTO_TEST_CASE (verify_text_entry_point)
 
        verify_text_entry_point_check<dcp::ReelSubtitleAsset> (
                "build/test/verify_subtitle_entry_point_must_be_zero",
-               dcp::VerificationNote::SUBTITLE_ENTRY_POINT_NON_ZERO,
+               dcp::VerificationNote::INCORRECT_SUBTITLE_ENTRY_POINT,
                [](shared_ptr<dcp::ReelSubtitleAsset> asset) {
                        asset->set_entry_point (4);
                        }
@@ -2118,7 +2118,7 @@ BOOST_AUTO_TEST_CASE (verify_text_entry_point)
 
        verify_text_entry_point_check<dcp::ReelClosedCaptionAsset> (
                "build/test/verify_closed_caption_entry_point_must_be_zero",
-               dcp::VerificationNote::CLOSED_CAPTION_ENTRY_POINT_NON_ZERO,
+               dcp::VerificationNote::INCORRECT_CLOSED_CAPTION_ENTRY_POINT,
                [](shared_ptr<dcp::ReelClosedCaptionAsset> asset) {
                        asset->set_entry_point (9);
                        }
@@ -2151,7 +2151,7 @@ BOOST_AUTO_TEST_CASE (verify_assets_must_have_hashes)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_HASH }
                });
 }
@@ -2305,7 +2305,7 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata1)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_EXTENSION_METADATA }
                });
 }
@@ -2331,7 +2331,7 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata2)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_EXTENSION_METADATA }
                });
 }
@@ -2358,9 +2358,9 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata3)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                });
 }
 
@@ -2385,7 +2385,7 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata4)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_EXTENSION_METADATA, string("<Name> property should be 'Application'") },
                });
 }
@@ -2410,7 +2410,7 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata5)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_EXTENSION_METADATA, string("<Name> property should be 'DCP Constraints Profile'") },
                });
 }
@@ -2437,9 +2437,9 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata6)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                });
 }
 
@@ -2463,7 +2463,7 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata7)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                        { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_EXTENSION_METADATA, string("<Value> property should be 'SMPTE-RDD-52:2020-Bv2.1'") },
                });
 }
@@ -2489,9 +2489,9 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata8)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                });
 }
 
@@ -2516,9 +2516,9 @@ BOOST_AUTO_TEST_CASE (verify_cpl_extension_metadata9)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::XML_VALIDATION_ERROR },
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::INVALID_XML },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
                });
 }
 
@@ -2540,14 +2540,14 @@ BOOST_AUTO_TEST_CASE (verify_encrypted_cpl_is_signed)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::PKL_ANNOTATION_TEXT_DOES_NOT_MATCH_CPL_CONTENT_TITLE_TEXT },
+                       { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISMATCHED_CPL_HASHES },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT },
                        { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISSING_FFEC_IN_FEATURE },
                        { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISSING_FFMC_IN_FEATURE },
                        { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_FFOC },
                        { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_LFOC },
                        { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_CPL_METADATA },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::CPL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED }
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT }
                });
 }
 
@@ -2568,13 +2568,13 @@ BOOST_AUTO_TEST_CASE (verify_encrypted_pkl_is_signed)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::PKL_ANNOTATION_TEXT_DOES_NOT_MATCH_CPL_CONTENT_TITLE_TEXT },
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT },
                        { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISSING_FFEC_IN_FEATURE },
                        { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::MISSING_FFMC_IN_FEATURE },
                        { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_FFOC },
                        { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_LFOC },
                        { dcp::VerificationNote::VERIFY_WARNING, dcp::VerificationNote::MISSING_CPL_METADATA },
-                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::PKL_WITH_ENCRYPTED_CONTENT_NOT_SIGNED }
+                       { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT }
                });
 }
 
index eaecb0f17bf7fbde5bc6c671cbd4c30a50a7962c..138f9ca3758a09c5f3f22a5421630b2c10facdcd 100644 (file)
@@ -143,7 +143,7 @@ main (int argc, char* argv[])
 
        bool failed = false;
        BOOST_FOREACH (dcp::VerificationNote i, notes) {
-               if (ignore_bv21_smpte && i.code() == dcp::VerificationNote::NOT_SMPTE) {
+               if (ignore_bv21_smpte && i.code() == dcp::VerificationNote::INVALID_STANDARD) {
                        continue;
                }
                switch (i.type()) {