X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fverify_dcp_dialog.cc;h=c77f68ea1dc2c7ea1baec1cbbf064d89cfa3963d;hb=HEAD;hp=0871b864e7bf27c62f991acb166e212cfeb44f87;hpb=5bcf273dc773cf068791df959f3365866f39e433;p=dcpomatic.git diff --git a/src/wx/verify_dcp_dialog.cc b/src/wx/verify_dcp_dialog.cc index 0871b864e..c7a32e5dd 100644 --- a/src/wx/verify_dcp_dialog.cc +++ b/src/wx/verify_dcp_dialog.cc @@ -88,6 +88,20 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr job }; auto add = [&counts, &add_bullet](dcp::VerificationNote note, wxString message) { + if (note.reference_hash()) { + message.Replace("%reference_hash", std_to_wx(note.reference_hash().get())); + } + if (note.calculated_hash()) { + message.Replace("%calculated_hash", std_to_wx(note.calculated_hash().get())); + } + if (note.frame()) { + message.Replace("%frame", std_to_wx(dcp::raw_convert(note.frame().get()))); + message.Replace( + "%timecode", + std_to_wx( + dcp::Time(note.frame().get(), note.frame_rate().get(), note.frame_rate().get()).as_string(dcp::Standard::SMPTE) + )); + } if (note.note()) { message.Replace("%n", std_to_wx(note.note().get())); } @@ -97,9 +111,6 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr job if (note.line()) { message.Replace("%l", std_to_wx(dcp::raw_convert(note.line().get()))); } - if (note.frame()) { - message.Replace("%frame", std_to_wx(dcp::raw_convert(note.frame().get()))); - } if (note.component()) { message.Replace("%component", std_to_wx(dcp::raw_convert(note.component().get()))); } @@ -119,27 +130,28 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr job if (job->finished_in_error() && job->error_summary() != "") { /* We have an error that did not come from dcp::verify */ add_bullet (dcp::VerificationNote::Type::ERROR, std_to_wx(job->error_summary())); + ++counts[dcp::VerificationNote::Type::ERROR]; } for (auto i: job->notes()) { switch (i.code()) { case dcp::VerificationNote::Code::FAILED_READ: - add (i, std_to_wx(*i.note())); + add (i, _("Could not read DCP (%n)")); break; case dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES: - add(i, _("The hash of the CPL %n in the PKL does not agree with the CPL file. This probably means that the CPL file is corrupt.")); + add(i, _("The hash (%reference_hash) of the CPL %n in the PKL does not agree with the CPL file (%calculated_hash). This probably means that the CPL file is corrupt.")); break; case dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE: add(i, _("The picture in a reel has a frame rate of %n, which is not valid.")); break; case dcp::VerificationNote::Code::INCORRECT_PICTURE_HASH: - add(i, _("The hash of the picture asset %f does not agree with the PKL file. This probably means that the asset file is corrupt.")); + add(i, _("The hash (%calculated_hash) of the picture asset %f does not agree with the PKL file (%reference_hash). This probably means that the asset file is corrupt.")); break; case dcp::VerificationNote::Code::MISMATCHED_PICTURE_HASHES: add(i, _("The PKL and CPL hashes disagree for picture asset %f.")); break; case dcp::VerificationNote::Code::INCORRECT_SOUND_HASH: - add(i, _("The hash of the sound asset %f does not agree with the PKL file. This probably means that the asset file is corrupt.")); + add(i, _("The hash (%calculated_hash) of the sound asset %f does not agree with the PKL file (%reference_hash). This probably means that the asset file is corrupt.")); break; case dcp::VerificationNote::Code::MISMATCHED_SOUND_HASHES: add(i, _("The PKL and CPL hashes disagree for sound asset %f.")); @@ -173,7 +185,7 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr job add(i, _("At least one frame of the video asset %f is over the limit of 250Mbit/s.")); break; case dcp::VerificationNote::Code::NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES: - add(i, _("At least one frame of the video asset %f is close to the limit of 250MBit/s.")); + add(i, _("Frame %frame (timecode %timecode) in asset %f has an instantaneous bit rate that is close to the limit of 250Mbit/s.")); break; case dcp::VerificationNote::Code::EXTERNAL_ASSET: add(i, _("This DCP refers to at the asset %n in another DCP (and perhaps others), so it is a \"version file\" (VF)")); @@ -429,11 +441,20 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr job add(i, _("A subtitle or closed caption refers to a font with ID %id that does not have a corresponding node.")); break; case dcp::VerificationNote::Code::MISSING_LOAD_FONT: - add(i, "The SMPTE subtitle asset %id has nodes but no node"); + add(i, _("The SMPTE subtitle asset %id has nodes but no node")); break; case dcp::VerificationNote::Code::MISMATCHED_ASSET_MAP_ID: add(i, _("The asset with ID %id in the asset map actually has an id of %other_id")); break; + case dcp::VerificationNote::Code::EMPTY_CONTENT_VERSION_LABEL_TEXT: + add(i, _("The in a in CPL %id is empty")); + break; + case dcp::VerificationNote::Code::INVALID_CPL_NAMESPACE: + add(i, _("The CPL %f has an invalid namespace %n")); + break; + case dcp::VerificationNote::Code::MISSING_CPL_CONTENT_VERSION: + add(i, _("The CPL %n has no tag")); + break; } }