X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fframe_rate_test.cc;h=d54868b3fbde8ca6ee4ec921cd6fdd6c25b12d17;hb=HEAD;hp=2a0aa9415546386e74eaade3d75226fdad96bc56;hpb=8611fc8597605aa51373adb4fc8f0c697b8c7360;p=dcpomatic.git diff --git a/test/frame_rate_test.cc b/test/frame_rate_test.cc index 2a0aa9415..d54868b3f 100644 --- a/test/frame_rate_test.cc +++ b/test/frame_rate_test.cc @@ -18,33 +18,35 @@ */ + /** @file test/frame_rate_test.cc * @brief Tests for FrameRateChange and the computation of the best * frame rate for the DCP. * @ingroup feature */ -#include -#include "lib/film.h" + +#include "lib/audio_content.h" #include "lib/config.h" -#include "lib/ffmpeg_content.h" -#include "lib/playlist.h" #include "lib/ffmpeg_audio_stream.h" +#include "lib/ffmpeg_content.h" +#include "lib/film.h" #include "lib/frame_rate_change.h" +#include "lib/playlist.h" #include "lib/video_content.h" -#include "lib/audio_content.h" #include "test.h" +#include + -using boost::shared_ptr; /* Test Playlist::best_dcp_frame_rate and FrameRateChange with a single piece of content. */ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) { - shared_ptr film = new_test_film ("best_dcp_frame_rate_test_single"); + auto film = new_test_film("best_dcp_frame_rate_test_single"); /* Get any piece of content, it doesn't matter what */ - shared_ptr content (new FFmpegContent("test/data/test.mp4")); + auto content = std::make_shared("test/data/test.mp4"); film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs()); @@ -58,7 +60,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) content->_video_frame_rate = 60; int best = film->best_video_frame_rate (); - FrameRateChange frc = FrameRateChange (60, best); + auto frc = FrameRateChange(60, best); BOOST_CHECK_EQUAL (best, 30); BOOST_CHECK_EQUAL (frc.skip, true); BOOST_CHECK_EQUAL (frc.repeat, 1); @@ -220,11 +222,11 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) */ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_double) { - shared_ptr film = new_test_film ("best_dcp_frame_rate_test_double"); + auto film = new_test_film("best_dcp_frame_rate_test_double"); /* Get any old content, it doesn't matter what */ - shared_ptr A (new FFmpegContent("test/data/test.mp4")); + auto A = std::make_shared("test/data/test.mp4"); film->examine_and_add_content (A); - shared_ptr B (new FFmpegContent("test/data/test.mp4")); + auto B = std::make_shared("test/data/test.mp4"); film->examine_and_add_content (B); BOOST_REQUIRE (!wait_for_jobs()); @@ -251,9 +253,9 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_double) BOOST_AUTO_TEST_CASE (audio_sampling_rate_test) { - shared_ptr film = new_test_film ("audio_sampling_rate_test"); + auto film = new_test_film("audio_sampling_rate_test"); /* Get any piece of content, it doesn't matter what */ - shared_ptr content (new FFmpegContent("test/data/test.mp4")); + auto content = std::make_shared("test/data/test.mp4"); film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs()); @@ -263,7 +265,7 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test) afr.push_back (30); Config::instance()->set_allowed_dcp_frame_rates (afr); - shared_ptr stream (new FFmpegAudioStream ("foo", 0, 0, 0, 0)); + auto stream = std::make_shared("foo", 0, 0, 0, 0, 0); content->audio.reset (new AudioContent (content.get())); content->audio->add_stream (stream); content->_video_frame_rate = 24;