#include "common.h"
#include "compose.hpp"
+#include "filesystem.h"
#include "raw_convert.h"
#include "verify.h"
#include "version.h"
-#include <boost/bind.hpp>
-#include <boost/optional.hpp>
+#include <boost/bind/bind.hpp>
#include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
#include <getopt.h>
#include <iostream>
#include <cstdlib>
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] <DCP>\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 <size-in-MB> only check hashes for assets smaller than this size (in MB)\n"
<< " -q, --quiet don't report progress\n";
}
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);
}
vector<boost::filesystem::path> 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) {
}
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);