From: Carl Hetherington Date: Sat, 26 Aug 2017 19:47:16 +0000 (+0100) Subject: Add new_test_film2; disable auto audio analysis during tests. X-Git-Tag: v2.11.20~11 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=1f95e564b1faec3c12869896101e1188d672a2d6 Add new_test_film2; disable auto audio analysis during tests. --- diff --git a/test/test.cc b/test/test.cc index b02fa99c9..a2593dca4 100644 --- a/test/test.cc +++ b/test/test.cc @@ -32,6 +32,7 @@ #include "lib/encode_server_finder.h" #include "lib/image.h" #include "lib/ratio.h" +#include "lib/dcp_content_type.h" #include "lib/log_entry.h" #include #include @@ -87,6 +88,7 @@ struct TestConfig Config::instance()->set_default_interop (false); Config::instance()->set_default_still_length (10); Config::instance()->set_log_types (LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR); + Config::instance()->set_automatic_audio_analysis (false); EncodeServerFinder::instance()->stop (); @@ -124,6 +126,21 @@ new_test_film (string name) return film; } +shared_ptr +new_test_film2 (string name) +{ + boost::filesystem::path p = test_film_dir (name); + if (boost::filesystem::exists (p)) { + boost::filesystem::remove_all (p); + } + + shared_ptr film = shared_ptr (new Film (p)); + film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST")); + film->set_container (Ratio::from_id ("185")); + film->write_metadata (); + return film; +} + void check_wav_file (boost::filesystem::path ref, boost::filesystem::path check) { diff --git a/test/test.h b/test/test.h index bb70cd812..33807bee8 100644 --- a/test/test.h +++ b/test/test.h @@ -27,6 +27,7 @@ extern boost::filesystem::path private_data; extern bool wait_for_jobs (); extern boost::shared_ptr new_test_film (std::string); +extern boost::shared_ptr new_test_film2 (std::string); extern void check_dcp (boost::filesystem::path, boost::filesystem::path); extern void check_file (boost::filesystem::path ref, boost::filesystem::path check); extern void check_wav_file (boost::filesystem::path ref, boost::filesystem::path check);