X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fffmpeg_encoder_test.cc;h=aab3fd8ef1c20b2afa2b834b04ec4178ddbea722;hb=369821c41e62d4cce506cd4206f9db0d91b4f643;hp=7a967b2009e06b4e7c2317029a253619c6fff27d;hpb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;p=dcpomatic.git diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc index 7a967b200..aab3fd8ef 100644 --- a/test/ffmpeg_encoder_test.cc +++ b/test/ffmpeg_encoder_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2017-2019 Carl Hetherington + Copyright (C) 2017-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -36,12 +36,15 @@ using std::string; using std::shared_ptr; +using std::make_shared; using boost::optional; using namespace dcpomatic; static void ffmpeg_content_test (int number, boost::filesystem::path content, ExportFormat format) { + Cleanup cl; + string name = "ffmpeg_encoder_"; string extension; switch (format) { @@ -60,19 +63,22 @@ ffmpeg_content_test (int number, boost::filesystem::path content, ExportFormat f name = String::compose("%1_test%2", name, number); - shared_ptr film = new_test_film (name); + shared_ptr film = new_test_film2 (name, &cl); film->set_name (name); - shared_ptr c (new FFmpegContent(content)); - film->set_container (Ratio::from_id ("185")); + auto c = make_shared(content); film->set_audio_channels (6); film->examine_and_add_content (c); BOOST_REQUIRE (!wait_for_jobs ()); film->write_metadata (); - shared_ptr job (new TranscodeJob (film)); - FFmpegEncoder encoder (film, job, String::compose("build/test/%1.%2", name, extension), format, false, false, false, 23); + auto job = make_shared(film); + auto file = boost::filesystem::path("build") / "test" / String::compose("%1.%2", name, extension); + cl.add (file); + FFmpegEncoder encoder (film, job, file, format, false, false, false, 23); encoder.go (); + + cl.run (); } /** Red / green / blue MP4 -> Prores */ @@ -102,7 +108,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test4) /** Still image -> Prores */ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test5) { - shared_ptr film = new_test_film ("ffmpeg_encoder_prores_test5"); + auto film = new_test_film ("ffmpeg_encoder_prores_test5"); film->set_name ("ffmpeg_encoder_prores_test5"); shared_ptr c (new ImageContent(TestPaths::private_data() / "bbc405.png")); film->set_container (Ratio::from_id ("185"));