X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Finterrupt_encoder_test.cc;h=2e839336d9ec8458e8384922ff394d2a5e727d1c;hb=341ba1115b6285fec998901e50f9afb48bcaeeb6;hp=e146d2916f63f8f3931e4a1faeb5e7935e2b7ffd;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;p=dcpomatic.git diff --git a/test/interrupt_encoder_test.cc b/test/interrupt_encoder_test.cc index e146d2916..2e839336d 100644 --- a/test/interrupt_encoder_test.cc +++ b/test/interrupt_encoder_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016 Carl Hetherington + Copyright (C) 2016-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,38 +18,44 @@ */ + /** @file test/interrupt_encoder_test.cc * @brief Test clean shutdown of threads if a DCP encode is interrupted. * @ingroup feature */ -#include "lib/film.h" + +#include "lib/audio_content.h" +#include "lib/cross.h" #include "lib/dcp_content_type.h" -#include "lib/ratio.h" #include "lib/ffmpeg_content.h" -#include "lib/audio_content.h" +#include "lib/film.h" #include "lib/job_manager.h" -#include "lib/cross.h" +#include "lib/make_dcp.h" +#include "lib/ratio.h" #include "test.h" #include + +using std::make_shared; using std::shared_ptr; + /** Interrupt a DCP encode when it is in progress, as this used to (still does?) * sometimes give an error related to pthreads. */ BOOST_AUTO_TEST_CASE (interrupt_encoder_test) { - shared_ptr film = new_test_film ("interrupt_encoder_test"); - film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR")); - film->set_container (Ratio::from_id ("185")); + auto film = new_test_film ("interrupt_encoder_test"); + film->set_dcp_content_type (DCPContentType::from_isdcf_name("FTR")); + film->set_container (Ratio::from_id("185")); film->set_name ("interrupt_encoder_test"); - shared_ptr content (new FFmpegContent(TestPaths::private_data() / "prophet_long_clip.mkv")); + auto content = make_shared(TestPaths::private_data() / "prophet_long_clip.mkv"); film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs()); - film->make_dcp (); + make_dcp (film, TranscodeJob::ChangedBehaviour::IGNORE); dcpomatic_sleep_seconds (10);