Fix bad indentation in verify tool help.
[libdcp.git] / tools / dcpverify.cc
index db4b2bce9f72202e2bbefa624d52414d3a833e7e..6e8e5f0d87624cd24000b1f0f278b6a0ab7ab2d7 100644 (file)
 
 #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>
@@ -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] <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";
 }
@@ -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<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) {
@@ -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);