Add new_test_film2; disable auto audio analysis during tests.
authorCarl Hetherington <cth@carlh.net>
Sat, 26 Aug 2017 19:47:16 +0000 (20:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 26 Aug 2017 19:47:16 +0000 (20:47 +0100)
test/test.cc
test/test.h

index b02fa99c95bb50a3591022f28b446eed06f486c0..a2593dca48c70879cb9b56576799d154acbc6410 100644 (file)
@@ -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)
 {
index bb70cd8124f95cb53a46c6de123a103c5df1ab4c..33807bee8e56d62d8087a69dabaf6eecaff79e75 100644 (file)
@@ -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);