#include "verify_dcp_dialog.h"
#include "wx_util.h"
#include "lib/verify_dcp_job.h"
+#include "lib/warnings.h"
#include <dcp/verify.h>
+DCPOMATIC_DISABLE_WARNINGS
#include <wx/richtext/richtextctrl.h>
+DCPOMATIC_ENABLE_WARNINGS
#include <boost/foreach.hpp>
using std::list;
-using boost::shared_ptr;
+using std::shared_ptr;
VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job)
: wxDialog (parent, wxID_ANY, _("DCP verification"))
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()
+ std_to_wx(i.file()->filename().string())
);
break;
case dcp::VerificationNote::PKL_CPL_PICTURE_HASHES_DISAGREE:
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()
+ std_to_wx(i.file()->filename().string())
);
break;
case dcp::VerificationNote::PKL_CPL_SOUND_HASHES_DISAGREE:
text = _("The PKL and CPL hashes disagree for a sound asset.");
break;
+ case dcp::VerificationNote::EMPTY_ASSET_PATH:
+ text = _("An asset has an empty path in the ASSETMAP.");
+ break;
+ case dcp::VerificationNote::MISSING_ASSET:
+ text = _("An asset is missing.");
+ break;
+ case dcp::VerificationNote::MISMATCHED_STANDARD:
+ text = _("Parts of the DCP are written according to the Interop standard and parts according to SMPTE.");
+ break;
+ case dcp::VerificationNote::XML_VALIDATION_ERROR:
+ if (i.line()) {
+ text = wxString::Format(
+ _("The XML in %s is malformed on line %" PRIu64 "."),
+ std_to_wx(i.file()->filename().string()),
+ i.line().get()
+ );
+ } else {
+ text = wxString::Format(
+ _("The XML in %s is malformed."),
+ std_to_wx(i.file()->filename().string())
+ );
+ }
+ break;
+ case dcp::VerificationNote::MISSING_ASSETMAP:
+ text = _("No ASSETMAP or ASSETMAP.xml file was found.");
+ break;
+ case dcp::VerificationNote::INTRINSIC_DURATION_TOO_SMALL:
+ text = _("An asset has an instrinsic duration of less than 1 second, which is invalid.");
+ break;
+ case dcp::VerificationNote::DURATION_TOO_SMALL:
+ text = _("An asset has a duration of less than 1 second, which is invalid.");
+ break;
+ case dcp::VerificationNote::PICTURE_FRAME_TOO_LARGE:
+ text = _("At least one frame of the video data is over the limit of 250Mbit/s.");
+ break;
+ case dcp::VerificationNote::PICTURE_FRAME_NEARLY_TOO_LARGE:
+ text = _("At least one frame of the video data is close to the limit of 250MBit/s.");
+ break;
+ case dcp::VerificationNote::EXTERNAL_ASSET:
+ text = _("This DCP refers to at least one asset in another DCP, so it is a \"version file\" (VF)");
+ break;
}
_text->WriteText (text);