Use all cores when encoding in tests.
authorCarl Hetherington <cth@carlh.net>
Fri, 6 Dec 2024 20:27:13 +0000 (21:27 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 9 Dec 2024 00:40:48 +0000 (01:40 +0100)
I think this also avoids the possibility of setting the master encoding
thread count to 0 by mistake on machines that don't have many cores.

test/test.cc
test/threed_test.cc

index 11b2c54b75e17c31fe50e080259969e7c16afbb1..fe02867998711e41409efc2b576c54a782311b89 100644 (file)
@@ -117,7 +117,7 @@ boost::filesystem::path TestPaths::xsd ()
 static void
 setup_test_config ()
 {
-       Config::instance()->set_master_encoding_threads (boost::thread::hardware_concurrency() / 2);
+       Config::instance()->set_master_encoding_threads(boost::thread::hardware_concurrency());
        Config::instance()->set_server_encoding_threads (1);
        Config::instance()->set_server_port_base (61921);
        Config::instance()->set_default_audio_delay (0);
index 13bdf3fa0dfc3382be3672f7f3d616e67ab60299..27dd12cbe1875ff15383fd529735288a71efce88 100644 (file)
@@ -106,9 +106,6 @@ BOOST_AUTO_TEST_CASE (threed_test4)
 {
        ConfigRestorer cr;
 
-       /* Try to stop out-of-memory crashes on my laptop */
-       Config::instance()->set_master_encoding_threads (boost::thread::hardware_concurrency() / 4);
-
        auto film = new_test_film("threed_test4");
        auto L = make_shared<FFmpegContent>(TestPaths::private_data() / "LEFT_TEST_DCP3D4K.mov");
        film->examine_and_add_content (L);