Fix message for high bitrate frames during verify.
authorCarl Hetherington <cth@carlh.net>
Mon, 12 Feb 2024 19:53:42 +0000 (20:53 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 12 Feb 2024 19:53:42 +0000 (20:53 +0100)
src/wx/verify_dcp_dialog.cc

index e86cb2c8002ce2728083115e20634c7c158e7998..2b108c9451de0f1b4c3bd3cb5d9680a01daf2e4d 100644 (file)
@@ -94,6 +94,14 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
                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<string>(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()));
                }
@@ -103,9 +111,6 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
                if (note.line()) {
                        message.Replace("%l", std_to_wx(dcp::raw_convert<string>(note.line().get())));
                }
-               if (note.frame()) {
-                       message.Replace("%frame", std_to_wx(dcp::raw_convert<string>(note.frame().get())));
-               }
                if (note.component()) {
                        message.Replace("%component", std_to_wx(dcp::raw_convert<string>(note.component().get())));
                }
@@ -179,7 +184,7 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> 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)"));