# Run dcpverify on all the DCPs in private/metadata
for d in `find $private/metadata -mindepth 1 -maxdepth 1 -type d | sort -f -d`; do
if [ `basename $d` != ".git" ]; then
- $dcpverify --ignore-missing-assets -q $d
+ $dcpverify --ignore-missing-assets --ignore-bv21-smpte -q $d
if [ "$?" != "0" ]; then
echo "FAIL: dcpverify failed for $d"
exit 1
notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what())));
}
+ if (dcp->standard() != dcp::SMPTE) {
+ notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::NOT_SMPTE));
+ }
+
BOOST_FOREACH (shared_ptr<CPL> cpl, dcp->cpls()) {
stage ("Checking CPL", cpl->file());
validate_xml (cpl->file().get(), xsd_dtd_directory, notes);
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:
+ return "This DCP does not use the SMPTE standard, which is required for Bv2.1 compliance.";
}
return "";
PICTURE_FRAME_NEARLY_TOO_LARGE,
/** 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,
};
VerificationNote (Type type, Code code)
vector<boost::filesystem::path> directories;
directories.push_back (path);
list<dcp::VerificationNote> notes = dcp::verify (directories, &stage, &progress, xsd_test);
+ for (list<dcp::VerificationNote>::iterator i = notes.begin(); i != notes.end(); ) {
+ list<dcp::VerificationNote>::iterator tmp = i;
+ ++tmp;
+ if (i->code() == dcp::VerificationNote::NOT_SMPTE) {
+ notes.erase (i);
+ }
+ i = tmp;
+ }
dump_notes (notes);
BOOST_CHECK (notes.empty());
}
++st;
BOOST_REQUIRE (st == stages.end());
- BOOST_CHECK_EQUAL (notes.size(), 0);
+ BOOST_REQUIRE_EQUAL (notes.size(), 1U);
+ list<dcp::VerificationNote>::const_iterator i = notes.begin ();
+ BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::VERIFY_BV21_ERROR);
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
}
/* DCP with a short asset */
vector<boost::filesystem::path> directories = setup (8, 14);
list<dcp::VerificationNote> notes = dcp::verify (directories, &stage, &progress, xsd_test);
- BOOST_REQUIRE_EQUAL (notes.size(), 4);
+ BOOST_REQUIRE_EQUAL (notes.size(), 5);
list<dcp::VerificationNote>::const_iterator i = notes.begin ();
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
+ ++i;
BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::DURATION_TOO_SMALL);
++i;
BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::INTRINSIC_DURATION_TOO_SMALL);
vector<boost::filesystem::path> dirs;
dirs.push_back (dir);
list<dcp::VerificationNote> notes = dcp::verify (dirs, &stage, &progress, xsd_test);
- BOOST_REQUIRE_EQUAL (notes.size(), 0);
+ BOOST_REQUIRE_EQUAL (notes.size(), 1U);
+ list<dcp::VerificationNote>::const_iterator i = notes.begin ();
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
}
vector<boost::filesystem::path> dirs;
dirs.push_back (dir);
list<dcp::VerificationNote> notes = dcp::verify (dirs, &stage, &progress, xsd_test);
- BOOST_REQUIRE_EQUAL (notes.size(), 2);
- BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
- BOOST_CHECK_EQUAL (notes.back().code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ BOOST_REQUIRE_EQUAL (notes.size(), 3);
+ list<dcp::VerificationNote>::const_iterator i = notes.begin ();
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
+ ++i;
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ ++i;
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ ++i;
}
<< " -V, --version show libdcp version\n"
<< " -h, --help show this help\n"
<< " --ignore-missing-assets don't give errors about missing assets\n"
+ << " --ignore-bv21-smpte don't give the SMPTE Bv2.1 error about a DCP not being SMPTE\n"
<< " -q, --quiet don't report progress\n";
}
dcp::init ();
bool ignore_missing_assets = false;
+ bool ignore_bv21_smpte = false;
bool quiet = false;
int option_index = 0;
{ "version", no_argument, 0, 'V' },
{ "help", no_argument, 0, 'h' },
{ "ignore-missing-assets", no_argument, 0, 'A' },
+ { "ignore-bv21-smpte", no_argument, 0, 'B' },
{ "quiet", no_argument, 0, 'q' },
{ 0, 0, 0, 0 }
};
- int c = getopt_long (argc, argv, "VhAq", long_options, &option_index);
+ int c = getopt_long (argc, argv, "VhABq", long_options, &option_index);
if (c == -1) {
break;
case 'A':
ignore_missing_assets = true;
break;
+ case 'B':
+ ignore_bv21_smpte = true;
+ break;
case 'q':
quiet = true;
break;
bool failed = false;
BOOST_FOREACH (dcp::VerificationNote i, notes) {
+ if (ignore_bv21_smpte && i.code() == dcp::VerificationNote::NOT_SMPTE) {
+ continue;
+ }
switch (i.type()) {
case dcp::VerificationNote::VERIFY_ERROR:
cout << "Error: " << note_to_string(i) << "\n";