Fix some confusions with FFmpeg audio streams.
[dcpomatic.git] / test / time_calculation_test.cc
index 9f91be584b88c2e4b2ff06194329e58514f84a01..7f13e6c0e64320f1dc7214153b90e063a1a7a855 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2015-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -19,7 +19,9 @@
 
 #include "lib/film.h"
 #include "lib/ffmpeg_content.h"
+#include "lib/video_content.h"
 #include "lib/player.h"
+#include "lib/audio_content.h"
 #include "test.h"
 #include <boost/test/unit_test.hpp>
 
@@ -127,19 +129,19 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test)
 
        /* 25fps content, 25fps DCP */
        film->set_video_frame_rate (25);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video_length() / 25.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 25.0));
        /* 25fps content, 24fps DCP; length should be increased */
        film->set_video_frame_rate (24);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video_length() / 24.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 24.0));
        /* 25fps content, 30fps DCP; length should be decreased */
        film->set_video_frame_rate (30);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video_length() / 30.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 30.0));
        /* 25fps content, 50fps DCP; length should be the same */
        film->set_video_frame_rate (50);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video_length() / 25.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 25.0));
        /* 25fps content, 60fps DCP; length should be decreased */
        film->set_video_frame_rate (60);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video_length() * (50.0 / 60) / 25.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() * (50.0 / 60) / 25.0));
 }
 
 /** Test Player::dcp_to_content_video */
@@ -152,7 +154,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
 
        list<string> notes;
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, doc, film->state_version(), notes));
-       film->set_sequence_video (false);
+       film->set_sequence (false);
        film->add_content (content);
 
        shared_ptr<Player> player (new Player (film, film->playlist ()));
@@ -160,7 +162,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 0, no trim, content rate = DCP rate */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -172,7 +174,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, no trim, content rate = DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -186,7 +188,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, 1.5s trim, content rate = DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -203,7 +205,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -215,7 +217,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, no trim, content rate 24, DCP rate 25 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -231,7 +233,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
         */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -250,7 +252,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -262,7 +264,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -276,7 +278,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -294,7 +296,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -306,7 +308,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -320,7 +322,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -330,6 +332,21 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (3.00)),  72);
        BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (4.50)), 144);
        BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (9.75)), 396);
+
+       /* Position 0s, no trim, content rate 29.9978733, DCP rate 30 */
+       content->set_position (DCPTime::from_seconds (0));
+       content->set_trim_start (ContentTime::from_seconds (0));
+       content->video->set_frame_rate (29.9978733);
+       film->set_video_frame_rate (30);
+       player->setup_pieces ();
+       BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
+       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 (3200)), 1);
+       BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime (6400)), 2);
+       BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime (9600)), 3);
+       BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime (12800)), 4);
+
 }
 
 /** Test Player::content_video_to_dcp */
@@ -342,7 +359,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
 
        list<string> notes;
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, doc, film->state_version(), notes));
-       film->set_sequence_video (false);
+       film->set_sequence (false);
        film->add_content (content);
 
        shared_ptr<Player> player (new Player (film, film->playlist ()));
@@ -350,7 +367,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 0, no trim, content rate = DCP rate */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -362,7 +379,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, no trim, content rate = DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -374,7 +391,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, 1.5s trim, content rate = DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -390,7 +407,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -402,7 +419,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, no trim, content rate 24, DCP rate 25 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -414,7 +431,7 @@ 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 (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -432,7 +449,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -444,7 +461,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -456,7 +473,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -473,7 +490,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -485,7 +502,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -497,7 +514,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -518,8 +535,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
 
        list<string> notes;
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, doc, film->state_version(), notes));
-       AudioStreamPtr stream = content->audio_streams().front();
-       film->set_sequence_video (false);
+       AudioStreamPtr stream = content->audio->streams().front();
+       film->set_sequence (false);
        film->add_content (content);
 
        shared_ptr<Player> player (new Player (film, film->playlist ()));
@@ -527,7 +544,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 0, no trim, video/audio content rate = video/audio DCP rate */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -540,7 +557,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, no trim, video/audio content rate = video/audio DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -555,7 +572,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, 1.5s trim, video/audio content rate = video/audio DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -570,7 +587,7 @@ 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 (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -583,7 +600,7 @@ 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 (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -600,7 +617,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -619,7 +636,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -632,7 +649,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -647,7 +664,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -665,7 +682,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -678,7 +695,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -693,7 +710,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -708,7 +725,7 @@ 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 (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -721,7 +738,7 @@ 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 (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -736,7 +753,7 @@ 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 (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -751,7 +768,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Check with a large start trim */
        content->set_position (DCPTime::from_seconds (0));
        content->set_trim_start (ContentTime::from_seconds (54143));
-       content->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();