diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-08-26 20:47:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-08-26 20:47:16 +0100 |
| commit | 1f95e564b1faec3c12869896101e1188d672a2d6 (patch) | |
| tree | e66792bcfd8fd8cfdd1d6f8668ffdbe9ffe46b83 | |
| parent | a5f9f8163ecb38a140cf623e141bea1d96866fe5 (diff) | |
Add new_test_film2; disable auto audio analysis during tests.
| -rw-r--r-- | test/test.cc | 17 | ||||
| -rw-r--r-- | test/test.h | 1 |
2 files changed, 18 insertions, 0 deletions
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 <dcp/dcp.h> #include <asdcp/AS_DCP.h> @@ -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<Film> +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> film = shared_ptr<Film> (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<Film> new_test_film (std::string); +extern boost::shared_ptr<Film> 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); |
