Make DCP verification a little more verbose, and adapt for changes to libdcp.
authorCarl Hetherington <cth@carlh.net>
Sat, 12 Jan 2019 23:15:47 +0000 (23:15 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 12 Jan 2019 23:15:47 +0000 (23:15 +0000)
cscript
src/wx/verify_dcp_dialog.cc

diff --git a/cscript b/cscript
index 83970c6..00ed4c0 100644 (file)
--- a/cscript
+++ b/cscript
@@ -343,8 +343,8 @@ def dependencies(target):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', 'c763ce1'))
-    deps.append(('libsub', '0e41143'))
+    deps.append(('libdcp', '7e4e6be'))
+    deps.append(('libsub', '432cd4d'))
     deps.append(('rtaudio-cdist', 'aad62d7'))
 
     return deps
index 634bee9..f806baf 100644 (file)
@@ -62,9 +62,6 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
 
        BOOST_FOREACH (dcp::VerificationNote i, job->notes()) {
                switch (i.type()) {
-               case dcp::VerificationNote::VERIFY_NOTE:
-                       _text->BeginStandardBullet (N_("standard/circle"), 1, 50);
-                       break;
                case dcp::VerificationNote::VERIFY_WARNING:
                        _text->BeginStandardBullet (N_("standard/diamond"), 1, 50);
                        break;
@@ -73,11 +70,41 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
                        break;
                }
 
-               _text->WriteText (std_to_wx (i.note()));
+               wxString text;
+               switch (i.code()) {
+               case dcp::VerificationNote::GENERAL_READ:
+                       text = std_to_wx(*i.note());
+                       break;
+               case dcp::VerificationNote::CPL_HASH_INCORRECT:
+                       text = _("The hash of the CPL in the PKL does not agree with the CPL file.  This probably means that the CPL file is corrupt.");
+                       break;
+               case dcp::VerificationNote::INVALID_PICTURE_FRAME_RATE:
+                       text = _("The picture in a reel has an invalid frame rate");
+                       break;
+               case dcp::VerificationNote::PICTURE_HASH_INCORRECT:
+                       text = wxString::Format(
+                               _("The hash of the picture asset %s does not agree with the PKL file.  This probably means that the asset file is corrupt."),
+                               std_to_wx(i.file()->filename().string()).data()
+                               );
+                       break;
+               case dcp::VerificationNote::PKL_CPL_PICTURE_HASHES_DISAGREE:
+                       text = _("The PKL and CPL hashes disagree for a picture asset.");
+                       break;
+               case dcp::VerificationNote::SOUND_HASH_INCORRECT:
+                       text = wxString::Format(
+                               _("The hash of the sound asset %s does not agree with the PKL file.  This probably means that the asset file is corrupt."),
+                               std_to_wx(i.file()->filename().string()).data()
+                               );
+                       break;
+               case dcp::VerificationNote::PKL_CPL_SOUND_HASHES_DISAGREE:
+                       text = _("The PKL and CPL hashes disagree for a sound asset.");
+                       break;
+               }
+
+               _text->WriteText (text);
                _text->Newline ();
 
                switch (i.type()) {
-               case dcp::VerificationNote::VERIFY_NOTE:
                case dcp::VerificationNote::VERIFY_WARNING:
                        _text->EndStandardBullet ();
                        break;