Add verify_dcp().
authorCarl Hetherington <cth@carlh.net>
Fri, 17 Feb 2023 23:15:10 +0000 (00:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 May 2023 06:54:58 +0000 (08:54 +0200)
test/test.cc
test/test.h

index c91701e558ce1302c4fd32c60d54848c780f674d..354a79e26cb60a8dc9df1ee4ba4043feed9cb487 100644 (file)
@@ -937,12 +937,9 @@ void progress (float) {}
 
 
 void
-make_and_verify_dcp (shared_ptr<Film> film, vector<dcp::VerificationNote::Code> ignore)
+verify_dcp(boost::filesystem::path dir, vector<dcp::VerificationNote::Code> ignore)
 {
-       film->write_metadata ();
-       make_dcp (film, TranscodeJob::ChangedBehaviour::IGNORE);
-       BOOST_REQUIRE (!wait_for_jobs());
-       auto notes = dcp::verify({film->dir(film->dcp_name())}, &stage, &progress, {}, TestPaths::xsd());
+       auto notes = dcp::verify({dir}, &stage, &progress, {}, TestPaths::xsd());
        bool ok = true;
        for (auto i: notes) {
                if (find(ignore.begin(), ignore.end(), i.code()) == ignore.end()) {
@@ -954,6 +951,16 @@ make_and_verify_dcp (shared_ptr<Film> film, vector<dcp::VerificationNote::Code>
 }
 
 
+void
+make_and_verify_dcp (shared_ptr<Film> film, vector<dcp::VerificationNote::Code> ignore)
+{
+       film->write_metadata ();
+       make_dcp (film, TranscodeJob::ChangedBehaviour::IGNORE);
+       BOOST_REQUIRE (!wait_for_jobs());
+       verify_dcp({film->dir(film->dcp_name())}, ignore);
+}
+
+
 void
 check_int_close (int a, int b, int d)
 {
index 8399abf9a3656687b83f90ba2cc295f68615344f..01ddb19874e525ced470ae9c029a1af8261d528c 100644 (file)
@@ -75,6 +75,7 @@ boost::filesystem::path dcp_file (std::shared_ptr<const Film> film, std::string
 void check_one_frame (boost::filesystem::path dcp, int64_t index, boost::filesystem::path ref);
 extern boost::filesystem::path subtitle_file (std::shared_ptr<Film> film);
 extern void make_random_file (boost::filesystem::path path, size_t size);
+extern void verify_dcp(boost::filesystem::path dir, std::vector<dcp::VerificationNote::Code> ignore);
 extern void make_and_verify_dcp (std::shared_ptr<Film> film, std::vector<dcp::VerificationNote::Code> ignore = {});
 extern void check_int_close (int a, int b, int d);
 extern void check_int_close (std::pair<int, int>, std::pair<int, int>, int d);