Supporters update.
[dcpomatic.git] / test / time_calculation_test.cc
index ffe77c2b786ec2aa98000a254cecf288fa5a6df2..7ace7f8c235c0eccce88b39eaa80271e1d1ba233 100644 (file)
@@ -36,7 +36,6 @@
 
 using std::list;
 using std::make_shared;
-using std::shared_ptr;
 using std::string;
 using namespace dcpomatic;
 
@@ -162,11 +161,11 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test)
 
        /* 24fps content, 24fps DCP */
        film->set_video_frame_rate (24);
-       content->set_video_frame_rate (24);
+       content->set_video_frame_rate(film, 24);
        BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(1).get());
        /* 25fps content, 25fps DCP */
        film->set_video_frame_rate (25);
-       content->set_video_frame_rate (25);
+       content->set_video_frame_rate(film, 25);
        BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(1).get());
        /* 25fps content, 24fps DCP; length should be increased */
        film->set_video_frame_rate (24);
@@ -197,24 +196,24 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        film->set_sequence (false);
        film->add_content (content);
 
-       auto player = make_shared<Player>(film);
+       auto player = make_shared<Player>(film, Image::Alignment::COMPACT);
 
        /* Position 0, no trim, content rate = DCP rate */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
-       shared_ptr<Piece> piece = player->_pieces.front ();
+       auto piece = player->_pieces.front();
        BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0);
        BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.5)), 12);
        BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (3.0)), 72);
 
        /* Position 3s, no trim, content rate = DCP rate */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -227,8 +226,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
 
        /* Position 3s, 1.5s trim, content rate = DCP rate */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -244,8 +243,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
           fast (at 25fps) in this case, this means 75 frames of content video will be used.
        */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -256,8 +255,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
 
        /* Position 3s, no trim, content rate 24, DCP rate 25 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -273,8 +272,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
           some of these results are not quite what you'd perhaps expect.
         */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.6));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -292,8 +291,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
           content rate = DCP rate case.
        */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -304,8 +303,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
 
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -318,8 +317,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
 
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -336,8 +335,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
           be used to make 3 * 24 frames of DCP video.
        */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (48);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -348,8 +347,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
 
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (48);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -362,8 +361,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
 
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (48);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -376,8 +375,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
 
        /* Position 0s, no trim, content rate 29.9978733, DCP rate 30 */
        content->set_position (film, DCPTime::from_seconds(0));
-       content->set_trim_start (ContentTime::from_seconds (0));
-       content->set_video_frame_rate (29.9978733);
+       content->set_trim_start(film, ContentTime::from_seconds (0));
+       content->set_video_frame_rate(film, 29.9978733);
        film->set_video_frame_rate (30);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -403,24 +402,24 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        film->set_sequence (false);
        film->add_content (content);
 
-       auto player = make_shared<Player>(film);
+       auto player = make_shared<Player>(film, Image::Alignment::COMPACT);
 
        /* Position 0, no trim, content rate = DCP rate */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
-       shared_ptr<Piece> piece = player->_pieces.front ();
+       auto piece = player->_pieces.front ();
        BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0).get(), 0);
        BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 12).get(), DCPTime::from_seconds(0.5).get());
        BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 72).get(), DCPTime::from_seconds(3.0).get());
 
        /* Position 3s, no trim, content rate = DCP rate */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -431,8 +430,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
 
        /* Position 3s, 1.5s trim, content rate = DCP rate */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -447,8 +446,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
           fast (at 25fps) in this case, this means 75 frames of content video will be used.
        */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -459,8 +458,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
 
        /* Position 3s, no trim, content rate 24, DCP rate 25 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -471,8 +470,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
 
        /* Position 3s, 1.6s trim, content rate 24, DCP rate 25, so the 1.6s trim is at 24fps */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.6));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -489,8 +488,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
           content rate = DCP rate case.
        */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -501,8 +500,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
 
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -513,8 +512,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
 
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -530,8 +529,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
           be used to make 3 * 24 frames of DCP video.
        */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (48);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -542,8 +541,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
 
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (48);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -554,8 +553,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
 
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (48);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U);
@@ -580,12 +579,12 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        film->set_sequence (false);
        film->add_content (content);
 
-       auto player = make_shared<Player>(film);
+       auto player = make_shared<Player>(film, Image::Alignment::COMPACT);
 
        /* Position 0, no trim, video/audio content rate = video/audio DCP rate */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -597,8 +596,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, no trim, video/audio content rate = video/audio DCP rate */
        content->set_position (film, DCPTime::from_seconds (3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -612,8 +611,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, 1.5s trim, video/audio content rate = video/audio DCP rate */
        content->set_position (film, DCPTime::from_seconds (3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -627,8 +626,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 0, no trim, content video rate 24, DCP video rate 25, both audio rates still 48k */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -640,8 +639,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, no trim, content video rate 24, DCP rate 25, both audio rates still 48k. */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -657,8 +656,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
           1s of content is 46080 samples after resampling.
        */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.6));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -676,8 +675,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
           The results should be the same as the content rate = DCP rate case.
        */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (48);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -689,8 +688,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -704,8 +703,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -722,8 +721,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
           with skipped frames in this case, audio samples should map straight through.
        */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (48);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -735,8 +734,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -750,8 +749,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -765,8 +764,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 0, no trim, video content rate = video DCP rate, content audio rate = 44.1k */
        content->set_position (film, DCPTime());
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -778,8 +777,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, no trim, video content rate = video DCP rate, content audio rate = 44.1k */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime());
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -793,8 +792,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Position 3s, 1.5s trim, video content rate = video DCP rate, content audio rate = 44.1k */
        content->set_position (film, DCPTime::from_seconds(3));
-       content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(1.5));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -808,8 +807,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        /* Check with a large start trim */
        content->set_position (film, DCPTime::from_seconds(0));
-       content->set_trim_start (ContentTime::from_seconds (54143));
-       content->set_video_frame_rate (24);
+       content->set_trim_start(film, ContentTime::from_seconds(54143));
+       content->set_video_frame_rate(film, 24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();