X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=tools%2Fdcpverify.cc;h=6e8e5f0d87624cd24000b1f0f278b6a0ab7ab2d7;hb=9139fb8bd816eb82defcd799403c42afdeb255b8;hp=db4b2bce9f72202e2bbefa624d52414d3a833e7e;hpb=4d86fd0dbb6a29a233577803c5541e962d4d58ef;p=libdcp.git diff --git a/tools/dcpverify.cc b/tools/dcpverify.cc index db4b2bce..6e8e5f0d 100644 --- a/tools/dcpverify.cc +++ b/tools/dcpverify.cc @@ -34,12 +34,13 @@ #include "common.h" #include "compose.hpp" +#include "filesystem.h" #include "raw_convert.h" #include "verify.h" #include "version.h" -#include -#include +#include #include +#include #include #include #include @@ -52,17 +53,20 @@ using std::string; using std::vector; using boost::bind; using boost::optional; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif static void help (string n) { cerr << "Syntax: " << n << " [OPTION] \n" - << " -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" - << " --no-asset-hash-check don't check asset hashes\n" + << " -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" + << " --no-asset-hash-check don't check asset hashes\n" << " --asset-hash-check-maximum-size only check hashes for assets smaller than this size (in MB)\n" << " -q, --quiet don't report progress\n"; } @@ -130,7 +134,7 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } - if (!boost::filesystem::exists (argv[optind])) { + if (!dcp::filesystem::exists(argv[optind])) { cerr << argv[0] << ": DCP " << argv[optind] << " not found.\n"; exit (EXIT_FAILURE); } @@ -169,7 +173,7 @@ main (int argc, char* argv[]) vector directories; directories.push_back (argv[optind]); - auto notes = dcp::verify(directories, stage, progress, verification_options); + auto notes = dcp::verify(directories, {}, stage, progress, verification_options); dcp::filter_notes (notes, ignore_missing_assets); if (!quiet) { @@ -200,10 +204,15 @@ main (int argc, char* argv[]) } if (!failed && !quiet) { - if (bv21_failed || warned) { - cout << "\n"; + if (bv21_failed && warned) { + cout << "\nDCP verified OK (but with Bv2.1 errors and warnings).\n"; + } else if (bv21_failed) { + cout << "\nDCP verified OK (but with Bv2.1 errors).\n"; + } else if (warned) { + cout << "\nDCP verified OK (but with warnings).\n"; + } else { + cout << "DCP verified OK.\n"; } - cout << "DCP verified OK.\n"; } exit (failed ? EXIT_FAILURE : EXIT_SUCCESS);