summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-11-21 01:59:04 +0000
committerCarl Hetherington <cth@carlh.net>2018-11-21 01:59:04 +0000
commit254b3044d72de6b033d7c584f5abd2b9aa70aad5 (patch)
tree8a5c83c1b2dea690672663dedb2f3aa50f4473dc /test
parentc31b9542c58ae1cbfae7ec3ba4911359fd010ba2 (diff)
Take Film pointer out of Content.
Diffstat (limited to 'test')
-rw-r--r--test/4k_test.cc2
-rw-r--r--test/audio_analysis_test.cc12
-rw-r--r--test/audio_delay_test.cc2
-rw-r--r--test/audio_processor_test.cc2
-rw-r--r--test/butler_test.cc4
-rw-r--r--test/closed_caption_test.cc8
-rw-r--r--test/content_test.cc12
-rw-r--r--test/dcp_playback_test.cc2
-rw-r--r--test/dcp_subtitle_test.cc26
-rw-r--r--test/digest_test.cc6
-rw-r--r--test/empty_test.cc20
-rw-r--r--test/ffmpeg_audio_only_test.cc2
-rw-r--r--test/ffmpeg_audio_test.cc6
-rw-r--r--test/ffmpeg_dcp_test.cc2
-rw-r--r--test/ffmpeg_decoder_seek_test.cc13
-rw-r--r--test/ffmpeg_decoder_sequential_test.cc2
-rw-r--r--test/ffmpeg_encoder_test.cc42
-rw-r--r--test/ffmpeg_examiner_test.cc2
-rw-r--r--test/ffmpeg_pts_offset_test.cc12
-rw-r--r--test/file_naming_test.cc12
-rw-r--r--test/frame_rate_test.cc24
-rw-r--r--test/import_dcp_test.cc4
-rw-r--r--test/interrupt_encoder_test.cc2
-rw-r--r--test/isdcf_name_test.cc4
-rw-r--r--test/j2k_bandwidth_test.cc2
-rw-r--r--test/optimise_stills_test.cc4
-rw-r--r--test/player_test.cc36
-rw-r--r--test/recover_test.cc6
-rw-r--r--test/reels_test.cc50
-rw-r--r--test/remake_id_test.cc6
-rw-r--r--test/remake_with_subtitle_test.cc2
-rw-r--r--test/repeat_frame_test.cc2
-rw-r--r--test/required_disk_space_test.cc4
-rw-r--r--test/scaling_test.cc2
-rw-r--r--test/silence_padding_test.cc2
-rw-r--r--test/skip_frame_test.cc2
-rw-r--r--test/srt_subtitle_test.cc16
-rw-r--r--test/ssa_subtitle_test.cc2
-rw-r--r--test/subtitle_charset_test.cc6
-rw-r--r--test/subtitle_reel_number_test.cc2
-rw-r--r--test/subtitle_trim_test.cc2
-rw-r--r--test/threed_test.cc16
-rw-r--r--test/time_calculation_test.cc112
-rw-r--r--test/torture_test.cc12
-rw-r--r--test/upmixer_a_test.cc2
-rw-r--r--test/vf_kdm_test.cc6
-rw-r--r--test/vf_test.cc66
-rw-r--r--test/video_content_scale_test.cc2
-rw-r--r--test/video_mxf_content_test.cc2
49 files changed, 293 insertions, 294 deletions
diff --git a/test/4k_test.cc b/test/4k_test.cc
index e6e2cc7ce..da3fdf020 100644
--- a/test/4k_test.cc
+++ b/test/4k_test.cc
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE (fourk_test)
{
shared_ptr<Film> film = new_test_film ("4k_test");
film->set_name ("4k_test");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
film->set_resolution (RESOLUTION_4K);
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
film->set_container (Ratio::from_id ("185"));
diff --git a/test/audio_analysis_test.cc b/test/audio_analysis_test.cc
index a49987125..2fbaef7ea 100644
--- a/test/audio_analysis_test.cc
+++ b/test/audio_analysis_test.cc
@@ -112,7 +112,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test)
film->set_name ("audio_analysis_test");
boost::filesystem::path p = private_data / "betty_L.wav";
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, p));
+ shared_ptr<FFmpegContent> c (new FFmpegContent(p));
film->examine_and_add_content (c);
wait_for_jobs ();
@@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_negative_delay_test)
{
shared_ptr<Film> film = new_test_film ("audio_analysis_negative_delay_test");
film->set_name ("audio_analysis_negative_delay_test");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, private_data / "boon_telly.mkv"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent(private_data / "boon_telly.mkv"));
film->examine_and_add_content (c);
wait_for_jobs ();
@@ -144,7 +144,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test2)
{
shared_ptr<Film> film = new_test_film ("audio_analysis_test2");
film->set_name ("audio_analysis_test2");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, private_data / "3d_thx_broadway_2010_lossless.m2ts"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent(private_data / "3d_thx_broadway_2010_lossless.m2ts"));
film->examine_and_add_content (c);
wait_for_jobs ();
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test3)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/white.wav"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/white.wav"));
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -191,12 +191,12 @@ BOOST_AUTO_TEST_CASE (analyse_audio_test4)
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
- shared_ptr<Content> content = content_factory(film, private_data / "20 The Wedding Convoy Song.m4a").front();
+ shared_ptr<Content> content = content_factory(private_data / "20 The Wedding Convoy Song.m4a").front();
film->examine_and_add_content (content);
wait_for_jobs ();
shared_ptr<Playlist> playlist (new Playlist);
- playlist->add (content);
+ playlist->add (film, content);
boost::signals2::connection c;
JobManager::instance()->analyse_audio (film, playlist, false, c, boost::bind (&finished));
BOOST_CHECK (!wait_for_jobs ());
diff --git a/test/audio_delay_test.cc b/test/audio_delay_test.cc
index db64bc7c8..d486364f2 100644
--- a/test/audio_delay_test.cc
+++ b/test/audio_delay_test.cc
@@ -58,7 +58,7 @@ void test_audio_delay (int delay_in_ms)
film->set_container (Ratio::from_id ("185"));
film->set_name (film_name);
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/staircase.wav"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/staircase.wav"));
film->examine_and_add_content (content);
wait_for_jobs ();
content->audio->set_delay (delay_in_ms);
diff --git a/test/audio_processor_test.cc b/test/audio_processor_test.cc
index de212f611..9c790833c 100644
--- a/test/audio_processor_test.cc
+++ b/test/audio_processor_test.cc
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE (audio_processor_test)
{
shared_ptr<Film> film = new_test_film ("audio_processor_test");
film->set_name ("audio_processor_test");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/white.wav"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/white.wav"));
film->examine_and_add_content (c);
wait_for_jobs ();
diff --git a/test/butler_test.cc b/test/butler_test.cc
index 0ee06c1ac..a453bd858 100644
--- a/test/butler_test.cc
+++ b/test/butler_test.cc
@@ -37,9 +37,9 @@ BOOST_AUTO_TEST_CASE (butler_test1)
film->set_name ("butler_test1");
film->set_container (Ratio::from_id ("185"));
- shared_ptr<Content> video = content_factory(film, "test/data/flat_red.png").front ();
+ shared_ptr<Content> video = content_factory("test/data/flat_red.png").front ();
film->examine_and_add_content (video);
- shared_ptr<Content> audio = content_factory(film, "test/data/staircase.wav").front ();
+ shared_ptr<Content> audio = content_factory("test/data/staircase.wav").front ();
film->examine_and_add_content (audio);
BOOST_REQUIRE (!wait_for_jobs ());
diff --git a/test/closed_caption_test.cc b/test/closed_caption_test.cc
index 0409d5849..b50430d48 100644
--- a/test/closed_caption_test.cc
+++ b/test/closed_caption_test.cc
@@ -35,7 +35,7 @@ using boost::shared_ptr;
BOOST_AUTO_TEST_CASE (closed_caption_test1)
{
shared_ptr<Film> film = new_test_film2 ("closed_caption_test1");
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip.srt"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent("test/data/subrip.srt"));
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
@@ -60,11 +60,11 @@ BOOST_AUTO_TEST_CASE (closed_caption_test1)
BOOST_AUTO_TEST_CASE (closed_caption_test2)
{
shared_ptr<Film> film = new_test_film2 ("closed_caption_test2");
- shared_ptr<StringTextFileContent> content1 (new StringTextFileContent (film, "test/data/subrip.srt"));
+ shared_ptr<StringTextFileContent> content1 (new StringTextFileContent("test/data/subrip.srt"));
film->examine_and_add_content (content1);
- shared_ptr<StringTextFileContent> content2 (new StringTextFileContent (film, "test/data/subrip2.srt"));
+ shared_ptr<StringTextFileContent> content2 (new StringTextFileContent("test/data/subrip2.srt"));
film->examine_and_add_content (content2);
- shared_ptr<StringTextFileContent> content3 (new StringTextFileContent (film, "test/data/subrip3.srt"));
+ shared_ptr<StringTextFileContent> content3 (new StringTextFileContent("test/data/subrip3.srt"));
film->examine_and_add_content (content3);
BOOST_REQUIRE (!wait_for_jobs ());
diff --git a/test/content_test.cc b/test/content_test.cc
index 398c88be2..55e34ac5f 100644
--- a/test/content_test.cc
+++ b/test/content_test.cc
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE (content_test1)
film->set_name ("content_test1");
film->set_container (Ratio::from_id ("185"));
- shared_ptr<Content> content = content_factory(film, private_data / "demo_sound_bug.mkv").front ();
+ shared_ptr<Content> content = content_factory(private_data / "demo_sound_bug.mkv").front ();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
film->make_dcp ();
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE (content_test2)
{
shared_ptr<Film> film = new_test_film2 ("content_test2");
- shared_ptr<Content> content = content_factory(film, "test/data/red_23976.mp4").front();
+ shared_ptr<Content> content = content_factory("test/data/red_23976.mp4").front();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
content->set_trim_start(ContentTime::from_seconds(0.5));
@@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE (content_test3)
shared_ptr<Film> film = new_test_film2 ("content_test3");
film->set_sequence (false);
- shared_ptr<Content> content = content_factory(film, "test/data/red_24.mp4").front();
+ shared_ptr<Content> content = content_factory("test/data/red_24.mp4").front();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
@@ -104,15 +104,15 @@ BOOST_AUTO_TEST_CASE (content_test3)
/* Position */
/* 12 frames */
- content->set_position (DCPTime::from_seconds (12.0 / 24.0));
+ content->set_position (film, DCPTime::from_seconds(12.0 / 24.0));
BOOST_CHECK (content->position() == DCPTime::from_seconds (12.0 / 24.0));
/* 11.2 frames */
- content->set_position (DCPTime::from_seconds (11.2 / 24.0));
+ content->set_position (film, DCPTime::from_seconds(11.2 / 24.0));
BOOST_CHECK (content->position() == DCPTime::from_seconds (11.0 / 24.0));
/* 13.9 frames */
- content->set_position (DCPTime::from_seconds (13.9 / 24.0));
+ content->set_position (film, DCPTime::from_seconds(13.9 / 24.0));
BOOST_CHECK (content->position() == DCPTime::from_seconds (14.0 / 24.0));
content->set_video_frame_rate (25);
diff --git a/test/dcp_playback_test.cc b/test/dcp_playback_test.cc
index 3e3ffe089..4bb4d5a5d 100644
--- a/test/dcp_playback_test.cc
+++ b/test/dcp_playback_test.cc
@@ -33,7 +33,7 @@ using boost::optional;
BOOST_AUTO_TEST_CASE (dcp_playback_test)
{
shared_ptr<Film> film = new_test_film ("dcp_playback_test");
- shared_ptr<DCPContent> content (new DCPContent(film, private_data / "JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV"));
+ shared_ptr<DCPContent> content (new DCPContent(private_data / "JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV"));
film->examine_and_add_content (content);
wait_for_jobs ();
diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc
index 47938d309..5a1cf4391 100644
--- a/test/dcp_subtitle_test.cc
+++ b/test/dcp_subtitle_test.cc
@@ -65,11 +65,11 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
film->set_interop (false);
- shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent (film, "test/data/dcp_sub.xml"));
+ shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent ("test/data/dcp_sub.xml"));
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(2).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(2).get());
content->only_text()->set_use (true);
content->only_text()->set_burn (false);
@@ -86,15 +86,15 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_within_dcp_test)
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
- shared_ptr<DCPContent> content (new DCPContent (film, private_data / "JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV"));
+ shared_ptr<DCPContent> content (new DCPContent(private_data / "JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV"));
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<DCPDecoder> decoder (new DCPDecoder (content, film->log(), false));
+ shared_ptr<DCPDecoder> decoder (new DCPDecoder (content, false));
decoder->only_text()->PlainStart.connect (bind (store, _1));
stored = optional<ContentStringText> ();
- while (!decoder->pass() && !stored) {}
+ while (!decoder->pass(film) && !stored) {}
BOOST_REQUIRE (stored);
BOOST_REQUIRE_EQUAL (stored->subs.size(), 2);
@@ -109,15 +109,15 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test2)
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
- shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent (film, "test/data/dcp_sub2.xml"));
+ shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent("test/data/dcp_sub2.xml"));
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (content, film->log()));
+ shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder(content));
decoder->only_text()->PlainStart.connect (bind (store, _1));
stored = optional<ContentStringText> ();
- while (!decoder->pass ()) {
+ while (!decoder->pass(film)) {
if (stored && stored->from() == ContentTime(0)) {
BOOST_CHECK_EQUAL (stored->subs.front().text(), "&lt;b&gt;Hello world!&lt;/b&gt;");
}
@@ -132,16 +132,16 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test3)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
film->set_interop (true);
- shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent (film, "test/data/dcp_sub3.xml"));
+ shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent ("test/data/dcp_sub3.xml"));
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
film->make_dcp ();
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (content, film->log()));
+ shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (content));
stored = optional<ContentStringText> ();
- while (!decoder->pass ()) {
+ while (!decoder->pass (film)) {
decoder->only_text()->PlainStart.connect (bind (store, _1));
if (stored && stored->from() == ContentTime::from_seconds(0.08)) {
list<dcp::SubtitleString> s = stored->subs;
@@ -165,9 +165,9 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test4)
shared_ptr<Film> film = new_test_film2 ("dcp_subtitle_test4");
film->set_interop (true);
- shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent (film, "test/data/dcp_sub3.xml"));
+ shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent ("test/data/dcp_sub3.xml"));
film->examine_and_add_content (content);
- shared_ptr<DCPSubtitleContent> content2 (new DCPSubtitleContent (film, "test/data/dcp_sub3.xml"));
+ shared_ptr<DCPSubtitleContent> content2 (new DCPSubtitleContent ("test/data/dcp_sub3.xml"));
film->examine_and_add_content (content2);
BOOST_REQUIRE (!wait_for_jobs ());
diff --git a/test/digest_test.cc b/test/digest_test.cc
index 33eb00bf1..a3fd6c81b 100644
--- a/test/digest_test.cc
+++ b/test/digest_test.cc
@@ -63,9 +63,9 @@ BOOST_AUTO_TEST_CASE (digest_test)
shared_ptr<Film> film = new_test_film ("digest_test");
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
film->set_name ("digest_test");
- shared_ptr<ImageContent> r (new ImageContent (film, "test/data/flat_red.png"));
- shared_ptr<ImageContent> g (new ImageContent (film, "test/data/flat_green.png"));
- shared_ptr<ImageContent> b (new ImageContent (film, "test/data/flat_blue.png"));
+ shared_ptr<ImageContent> r (new ImageContent("test/data/flat_red.png"));
+ shared_ptr<ImageContent> g (new ImageContent("test/data/flat_green.png"));
+ shared_ptr<ImageContent> b (new ImageContent("test/data/flat_blue.png"));
film->examine_and_add_content (r);
film->examine_and_add_content (g);
film->examine_and_add_content (b);
diff --git a/test/empty_test.cc b/test/empty_test.cc
index 576577b97..890185267 100644
--- a/test/empty_test.cc
+++ b/test/empty_test.cc
@@ -44,8 +44,8 @@ BOOST_AUTO_TEST_CASE (empty_test1)
film->set_name ("empty_test1");
film->set_container (Ratio::from_id ("185"));
film->set_sequence (false);
- shared_ptr<ImageContent> contentA (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
- shared_ptr<ImageContent> contentB (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
+ shared_ptr<ImageContent> contentA (new ImageContent("test/data/simple_testcard_640x480.png"));
+ shared_ptr<ImageContent> contentB (new ImageContent("test/data/simple_testcard_640x480.png"));
film->examine_and_add_content (contentA);
film->examine_and_add_content (contentB);
@@ -55,13 +55,13 @@ BOOST_AUTO_TEST_CASE (empty_test1)
contentA->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
contentA->video->set_length (3);
- contentA->set_position (DCPTime::from_frames (2, vfr));
+ contentA->set_position (film, DCPTime::from_frames (2, vfr));
contentB->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
contentB->video->set_length (1);
- contentB->set_position (DCPTime::from_frames (7, vfr));
+ contentB->set_position (film, DCPTime::from_frames (7, vfr));
shared_ptr<Player> player (new Player(film, film->playlist()));
- Empty black (player->_pieces, film->length(), bind(&has_video, _1));
+ Empty black (film, player->_pieces, bind(&has_video, _1));
BOOST_REQUIRE_EQUAL (black._periods.size(), 2);
BOOST_CHECK (black._periods.front().from == DCPTime());
BOOST_CHECK (black._periods.front().to == DCPTime::from_frames(2, vfr));
@@ -77,8 +77,8 @@ BOOST_AUTO_TEST_CASE (empty_test2)
film->set_name ("empty_test1");
film->set_container (Ratio::from_id ("185"));
film->set_sequence (false);
- shared_ptr<ImageContent> contentA (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
- shared_ptr<ImageContent> contentB (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
+ shared_ptr<ImageContent> contentA (new ImageContent("test/data/simple_testcard_640x480.png"));
+ shared_ptr<ImageContent> contentB (new ImageContent("test/data/simple_testcard_640x480.png"));
film->examine_and_add_content (contentA);
film->examine_and_add_content (contentB);
@@ -88,13 +88,13 @@ BOOST_AUTO_TEST_CASE (empty_test2)
contentA->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
contentA->video->set_length (3);
- contentA->set_position (DCPTime(0));
+ contentA->set_position (film, DCPTime(0));
contentB->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
contentB->video->set_length (1);
- contentB->set_position (DCPTime::from_frames (7, vfr));
+ contentB->set_position (film, DCPTime::from_frames(7, vfr));
shared_ptr<Player> player (new Player(film, film->playlist()));
- Empty black (player->_pieces, film->length(), bind(&has_video, _1));
+ Empty black (film, player->_pieces, bind(&has_video, _1));
BOOST_REQUIRE_EQUAL (black._periods.size(), 1);
BOOST_CHECK (black._periods.front().from == DCPTime::from_frames(3, vfr));
BOOST_CHECK (black._periods.front().to == DCPTime::from_frames(7, vfr));
diff --git a/test/ffmpeg_audio_only_test.cc b/test/ffmpeg_audio_only_test.cc
index e3c90cba9..8e2993e96 100644
--- a/test/ffmpeg_audio_only_test.cc
+++ b/test/ffmpeg_audio_only_test.cc
@@ -72,7 +72,7 @@ test (boost::filesystem::path file)
shared_ptr<Film> film = new_test_film ("ffmpeg_audio_only_test");
film->set_name ("test_film");
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, file));
+ shared_ptr<FFmpegContent> c (new FFmpegContent(file));
film->examine_and_add_content (c);
wait_for_jobs ();
film->write_metadata ();
diff --git a/test/ffmpeg_audio_test.cc b/test/ffmpeg_audio_test.cc
index 0aafb505f..7a21ced06 100644
--- a/test/ffmpeg_audio_test.cc
+++ b/test/ffmpeg_audio_test.cc
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
{
shared_ptr<Film> film = new_test_film ("ffmpeg_audio_test");
film->set_name ("ffmpeg_audio_test");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/staircase.mov"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent ("test/data/staircase.mov"));
film->examine_and_add_content (c);
wait_for_jobs ();
@@ -130,7 +130,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
BOOST_AUTO_TEST_CASE (ffmpeg_audio_test2)
{
shared_ptr<Film> film = new_test_film2 ("ffmpeg_audio_test2");
- shared_ptr<Content> content = content_factory(film, private_data / "wayne.mkv").front();
+ shared_ptr<Content> content = content_factory(private_data / "wayne.mkv").front();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
@@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test2)
BOOST_AUTO_TEST_CASE (ffmpeg_audio_test3)
{
shared_ptr<Film> film = new_test_film2 ("ffmpeg_audio_test2");
- shared_ptr<Content> content = content_factory(film, private_data / "wayne.mkv").front();
+ shared_ptr<Content> content = content_factory(private_data / "wayne.mkv").front();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
diff --git a/test/ffmpeg_dcp_test.cc b/test/ffmpeg_dcp_test.cc
index 7cdecb22f..4b2388bcd 100644
--- a/test/ffmpeg_dcp_test.cc
+++ b/test/ffmpeg_dcp_test.cc
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_dcp_test)
{
shared_ptr<Film> film = new_test_film ("ffmpeg_dcp_test");
film->set_name ("test_film2");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (c);
wait_for_jobs ();
diff --git a/test/ffmpeg_decoder_seek_test.cc b/test/ffmpeg_decoder_seek_test.cc
index c09fd02f3..c6fae48cd 100644
--- a/test/ffmpeg_decoder_seek_test.cc
+++ b/test/ffmpeg_decoder_seek_test.cc
@@ -54,12 +54,12 @@ store (ContentVideo v)
}
static void
-check (shared_ptr<FFmpegDecoder> decoder, int frame)
+check (shared_ptr<const Film> film, shared_ptr<FFmpegDecoder> decoder, int frame)
{
BOOST_REQUIRE (decoder->ffmpeg_content()->video_frame_rate ());
- decoder->seek (ContentTime::from_frames (frame, decoder->ffmpeg_content()->video_frame_rate().get()), true);
+ decoder->seek (film, ContentTime::from_frames (frame, decoder->ffmpeg_content()->video_frame_rate().get()), true);
stored = optional<ContentVideo> ();
- while (!decoder->pass() && !stored) {}
+ while (!decoder->pass(film) && !stored) {}
BOOST_CHECK (stored->frame <= frame);
}
@@ -70,15 +70,14 @@ test (boost::filesystem::path file, vector<int> frames)
BOOST_REQUIRE (boost::filesystem::exists (path));
shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string());
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, path));
+ shared_ptr<FFmpegContent> content (new FFmpegContent (path));
film->examine_and_add_content (content);
wait_for_jobs ();
- shared_ptr<Log> log (new NullLog);
- shared_ptr<FFmpegDecoder> decoder (new FFmpegDecoder (content, log, false));
+ shared_ptr<FFmpegDecoder> decoder (new FFmpegDecoder (film, content, false));
decoder->video->Data.connect (bind (&store, _1));
for (vector<int>::const_iterator i = frames.begin(); i != frames.end(); ++i) {
- check (decoder, *i);
+ check (film, decoder, *i);
}
}
diff --git a/test/ffmpeg_decoder_sequential_test.cc b/test/ffmpeg_decoder_sequential_test.cc
index 81dd07784..50c96afed 100644
--- a/test/ffmpeg_decoder_sequential_test.cc
+++ b/test/ffmpeg_decoder_sequential_test.cc
@@ -61,7 +61,7 @@ ffmpeg_decoder_sequential_test_one (boost::filesystem::path file, float fps, int
BOOST_REQUIRE (boost::filesystem::exists (path));
shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_sequential_test_" + file.string());
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, path));
+ shared_ptr<FFmpegContent> content (new FFmpegContent(path));
film->examine_and_add_content (content);
wait_for_jobs ();
film->write_metadata ();
diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc
index 4b323c5bf..4f7725f0b 100644
--- a/test/ffmpeg_encoder_test.cc
+++ b/test/ffmpeg_encoder_test.cc
@@ -56,7 +56,7 @@ ffmpeg_content_test (int number, boost::filesystem::path content, ExportFormat f
shared_ptr<Film> film = new_test_film (name);
film->set_name (name);
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, content));
+ shared_ptr<FFmpegContent> c (new FFmpegContent(content));
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
@@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test5)
{
shared_ptr<Film> film = new_test_film ("ffmpeg_encoder_prores_test5");
film->set_name ("ffmpeg_encoder_prores_test5");
- shared_ptr<ImageContent> c (new ImageContent (film, private_data / "bbc405.png"));
+ shared_ptr<ImageContent> c (new ImageContent(private_data / "bbc405.png"));
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test6)
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
- shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip2.srt"));
+ shared_ptr<StringTextFileContent> s (new StringTextFileContent("test/data/subrip2.srt"));
film->examine_and_add_content (s);
BOOST_REQUIRE (!wait_for_jobs ());
s->only_text()->set_colour (dcp::Colour (255, 255, 0));
@@ -142,11 +142,11 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test7)
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (c);
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip.srt"));
+ shared_ptr<StringTextFileContent> s (new StringTextFileContent("test/data/subrip.srt"));
film->examine_and_add_content (s);
BOOST_REQUIRE (!wait_for_jobs ());
s->only_text()->set_colour (dcp::Colour (255, 255, 0));
@@ -172,7 +172,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test2)
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
- shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip2.srt"));
+ shared_ptr<StringTextFileContent> s (new StringTextFileContent("test/data/subrip2.srt"));
film->examine_and_add_content (s);
BOOST_REQUIRE (!wait_for_jobs ());
s->only_text()->set_colour (dcp::Colour (255, 255, 0));
@@ -193,11 +193,11 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test3)
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (c);
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip.srt"));
+ shared_ptr<StringTextFileContent> s (new StringTextFileContent("test/data/subrip.srt"));
film->examine_and_add_content (s);
BOOST_REQUIRE (!wait_for_jobs ());
s->only_text()->set_colour (dcp::Colour (255, 255, 0));
@@ -214,7 +214,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test3)
BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test4)
{
shared_ptr<Film> film = new_test_film2("ffmpeg_encoder_h264_test4");
- film->examine_and_add_content(shared_ptr<DCPContent>(new DCPContent(film, "test/data/scope_dcp")));
+ film->examine_and_add_content(shared_ptr<DCPContent>(new DCPContent("test/data/scope_dcp")));
BOOST_REQUIRE(!wait_for_jobs());
film->set_container(Ratio::from_id("185"));
@@ -232,43 +232,43 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test5)
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
- shared_ptr<FFmpegContent> L (new FFmpegContent (film, "test/data/L.wav"));
+ shared_ptr<FFmpegContent> L (new FFmpegContent("test/data/L.wav"));
film->examine_and_add_content (L);
- shared_ptr<FFmpegContent> R (new FFmpegContent (film, "test/data/R.wav"));
+ shared_ptr<FFmpegContent> R (new FFmpegContent("test/data/R.wav"));
film->examine_and_add_content (R);
- shared_ptr<FFmpegContent> C (new FFmpegContent (film, "test/data/C.wav"));
+ shared_ptr<FFmpegContent> C (new FFmpegContent("test/data/C.wav"));
film->examine_and_add_content (C);
- shared_ptr<FFmpegContent> Ls (new FFmpegContent (film, "test/data/Ls.wav"));
+ shared_ptr<FFmpegContent> Ls (new FFmpegContent("test/data/Ls.wav"));
film->examine_and_add_content (Ls);
- shared_ptr<FFmpegContent> Rs (new FFmpegContent (film, "test/data/Rs.wav"));
+ shared_ptr<FFmpegContent> Rs (new FFmpegContent("test/data/Rs.wav"));
film->examine_and_add_content (Rs);
- shared_ptr<FFmpegContent> Lfe (new FFmpegContent (film, "test/data/Lfe.wav"));
+ shared_ptr<FFmpegContent> Lfe (new FFmpegContent("test/data/Lfe.wav"));
film->examine_and_add_content (Lfe);
BOOST_REQUIRE (!wait_for_jobs ());
AudioMapping map (1, MAX_DCP_AUDIO_CHANNELS);
- L->set_position (DCPTime::from_seconds (0));
+ L->set_position (film, DCPTime::from_seconds(0));
map.make_zero ();
map.set (0, 0, 1);
L->audio->set_mapping (map);
- R->set_position (DCPTime::from_seconds (1));
+ R->set_position (film, DCPTime::from_seconds(1));
map.make_zero ();
map.set (0, 1, 1);
R->audio->set_mapping (map);
- C->set_position (DCPTime::from_seconds (2));
+ C->set_position (film, DCPTime::from_seconds(2));
map.make_zero ();
map.set (0, 2, 1);
C->audio->set_mapping (map);
- Lfe->set_position (DCPTime::from_seconds (3));
+ Lfe->set_position (film, DCPTime::from_seconds(3));
map.make_zero ();
map.set (0, 3, 1);
Lfe->audio->set_mapping (map);
- Ls->set_position (DCPTime::from_seconds (4));
+ Ls->set_position (film, DCPTime::from_seconds(4));
map.make_zero ();
map.set (0, 4, 1);
Ls->audio->set_mapping (map);
- Rs->set_position (DCPTime::from_seconds (5));
+ Rs->set_position (film, DCPTime::from_seconds(5));
map.make_zero ();
map.set (0, 5, 1);
Rs->audio->set_mapping (map);
diff --git a/test/ffmpeg_examiner_test.cc b/test/ffmpeg_examiner_test.cc
index 0233db1f0..d4614e226 100644
--- a/test/ffmpeg_examiner_test.cc
+++ b/test/ffmpeg_examiner_test.cc
@@ -35,7 +35,7 @@ using boost::shared_ptr;
BOOST_AUTO_TEST_CASE (ffmpeg_examiner_test)
{
shared_ptr<Film> film = new_test_film ("ffmpeg_examiner_test");
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/count300bd24.m2ts"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent ("test/data/count300bd24.m2ts"));
shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer (content));
BOOST_CHECK_EQUAL (examiner->first_video().get().get(), ContentTime::from_seconds(600).get());
diff --git a/test/ffmpeg_pts_offset_test.cc b/test/ffmpeg_pts_offset_test.cc
index bdc46f6d9..1d3619219 100644
--- a/test/ffmpeg_pts_offset_test.cc
+++ b/test/ffmpeg_pts_offset_test.cc
@@ -36,7 +36,7 @@ using boost::shared_ptr;
BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
{
shared_ptr<Film> film = new_test_film ("ffmpeg_pts_offset_test");
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent ("test/data/test.mp4"));
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
/* Sound == video so no offset required */
content->_first_video = ContentTime ();
content->ffmpeg_audio_streams().front()->first_audio = ContentTime ();
- FFmpegDecoder decoder (content, film->log(), false);
+ FFmpegDecoder decoder (film, content, false);
BOOST_CHECK_EQUAL (decoder._pts_offset.get(), 0);
}
@@ -56,7 +56,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
/* Common offset should be removed */
content->_first_video = ContentTime::from_seconds (600);
content->ffmpeg_audio_streams().front()->first_audio = ContentTime::from_seconds (600);
- FFmpegDecoder decoder (content, film->log(), false);
+ FFmpegDecoder decoder (film, content, false);
BOOST_CHECK_EQUAL (decoder._pts_offset.get(), ContentTime::from_seconds(-600).get());
}
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
/* Video is on a frame boundary */
content->_first_video = ContentTime::from_frames (1, 24);
content->ffmpeg_audio_streams().front()->first_audio = ContentTime ();
- FFmpegDecoder decoder (content, film->log(), false);
+ FFmpegDecoder decoder (film, content, false);
BOOST_CHECK_EQUAL (decoder._pts_offset.get(), 0);
}
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
double const frame = 1.0 / 24.0;
content->_first_video = ContentTime::from_seconds (frame + 0.0215);
content->ffmpeg_audio_streams().front()->first_audio = ContentTime ();
- FFmpegDecoder decoder (content, film->log(), false);
+ FFmpegDecoder decoder (film, content, false);
BOOST_CHECK_CLOSE (decoder._pts_offset.seconds(), (frame - 0.0215), 0.00001);
}
@@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
double const frame = 1.0 / 24.0;
content->_first_video = ContentTime::from_seconds (frame + 0.0215 + 4.1);
content->ffmpeg_audio_streams().front()->first_audio = ContentTime::from_seconds (4.1);
- FFmpegDecoder decoder (content, film->log(), false);
+ FFmpegDecoder decoder (film, content, false);
BOOST_CHECK_CLOSE (decoder._pts_offset.seconds(), (frame - 0.0215) - 4.1, 0.1);
}
}
diff --git a/test/file_naming_test.cc b/test/file_naming_test.cc
index bd7efb0d9..f06fdfa42 100644
--- a/test/file_naming_test.cc
+++ b/test/file_naming_test.cc
@@ -59,11 +59,11 @@ BOOST_AUTO_TEST_CASE (file_naming_test)
shared_ptr<Film> film = new_test_film ("file_naming_test");
film->set_name ("file_naming_test");
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
- shared_ptr<FFmpegContent> r (new FFmpegContent (film, "test/data/flat_red.png"));
+ shared_ptr<FFmpegContent> r (new FFmpegContent("test/data/flat_red.png"));
film->examine_and_add_content (r);
- shared_ptr<FFmpegContent> g (new FFmpegContent (film, "test/data/flat_green.png"));
+ shared_ptr<FFmpegContent> g (new FFmpegContent("test/data/flat_green.png"));
film->examine_and_add_content (g);
- shared_ptr<FFmpegContent> b (new FFmpegContent (film, "test/data/flat_blue.png"));
+ shared_ptr<FFmpegContent> b (new FFmpegContent("test/data/flat_blue.png"));
film->examine_and_add_content (b);
wait_for_jobs ();
@@ -98,11 +98,11 @@ BOOST_AUTO_TEST_CASE (file_naming_test2)
shared_ptr<Film> film = new_test_film ("file_naming_test2");
film->set_name ("file_naming_test2");
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
- shared_ptr<FFmpegContent> r (new FFmpegContent (film, "test/data/flät_red.png"));
+ shared_ptr<FFmpegContent> r (new FFmpegContent("test/data/flät_red.png"));
film->examine_and_add_content (r);
- shared_ptr<FFmpegContent> g (new FFmpegContent (film, "test/data/flat_green.png"));
+ shared_ptr<FFmpegContent> g (new FFmpegContent("test/data/flat_green.png"));
film->examine_and_add_content (g);
- shared_ptr<FFmpegContent> b (new FFmpegContent (film, "test/data/flat_blue.png"));
+ shared_ptr<FFmpegContent> b (new FFmpegContent("test/data/flat_blue.png"));
film->examine_and_add_content (b);
wait_for_jobs ();
diff --git a/test/frame_rate_test.cc b/test/frame_rate_test.cc
index 9521e3909..4192ce5e2 100644
--- a/test/frame_rate_test.cc
+++ b/test/frame_rate_test.cc
@@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
{
shared_ptr<Film> film = new_test_film ("best_dcp_frame_rate_test_single");
/* Get any piece of content, it doesn't matter what */
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -222,9 +222,9 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_double)
{
shared_ptr<Film> film = new_test_film ("best_dcp_frame_rate_test_double");
/* Get any old content, it doesn't matter what */
- shared_ptr<FFmpegContent> A (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> A (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (A);
- shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> B (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (B);
wait_for_jobs ();
@@ -253,7 +253,7 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
{
shared_ptr<Film> film = new_test_film ("audio_sampling_rate_test");
/* Get any piece of content, it doesn't matter what */
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -269,34 +269,34 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
content->_video_frame_rate = 24;
film->set_video_frame_rate (24);
stream->_frame_rate = 48000;
- BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 48000);
+ BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(film), 48000);
stream->_frame_rate = 44100;
- BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 48000);
+ BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(film), 48000);
stream->_frame_rate = 80000;
- BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 96000);
+ BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(film), 96000);
content->_video_frame_rate = 23.976;
film->set_video_frame_rate (24);
stream->_frame_rate = 48000;
- BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 47952);
+ BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(film), 47952);
content->_video_frame_rate = 29.97;
film->set_video_frame_rate (30);
BOOST_CHECK_EQUAL (film->video_frame_rate (), 30);
stream->_frame_rate = 48000;
- BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 47952);
+ BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(film), 47952);
content->_video_frame_rate = 25;
film->set_video_frame_rate (24);
stream->_frame_rate = 48000;
- BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 50000);
+ BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(film), 50000);
content->_video_frame_rate = 25;
film->set_video_frame_rate (24);
stream->_frame_rate = 44100;
- BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 50000);
+ BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(film), 50000);
/* Check some out-there conversions (not the best) */
@@ -306,5 +306,5 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
/* The FrameRateChange within resampled_frame_rate should choose to double-up
the 14.99 fps video to 30 and then run it slow at 25.
*/
- BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), lrint (48000 * 2 * 14.99 / 25));
+ BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(film), lrint (48000 * 2 * 14.99 / 25));
}
diff --git a/test/import_dcp_test.cc b/test/import_dcp_test.cc
index 9bec45354..71689f613 100644
--- a/test/import_dcp_test.cc
+++ b/test/import_dcp_test.cc
@@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test)
A->set_name ("frobozz");
A->set_interop (false);
- shared_ptr<FFmpegContent> c (new FFmpegContent (A, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
A->examine_and_add_content (c);
A->set_encrypted (true);
BOOST_CHECK (!wait_for_jobs ());
@@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test)
B->set_name ("frobozz");
B->set_interop (false);
- shared_ptr<DCPContent> d (new DCPContent (B, "build/test/import_dcp_test/" + A->dcp_name()));
+ shared_ptr<DCPContent> d (new DCPContent("build/test/import_dcp_test/" + A->dcp_name()));
B->examine_and_add_content (d);
BOOST_CHECK (!wait_for_jobs ());
d->add_kdm (kdm);
diff --git a/test/interrupt_encoder_test.cc b/test/interrupt_encoder_test.cc
index 3b5717f16..20a442428 100644
--- a/test/interrupt_encoder_test.cc
+++ b/test/interrupt_encoder_test.cc
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE (interrupt_encoder_test)
film->set_container (Ratio::from_id ("185"));
film->set_name ("interrupt_encoder_test");
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, private_data / "prophet_long_clip.mkv"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent(private_data / "prophet_long_clip.mkv"));
film->examine_and_add_content (content);
wait_for_jobs ();
diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc
index 52a1cd29a..a33a6a460 100644
--- a/test/isdcf_name_test.cc
+++ b/test/isdcf_name_test.cc
@@ -88,7 +88,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
/* Test interior aspect ratio: shouldn't be shown with trailers */
- shared_ptr<ImageContent> content (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
+ shared_ptr<ImageContent> content (new ImageContent ("test/data/simple_testcard_640x480.png"));
film->examine_and_add_content (content);
wait_for_jobs ();
content->video->set_scale (VideoContentScale (Ratio::from_id ("133")));
@@ -149,7 +149,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
/* Test audio channel markup */
film->set_audio_channels (6);
- shared_ptr<FFmpegContent> sound (new FFmpegContent (film, "test/data/sine_440.wav"));
+ shared_ptr<FFmpegContent> sound (new FFmpegContent("test/data/sine_440.wav"));
film->examine_and_add_content (sound);
wait_for_jobs ();
BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_10_4K_DI_20140704_PP_SMPTE_OV");
diff --git a/test/j2k_bandwidth_test.cc b/test/j2k_bandwidth_test.cc
index a941b4ae6..92f6f90d8 100644
--- a/test/j2k_bandwidth_test.cc
+++ b/test/j2k_bandwidth_test.cc
@@ -45,7 +45,7 @@ check (int target_bits_per_second)
film->set_name (name);
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
film->set_j2k_bandwidth (target_bits_per_second);
- shared_ptr<ImageContent> content (new ImageContent (film, private_data / "prophet_frame.tiff"));
+ shared_ptr<ImageContent> content (new ImageContent(private_data / "prophet_frame.tiff"));
film->examine_and_add_content (content);
wait_for_jobs ();
content->video->set_length (24 * duration);
diff --git a/test/optimise_stills_test.cc b/test/optimise_stills_test.cc
index b939d2914..3e69c95b6 100644
--- a/test/optimise_stills_test.cc
+++ b/test/optimise_stills_test.cc
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE (optimise_stills_test1)
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
- shared_ptr<Content> content = content_factory(film, "test/data/flat_red.png").front ();
+ shared_ptr<Content> content = content_factory("test/data/flat_red.png").front ();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
film->make_dcp ();
@@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE (optimise_stills_test2)
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
- shared_ptr<Content> content = content_factory(film, "test/data/flat_red.png").front ();
+ shared_ptr<Content> content = content_factory("test/data/flat_red.png").front ();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
content->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
diff --git a/test/player_test.cc b/test/player_test.cc
index 598e7a01a..2ebcec4bf 100644
--- a/test/player_test.cc
+++ b/test/player_test.cc
@@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE (player_silence_padding_test)
{
shared_ptr<Film> film = new_test_film ("player_silence_padding_test");
film->set_name ("player_silence_padding_test");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
@@ -93,8 +93,8 @@ BOOST_AUTO_TEST_CASE (player_black_fill_test)
film->set_container (Ratio::from_id ("185"));
film->set_sequence (false);
film->set_interop (false);
- shared_ptr<ImageContent> contentA (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
- shared_ptr<ImageContent> contentB (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
+ shared_ptr<ImageContent> contentA (new ImageContent("test/data/simple_testcard_640x480.png"));
+ shared_ptr<ImageContent> contentB (new ImageContent("test/data/simple_testcard_640x480.png"));
film->examine_and_add_content (contentA);
film->examine_and_add_content (contentB);
@@ -102,10 +102,10 @@ BOOST_AUTO_TEST_CASE (player_black_fill_test)
contentA->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
contentA->video->set_length (3);
- contentA->set_position (DCPTime::from_frames (2, film->video_frame_rate ()));
+ contentA->set_position (film, DCPTime::from_frames(2, film->video_frame_rate()));
contentB->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
contentB->video->set_length (1);
- contentB->set_position (DCPTime::from_frames (7, film->video_frame_rate ()));
+ contentB->set_position (film, DCPTime::from_frames(7, film->video_frame_rate()));
film->make_dcp ();
@@ -132,17 +132,17 @@ BOOST_AUTO_TEST_CASE (player_subframe_test)
film->set_name ("reels_test7");
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
- shared_ptr<Content> A = content_factory(film, "test/data/flat_red.png").front();
+ shared_ptr<Content> A = content_factory("test/data/flat_red.png").front();
film->examine_and_add_content (A);
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<Content> B = content_factory(film, "test/data/awkward_length.wav").front();
+ shared_ptr<Content> B = content_factory("test/data/awkward_length.wav").front();
film->examine_and_add_content (B);
BOOST_REQUIRE (!wait_for_jobs ());
film->set_video_frame_rate (24);
A->video->set_length (3 * 24);
- BOOST_CHECK (A->full_length() == DCPTime::from_frames(3 * 24, 24));
- BOOST_CHECK (B->full_length() == DCPTime(289920));
+ BOOST_CHECK (A->full_length(film) == DCPTime::from_frames(3 * 24, 24));
+ BOOST_CHECK (B->full_length(film) == DCPTime(289920));
/* Length should be rounded up from B's length to the next video frame */
BOOST_CHECK (film->length() == DCPTime::from_frames(3 * 24 + 1, 24));
@@ -177,11 +177,11 @@ BOOST_AUTO_TEST_CASE (player_interleave_test)
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (c);
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip.srt"));
+ shared_ptr<StringTextFileContent> s (new StringTextFileContent("test/data/subrip.srt"));
film->examine_and_add_content (s);
BOOST_REQUIRE (!wait_for_jobs ());
@@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE (player_interleave_test)
BOOST_AUTO_TEST_CASE (player_seek_test)
{
shared_ptr<Film> film (new Film (optional<boost::filesystem::path>()));
- shared_ptr<DCPContent> dcp (new DCPContent (film, private_data / "awkward_subs"));
+ shared_ptr<DCPContent> dcp (new DCPContent(private_data / "awkward_subs"));
film->examine_and_add_content (dcp, true);
BOOST_REQUIRE (!wait_for_jobs ());
dcp->only_text()->set_use (true);
@@ -233,7 +233,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test)
BOOST_AUTO_TEST_CASE (player_seek_test2)
{
shared_ptr<Film> film (new Film (optional<boost::filesystem::path>()));
- shared_ptr<DCPContent> dcp (new DCPContent (film, private_data / "awkward_subs2"));
+ shared_ptr<DCPContent> dcp (new DCPContent(private_data / "awkward_subs2"));
film->examine_and_add_content (dcp, true);
BOOST_REQUIRE (!wait_for_jobs ());
dcp->only_text()->set_use (true);
@@ -262,15 +262,15 @@ BOOST_AUTO_TEST_CASE (player_seek_test2)
BOOST_AUTO_TEST_CASE (player_trim_test)
{
shared_ptr<Film> film = new_test_film2 ("player_trim_test");
- shared_ptr<Content> A = content_factory(film, "test/data/flat_red.png").front();
+ shared_ptr<Content> A = content_factory("test/data/flat_red.png").front();
film->examine_and_add_content (A);
BOOST_REQUIRE (!wait_for_jobs ());
A->video->set_length (10 * 24);
- shared_ptr<Content> B = content_factory(film, "test/data/flat_red.png").front();
+ shared_ptr<Content> B = content_factory("test/data/flat_red.png").front();
film->examine_and_add_content (B);
BOOST_REQUIRE (!wait_for_jobs ());
B->video->set_length (10 * 24);
- B->set_position (DCPTime::from_seconds (10));
+ B->set_position (film, DCPTime::from_seconds(10));
B->set_trim_start (ContentTime::from_seconds (2));
film->make_dcp ();
@@ -299,9 +299,9 @@ store (list<Sub>* out, PlayerText text, TextType type, optional<DCPTextTrack> tr
BOOST_AUTO_TEST_CASE (player_ignore_video_and_audio_test)
{
shared_ptr<Film> film = new_test_film2 ("player_ignore_video_and_audio_test");
- shared_ptr<Content> ff = content_factory(film, private_data / "boon_telly.mkv").front();
+ shared_ptr<Content> ff = content_factory(private_data / "boon_telly.mkv").front();
film->examine_and_add_content (ff);
- shared_ptr<Content> text = content_factory(film, "test/data/subrip.srt").front();
+ shared_ptr<Content> text = content_factory("test/data/subrip.srt").front();
film->examine_and_add_content (text);
BOOST_REQUIRE (!wait_for_jobs());
text->only_text()->set_type (TEXT_CLOSED_CAPTION);
diff --git a/test/recover_test.cc b/test/recover_test.cc
index 4222426c3..017c01927 100644
--- a/test/recover_test.cc
+++ b/test/recover_test.cc
@@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE (recover_test_2d)
film->set_container (Ratio::from_id ("185"));
film->set_name ("recover_test");
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/count300bd24.m2ts"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/count300bd24.m2ts"));
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE (recover_test_3d)
film->set_name ("recover_test");
film->set_three_d (true);
- shared_ptr<ImageContent> content (new ImageContent (film, "test/data/3d_test"));
+ shared_ptr<ImageContent> content (new ImageContent("test/data/3d_test"));
content->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -126,7 +126,7 @@ BOOST_AUTO_TEST_CASE (recover_test_2d_encrypted)
film->set_name ("recover_test");
film->set_encrypted (true);
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/count300bd24.m2ts"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/count300bd24.m2ts"));
film->examine_and_add_content (content);
wait_for_jobs ();
diff --git a/test/reels_test.cc b/test/reels_test.cc
index 76dbb61ed..c27762fdb 100644
--- a/test/reels_test.cc
+++ b/test/reels_test.cc
@@ -45,12 +45,12 @@ BOOST_AUTO_TEST_CASE (reels_test1)
{
shared_ptr<Film> film = new_test_film ("reels_test1");
film->set_container (Ratio::from_id ("185"));
- shared_ptr<FFmpegContent> A (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> A (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (A);
- shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> B (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (B);
wait_for_jobs ();
- BOOST_CHECK_EQUAL (A->full_length().get(), 288000);
+ BOOST_CHECK_EQUAL (A->full_length(film).get(), 288000);
film->set_reel_type (REELTYPE_SINGLE);
list<DCPTimePeriod> r = film->reels ();
@@ -95,21 +95,21 @@ BOOST_AUTO_TEST_CASE (reels_test2)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
{
- shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_red.png"));
+ shared_ptr<ImageContent> c (new ImageContent("test/data/flat_red.png"));
film->examine_and_add_content (c);
wait_for_jobs ();
c->video->set_length (24);
}
{
- shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_green.png"));
+ shared_ptr<ImageContent> c (new ImageContent("test/data/flat_green.png"));
film->examine_and_add_content (c);
wait_for_jobs ();
c->video->set_length (24);
}
{
- shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_blue.png"));
+ shared_ptr<ImageContent> c (new ImageContent("test/data/flat_blue.png"));
film->examine_and_add_content (c);
wait_for_jobs ();
c->video->set_length (24);
@@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE (reels_test2)
film2->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
film2->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
- shared_ptr<DCPContent> c (new DCPContent (film2, film->dir (film->dcp_name ())));
+ shared_ptr<DCPContent> c (new DCPContent(film->dir(film->dcp_name())));
film2->examine_and_add_content (c);
BOOST_REQUIRE (!wait_for_jobs ());
@@ -163,9 +163,9 @@ BOOST_AUTO_TEST_CASE (reels_test3)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
- shared_ptr<Content> dcp (new DCPContent (film, "test/data/reels_test2"));
+ shared_ptr<Content> dcp (new DCPContent("test/data/reels_test2"));
film->examine_and_add_content (dcp);
- shared_ptr<Content> sub (new StringTextFileContent (film, "test/data/subrip.srt"));
+ shared_ptr<Content> sub (new StringTextFileContent("test/data/subrip.srt"));
film->examine_and_add_content (sub);
wait_for_jobs ();
@@ -182,7 +182,7 @@ BOOST_AUTO_TEST_CASE (reels_test3)
BOOST_CHECK_EQUAL (i->to.get(), 96000 * 3);
++i;
BOOST_CHECK_EQUAL (i->from.get(), 96000 * 3);
- BOOST_CHECK_EQUAL (i->to.get(), sub->full_length().ceil(film->video_frame_rate()).get());
+ BOOST_CHECK_EQUAL (i->to.get(), sub->full_length(film).ceil(film->video_frame_rate()).get());
}
/** Check creation of a multi-reel DCP with a single .srt subtitle file;
@@ -200,13 +200,13 @@ BOOST_AUTO_TEST_CASE (reels_test4)
/* 4 piece of 1s-long content */
shared_ptr<ImageContent> content[4];
for (int i = 0; i < 4; ++i) {
- content[i].reset (new ImageContent (film, "test/data/flat_green.png"));
+ content[i].reset (new ImageContent("test/data/flat_green.png"));
film->examine_and_add_content (content[i]);
wait_for_jobs ();
content[i]->video->set_length (24);
}
- shared_ptr<StringTextFileContent> subs (new StringTextFileContent (film, "test/data/subrip3.srt"));
+ shared_ptr<StringTextFileContent> subs (new StringTextFileContent("test/data/subrip3.srt"));
film->examine_and_add_content (subs);
wait_for_jobs ();
@@ -235,15 +235,15 @@ BOOST_AUTO_TEST_CASE (reels_test5)
{
shared_ptr<Film> film = new_test_film ("reels_test5");
film->set_sequence (false);
- shared_ptr<DCPContent> dcp (new DCPContent (film, "test/data/reels_test4"));
+ shared_ptr<DCPContent> dcp (new DCPContent("test/data/reels_test4"));
film->examine_and_add_content (dcp);
BOOST_REQUIRE (!wait_for_jobs ());
/* Set to 2123 but it will be rounded up to the next frame (4000) */
- dcp->set_position(DCPTime(2123));
+ dcp->set_position(film, DCPTime(2123));
{
- list<DCPTimePeriod> p = dcp->reels ();
+ list<DCPTimePeriod> p = dcp->reels (film);
BOOST_REQUIRE_EQUAL (p.size(), 4);
list<DCPTimePeriod>::const_iterator i = p.begin();
BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 0), DCPTime(4000 + 96000)));
@@ -254,7 +254,7 @@ BOOST_AUTO_TEST_CASE (reels_test5)
{
dcp->set_trim_start (ContentTime::from_seconds (0.5));
- list<DCPTimePeriod> p = dcp->reels ();
+ list<DCPTimePeriod> p = dcp->reels (film);
BOOST_REQUIRE_EQUAL (p.size(), 4);
list<DCPTimePeriod>::const_iterator i = p.begin();
BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 0), DCPTime(4000 + 48000)));
@@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE (reels_test5)
{
dcp->set_trim_end (ContentTime::from_seconds (0.5));
- list<DCPTimePeriod> p = dcp->reels ();
+ list<DCPTimePeriod> p = dcp->reels (film);
BOOST_REQUIRE_EQUAL (p.size(), 4);
list<DCPTimePeriod>::const_iterator i = p.begin();
BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 0), DCPTime(4000 + 48000)));
@@ -276,7 +276,7 @@ BOOST_AUTO_TEST_CASE (reels_test5)
{
dcp->set_trim_start (ContentTime::from_seconds (1.5));
- list<DCPTimePeriod> p = dcp->reels ();
+ list<DCPTimePeriod> p = dcp->reels (film);
BOOST_REQUIRE_EQUAL (p.size(), 3);
list<DCPTimePeriod>::const_iterator i = p.begin();
BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 0), DCPTime(4000 + 48000)));
@@ -292,7 +292,7 @@ BOOST_AUTO_TEST_CASE (reels_test6)
film->set_name ("reels_test6");
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
- shared_ptr<FFmpegContent> A (new FFmpegContent (film, "test/data/test2.mp4"));
+ shared_ptr<FFmpegContent> A (new FFmpegContent("test/data/test2.mp4"));
film->examine_and_add_content (A);
BOOST_REQUIRE (!wait_for_jobs ());
@@ -313,10 +313,10 @@ BOOST_AUTO_TEST_CASE (reels_test7)
film->set_name ("reels_test7");
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
- shared_ptr<Content> A = content_factory(film, "test/data/flat_red.png").front();
+ shared_ptr<Content> A = content_factory("test/data/flat_red.png").front();
film->examine_and_add_content (A);
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<Content> B = content_factory(film, "test/data/awkward_length.wav").front();
+ shared_ptr<Content> B = content_factory("test/data/awkward_length.wav").front();
film->examine_and_add_content (B);
BOOST_REQUIRE (!wait_for_jobs ());
film->set_video_frame_rate (24);
@@ -338,7 +338,7 @@ BOOST_AUTO_TEST_CASE (reels_test8)
film->set_name ("reels_test8");
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
- shared_ptr<FFmpegContent> A (new FFmpegContent (film, "test/data/test2.mp4"));
+ shared_ptr<FFmpegContent> A (new FFmpegContent("test/data/test2.mp4"));
film->examine_and_add_content (A);
BOOST_REQUIRE (!wait_for_jobs ());
@@ -351,7 +351,7 @@ BOOST_AUTO_TEST_CASE (reels_test8)
BOOST_AUTO_TEST_CASE (reels_test9)
{
shared_ptr<Film> film = new_test_film2("reels_test9a");
- shared_ptr<FFmpegContent> A(new FFmpegContent(film, "test/data/flat_red.png"));
+ shared_ptr<FFmpegContent> A(new FFmpegContent("test/data/flat_red.png"));
film->examine_and_add_content(A);
BOOST_REQUIRE(!wait_for_jobs());
A->video->set_length(5 * 24);
@@ -360,9 +360,9 @@ BOOST_AUTO_TEST_CASE (reels_test9)
BOOST_REQUIRE(!wait_for_jobs());
shared_ptr<Film> film2 = new_test_film2("reels_test9b");
- shared_ptr<DCPContent> B(new DCPContent(film2, film->dir(film->dcp_name())));
+ shared_ptr<DCPContent> B(new DCPContent(film->dir(film->dcp_name())));
film2->examine_and_add_content(B);
- film2->examine_and_add_content(content_factory(film, "test/data/dcp_sub4.xml").front());
+ film2->examine_and_add_content(content_factory("test/data/dcp_sub4.xml").front());
B->set_reference_video(true);
B->set_reference_audio(true);
BOOST_REQUIRE(!wait_for_jobs());
diff --git a/test/remake_id_test.cc b/test/remake_id_test.cc
index ac1bfbe14..349884f91 100644
--- a/test/remake_id_test.cc
+++ b/test/remake_id_test.cc
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE (remake_id_test1)
{
/* Make a DCP */
shared_ptr<Film> film = new_test_film2 ("remake_id_test1_1");
- shared_ptr<Content> content = content_factory(film, "test/data/flat_red.png").front();
+ shared_ptr<Content> content = content_factory("test/data/flat_red.png").front();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
film->make_dcp ();
@@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE (remake_id_test2)
{
/* Make a DCP */
shared_ptr<Film> film = new_test_film2 ("remake_id_test2_1");
- shared_ptr<Content> content = content_factory(film, "test/data/flat_red.png").front();
+ shared_ptr<Content> content = content_factory("test/data/flat_red.png").front();
film->examine_and_add_content (content);
film->set_encrypted (true);
BOOST_REQUIRE (!wait_for_jobs ());
@@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE (remake_id_test2)
/* Import the DCP into a new film */
shared_ptr<Film> film2 = new_test_film2("remake_id_test2_2");
- shared_ptr<DCPContent> dcp_content(new DCPContent(film2, film->dir(film->dcp_name())));
+ shared_ptr<DCPContent> dcp_content(new DCPContent(film->dir(film->dcp_name())));
film2->examine_and_add_content(dcp_content);
BOOST_REQUIRE(!wait_for_jobs());
dcp_content->add_kdm(kdm);
diff --git a/test/remake_with_subtitle_test.cc b/test/remake_with_subtitle_test.cc
index c54dee61f..399796698 100644
--- a/test/remake_with_subtitle_test.cc
+++ b/test/remake_with_subtitle_test.cc
@@ -34,7 +34,7 @@ using boost::dynamic_pointer_cast;
BOOST_AUTO_TEST_CASE (remake_with_subtitle_test)
{
shared_ptr<Film> film = new_test_film2 ("remake_with_subtitle_test");
- shared_ptr<FFmpegContent> content = dynamic_pointer_cast<FFmpegContent>(content_factory(film, private_data / "prophet_short_clip.mkv").front());
+ shared_ptr<FFmpegContent> content = dynamic_pointer_cast<FFmpegContent>(content_factory(private_data / "prophet_short_clip.mkv").front());
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
content->only_text()->set_burn (true);
diff --git a/test/repeat_frame_test.cc b/test/repeat_frame_test.cc
index fd64ba018..badf5d9ff 100644
--- a/test/repeat_frame_test.cc
+++ b/test/repeat_frame_test.cc
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE (repeat_frame_test)
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
film->set_interop (false);
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/red_24.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/red_24.mp4"));
film->examine_and_add_content (c);
wait_for_jobs ();
diff --git a/test/required_disk_space_test.cc b/test/required_disk_space_test.cc
index bcb53bdaf..812b35ff8 100644
--- a/test/required_disk_space_test.cc
+++ b/test/required_disk_space_test.cc
@@ -43,10 +43,10 @@ BOOST_AUTO_TEST_CASE (required_disk_space_test)
shared_ptr<Film> film = new_test_film ("required_disk_space_test");
film->set_j2k_bandwidth (100000000);
film->set_audio_channels (6);
- shared_ptr<Content> content_a = content_factory(film, "test/data/flat_blue.png").front();
+ shared_ptr<Content> content_a = content_factory("test/data/flat_blue.png").front();
BOOST_REQUIRE (content_a);
film->examine_and_add_content (content_a);
- shared_ptr<DCPContent> content_b (new DCPContent (film, "test/data/burnt_subtitle_test_dcp"));
+ shared_ptr<DCPContent> content_b (new DCPContent("test/data/burnt_subtitle_test_dcp"));
film->examine_and_add_content (content_b);
wait_for_jobs ();
film->write_metadata ();
diff --git a/test/scaling_test.cc b/test/scaling_test.cc
index ed0461005..d2f886736 100644
--- a/test/scaling_test.cc
+++ b/test/scaling_test.cc
@@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE (scaling_test)
shared_ptr<Film> film = new_test_film ("scaling_test");
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
film->set_name ("scaling_test");
- shared_ptr<ImageContent> imc (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
+ shared_ptr<ImageContent> imc (new ImageContent("test/data/simple_testcard_640x480.png"));
film->examine_and_add_content (imc);
diff --git a/test/silence_padding_test.cc b/test/silence_padding_test.cc
index 6c7d0b5ff..2bc0c3bb6 100644
--- a/test/silence_padding_test.cc
+++ b/test/silence_padding_test.cc
@@ -50,7 +50,7 @@ test_silence_padding (int channels)
film->set_container (Ratio::from_id ("185"));
film->set_name (film_name);
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/staircase.wav"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/staircase.wav"));
film->examine_and_add_content (content);
wait_for_jobs ();
diff --git a/test/skip_frame_test.cc b/test/skip_frame_test.cc
index fdea35849..6c08291e1 100644
--- a/test/skip_frame_test.cc
+++ b/test/skip_frame_test.cc
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE (skip_frame_test)
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
film->set_interop (false);
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/count300bd48.m2ts"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/count300bd48.m2ts"));
film->examine_and_add_content (c);
wait_for_jobs ();
diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc
index c4bdd76d1..31a082015 100644
--- a/test/srt_subtitle_test.cc
+++ b/test/srt_subtitle_test.cc
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test)
film->set_name ("frobozz");
film->set_audio_channels (6);
film->set_interop (false);
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip2.srt"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent("test/data/subrip2.srt"));
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2)
film->set_name ("frobozz");
film->set_audio_channels (6);
film->set_interop (false);
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip2.srt"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent ("test/data/subrip2.srt"));
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3)
film->set_name ("frobozz");
film->set_interop (true);
film->set_audio_channels (6);
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, private_data / "Ankoemmling_short.srt"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent(private_data / "Ankoemmling_short.srt"));
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test4)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
film->set_interop (false);
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip2.srt"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent("test/data/subrip2.srt"));
content->only_text()->set_use (true);
content->only_text()->set_burn (false);
film->examine_and_add_content (content);
@@ -146,13 +146,13 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test5)
film->set_name ("frobozz");
film->set_interop (true);
film->set_sequence (false);
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip2.srt"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent("test/data/subrip2.srt"));
content->only_text()->set_use (true);
content->only_text()->set_burn (false);
film->examine_and_add_content (content);
film->examine_and_add_content (content);
wait_for_jobs ();
- content->set_position (DCPTime (0));
+ content->set_position (film, DCPTime());
film->make_dcp ();
wait_for_jobs ();
film->write_metadata ();
@@ -164,7 +164,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test6)
{
shared_ptr<Film> film = new_test_film2 ("srt_subtitle_test6");
film->set_interop (false);
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/frames.srt"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent("test/data/frames.srt"));
content->only_text()->set_use (true);
content->only_text()->set_burn (false);
film->examine_and_add_content (content);
@@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test6)
BOOST_AUTO_TEST_CASE (srt_subtitle_test4)
{
shared_ptr<Film> film = new_test_film ("subrip_render_test");
- shared_ptr<StringTextFile> content (new StringTextFile (film, "test/data/subrip.srt"));
+ shared_ptr<StringTextFile> content (new StringTextFile("test/data/subrip.srt"));
content->examine (shared_ptr<Job> (), true);
BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds ((3 * 60) + 56.471));
diff --git a/test/ssa_subtitle_test.cc b/test/ssa_subtitle_test.cc
index cd22450a6..c1524bc29 100644
--- a/test/ssa_subtitle_test.cc
+++ b/test/ssa_subtitle_test.cc
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE (ssa_subtitle_test1)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
film->set_interop (true);
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, private_data / "DKH_UT_EN20160601def.ssa"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent(private_data / "DKH_UT_EN20160601def.ssa"));
film->examine_and_add_content (content);
wait_for_jobs ();
diff --git a/test/subtitle_charset_test.cc b/test/subtitle_charset_test.cc
index 9c61b83f4..29dabe4bb 100644
--- a/test/subtitle_charset_test.cc
+++ b/test/subtitle_charset_test.cc
@@ -33,7 +33,7 @@ using boost::dynamic_pointer_cast;
BOOST_AUTO_TEST_CASE (subtitle_charset_test1)
{
shared_ptr<Film> film = new_test_film2 ("subtitle_charset_test1");
- shared_ptr<Content> content = content_factory (film, private_data / "PADDINGTON soustitresVFdef.srt").front ();
+ shared_ptr<Content> content = content_factory (private_data / "PADDINGTON soustitresVFdef.srt").front();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
}
@@ -42,11 +42,11 @@ BOOST_AUTO_TEST_CASE (subtitle_charset_test1)
BOOST_AUTO_TEST_CASE (subtitle_charset_test2)
{
shared_ptr<Film> film = new_test_film2 ("subtitle_charset_test2");
- shared_ptr<Content> content = content_factory (film, "test/data/osx.srt").front ();
+ shared_ptr<Content> content = content_factory ("test/data/osx.srt").front();
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
shared_ptr<StringTextFileContent> ts = dynamic_pointer_cast<StringTextFileContent> (content);
BOOST_REQUIRE (ts);
/* Make sure we got the subtitle data from the file */
- BOOST_REQUIRE_EQUAL (content->full_length().get(), 6052032);
+ BOOST_REQUIRE_EQUAL (content->full_length(film).get(), 6052032);
}
diff --git a/test/subtitle_reel_number_test.cc b/test/subtitle_reel_number_test.cc
index f02920b7f..0726ee2e4 100644
--- a/test/subtitle_reel_number_test.cc
+++ b/test/subtitle_reel_number_test.cc
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test)
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
- shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip5.srt"));
+ shared_ptr<StringTextFileContent> content (new StringTextFileContent("test/data/subrip5.srt"));
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
content->only_text()->set_use (true);
diff --git a/test/subtitle_trim_test.cc b/test/subtitle_trim_test.cc
index 33bcf823f..2380449d8 100644
--- a/test/subtitle_trim_test.cc
+++ b/test/subtitle_trim_test.cc
@@ -29,7 +29,7 @@ using boost::shared_ptr;
BOOST_AUTO_TEST_CASE (subtitle_trim_test1)
{
shared_ptr<Film> film = new_test_film2 ("subtitle_trim_test1");
- shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent (film, "test/data/dcp_sub5.xml"));
+ shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent ("test/data/dcp_sub5.xml"));
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
diff --git a/test/threed_test.cc b/test/threed_test.cc
index 41d92bc2f..a8d3f8a00 100644
--- a/test/threed_test.cc
+++ b/test/threed_test.cc
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (threed_test1)
{
shared_ptr<Film> film = new_test_film ("threed_test1");
film->set_name ("test_film1");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (c);
wait_for_jobs ();
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE (threed_test2)
{
shared_ptr<Film> film = new_test_film ("threed_test2");
film->set_name ("test_film2");
- shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (c);
wait_for_jobs ();
@@ -85,9 +85,9 @@ BOOST_AUTO_TEST_CASE (threed_test2)
BOOST_AUTO_TEST_CASE (threed_test3)
{
shared_ptr<Film> film = new_test_film2 ("threed_test3");
- shared_ptr<FFmpegContent> L (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> L (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (L);
- shared_ptr<FFmpegContent> R (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> R (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (R);
wait_for_jobs ();
@@ -104,9 +104,9 @@ BOOST_AUTO_TEST_CASE (threed_test3)
BOOST_AUTO_TEST_CASE (threed_test4)
{
shared_ptr<Film> film = new_test_film2 ("threed_test4");
- shared_ptr<FFmpegContent> L (new FFmpegContent (film, private_data / "LEFT_TEST_DCP3D4K.mov"));
+ shared_ptr<FFmpegContent> L (new FFmpegContent(private_data / "LEFT_TEST_DCP3D4K.mov"));
film->examine_and_add_content (L);
- shared_ptr<FFmpegContent> R (new FFmpegContent (film, private_data / "RIGHT_TEST_DCP3D4K.mov"));
+ shared_ptr<FFmpegContent> R (new FFmpegContent(private_data / "RIGHT_TEST_DCP3D4K.mov"));
film->examine_and_add_content (R);
wait_for_jobs ();
@@ -123,9 +123,9 @@ BOOST_AUTO_TEST_CASE (threed_test4)
BOOST_AUTO_TEST_CASE (threed_test5)
{
shared_ptr<Film> film = new_test_film2 ("threed_test5");
- shared_ptr<FFmpegContent> L (new FFmpegContent (film, private_data / "boon_telly.mkv"));
+ shared_ptr<FFmpegContent> L (new FFmpegContent(private_data / "boon_telly.mkv"));
film->examine_and_add_content (L);
- shared_ptr<FFmpegContent> R (new FFmpegContent (film, private_data / "boon_telly.mkv"));
+ shared_ptr<FFmpegContent> R (new FFmpegContent(private_data / "boon_telly.mkv"));
film->examine_and_add_content (R);
wait_for_jobs ();
diff --git a/test/time_calculation_test.cc b/test/time_calculation_test.cc
index 86b702f37..e995a4ed0 100644
--- a/test/time_calculation_test.cc
+++ b/test/time_calculation_test.cc
@@ -132,23 +132,23 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test)
doc->read_string (xml);
list<string> notes;
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, doc, film->state_version(), notes));
+ shared_ptr<FFmpegContent> content (new FFmpegContent(doc, film->state_version(), notes));
/* 25fps content, 25fps DCP */
film->set_video_frame_rate (25);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() / 25.0).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() / 25.0).get());
/* 25fps content, 24fps DCP; length should be increased */
film->set_video_frame_rate (24);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() / 24.0).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() / 24.0).get());
/* 25fps content, 30fps DCP; length should be decreased */
film->set_video_frame_rate (30);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() / 30.0).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() / 30.0).get());
/* 25fps content, 50fps DCP; length should be the same */
film->set_video_frame_rate (50);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() / 25.0).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() / 25.0).get());
/* 25fps content, 60fps DCP; length should be decreased */
film->set_video_frame_rate (60);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(content->video->length() * (50.0 / 60) / 25.0).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() * (50.0 / 60) / 25.0).get());
/* Make the content audio-only */
content->video.reset ();
@@ -156,23 +156,23 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test)
/* 24fps content, 24fps DCP */
film->set_video_frame_rate (24);
content->set_video_frame_rate (24);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(1).get());
+ 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);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(1).get());
+ 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);
- BOOST_CHECK_SMALL (labs (content->full_length().get() - DCPTime::from_seconds(25.0 / 24).get()), 2L);
+ BOOST_CHECK_SMALL (labs (content->full_length(film).get() - DCPTime::from_seconds(25.0 / 24).get()), 2L);
/* 25fps content, 30fps DCP; length should be decreased */
film->set_video_frame_rate (30);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(25.0 / 30).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(25.0 / 30).get());
/* 25fps content, 50fps DCP; length should be the same */
film->set_video_frame_rate (50);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(1).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(1).get());
/* 25fps content, 60fps DCP; length should be decreased */
film->set_video_frame_rate (60);
- BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(50.0 / 60).get());
+ BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(50.0 / 60).get());
}
@@ -185,14 +185,14 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
doc->read_string (xml);
list<string> notes;
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, doc, film->state_version(), notes));
+ shared_ptr<FFmpegContent> content (new FFmpegContent(doc, film->state_version(), notes));
film->set_sequence (false);
film->add_content (content);
shared_ptr<Player> player (new Player (film, film->playlist ()));
/* Position 0, no trim, content rate = DCP rate */
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -204,7 +204,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
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 (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -218,7 +218,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (9.75)), 162);
/* Position 3s, 1.5s trim, content rate = DCP rate */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -235,7 +235,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
Now, for example, a DCPTime position of 3s means 3s at 25fps. Since we run the video
fast (at 25fps) in this case, this means 75 frames of content video will be used.
*/
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -247,7 +247,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (3.0)), 75);
/* Position 3s, no trim, content rate 24, DCP rate 25 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -264,7 +264,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
so it's 1.6s at 24fps. Note that trims are rounded to the nearest video frame, so
some of these results are not quite what you'd perhaps expect.
*/
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.6));
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -283,7 +283,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
be used to make 3 * 48 frames of DCP video. The results should be the same as the
content rate = DCP rate case.
*/
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (48);
@@ -295,7 +295,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (3.0)), 72);
/* Position 3s, no trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (48);
@@ -309,7 +309,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (9.75)), 162);
/* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (24);
film->set_video_frame_rate (48);
@@ -327,7 +327,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
with skipped frames in this case, 3 * 48 frames of content video will
be used to make 3 * 24 frames of DCP video.
*/
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (48);
film->set_video_frame_rate (24);
@@ -339,7 +339,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (3.0)), 144);
/* Position 3s, no trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (48);
film->set_video_frame_rate (24);
@@ -353,7 +353,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (9.75)), 324);
/* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (48);
film->set_video_frame_rate (24);
@@ -367,7 +367,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
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_position (film, DCPTime::from_seconds(0));
content->set_trim_start (ContentTime::from_seconds (0));
content->set_video_frame_rate (29.9978733);
film->set_video_frame_rate (30);
@@ -391,14 +391,14 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
doc->read_string (xml);
list<string> notes;
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, doc, film->state_version(), notes));
+ shared_ptr<FFmpegContent> content (new FFmpegContent(doc, film->state_version(), notes));
film->set_sequence (false);
film->add_content (content);
shared_ptr<Player> player (new Player (film, film->playlist ()));
/* Position 0, no trim, content rate = DCP rate */
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -410,7 +410,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
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 (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -422,7 +422,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 162).get(), DCPTime::from_seconds(9.75).get());
/* Position 3s, 1.5s trim, content rate = DCP rate */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -438,7 +438,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
Now, for example, a DCPTime position of 3s means 3s at 25fps. Since we run the video
fast (at 25fps) in this case, this means 75 frames of content video will be used.
*/
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -450,7 +450,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 75).get(), DCPTime::from_seconds(3.0).get());
/* Position 3s, no trim, content rate 24, DCP rate 25 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -462,7 +462,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 169).get(), DCPTime::from_seconds(9.76).get());
/* 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_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.6));
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -480,7 +480,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
be used to make 3 * 48 frames of DCP video. The results should be the same as the
content rate = DCP rate case.
*/
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (48);
@@ -492,7 +492,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 72).get(), DCPTime::from_seconds(3.0).get());
/* Position 3s, no trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (48);
@@ -504,7 +504,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 162).get(), DCPTime::from_seconds(9.75).get());
/* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (24);
film->set_video_frame_rate (48);
@@ -521,7 +521,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
with skipped frames in this case, 3 * 48 frames of content video will
be used to make 3 * 24 frames of DCP video.
*/
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (48);
film->set_video_frame_rate (24);
@@ -533,7 +533,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 144).get(), DCPTime::from_seconds(3.0).get());
/* Position 3s, no trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (48);
film->set_video_frame_rate (24);
@@ -545,7 +545,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 324).get(), DCPTime::from_seconds(9.75).get());
/* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (48);
film->set_video_frame_rate (24);
@@ -567,7 +567,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
doc->read_string (xml);
list<string> notes;
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, doc, film->state_version(), notes));
+ shared_ptr<FFmpegContent> content (new FFmpegContent(doc, film->state_version(), notes));
AudioStreamPtr stream = content->audio->streams().front();
film->set_sequence (false);
film->add_content (content);
@@ -575,7 +575,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
shared_ptr<Player> player (new Player (film, film->playlist ()));
/* Position 0, no trim, video/audio content rate = video/audio DCP rate */
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -588,7 +588,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (3.0)), 144000);
/* Position 3s, no trim, video/audio content rate = video/audio DCP rate */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds (3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -603,7 +603,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 324000);
/* Position 3s, 1.5s trim, video/audio content rate = video/audio DCP rate */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds (3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -618,7 +618,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 396000);
/* Position 0, no trim, content video rate 24, DCP video rate 25, both audio rates still 48k */
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -631,7 +631,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (3.0)), 144000);
/* 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_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -648,7 +648,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
/* Position 3s, 1.6s trim, content rate 24, DCP rate 25, both audio rates still 48k.
1s of content is 46080 samples after resampling.
*/
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.6));
content->set_video_frame_rate (24);
film->set_video_frame_rate (25);
@@ -667,7 +667,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
with repeated frames in this case, audio samples will map straight through.
The results should be the same as the content rate = DCP rate case.
*/
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (48);
@@ -680,7 +680,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (3.0)), 144000);
/* Position 3s, no trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -695,7 +695,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 324000);
/* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -713,7 +713,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
Now, for example, a DCPTime position of 3s means 3s at 24fps. Since we run the video
with skipped frames in this case, audio samples should map straight through.
*/
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (48);
@@ -726,7 +726,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (3.0)), 144000);
/* Position 3s, no trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -741,7 +741,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 324000);
/* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -756,7 +756,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 396000);
/* Position 0, no trim, video content rate = video DCP rate, content audio rate = 44.1k */
- content->set_position (DCPTime ());
+ content->set_position (film, DCPTime());
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -769,7 +769,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (3.0)), 144000);
/* Position 3s, no trim, video content rate = video DCP rate, content audio rate = 44.1k */
- content->set_position (DCPTime::from_seconds (3));
+ content->set_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime ());
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -784,7 +784,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 324000);
/* 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_position (film, DCPTime::from_seconds(3));
content->set_trim_start (ContentTime::from_seconds (1.5));
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
@@ -799,7 +799,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (9.75)), 396000);
/* Check with a large start trim */
- content->set_position (DCPTime::from_seconds (0));
+ content->set_position (film, DCPTime::from_seconds(0));
content->set_trim_start (ContentTime::from_seconds (54143));
content->set_video_frame_rate (24);
film->set_video_frame_rate (24);
diff --git a/test/torture_test.cc b/test/torture_test.cc
index 3736b3e65..b6079096d 100644
--- a/test/torture_test.cc
+++ b/test/torture_test.cc
@@ -56,28 +56,28 @@ BOOST_AUTO_TEST_CASE (torture_test1)
film->set_sequence (false);
/* Staircase at an offset of 2000 samples, trimmed both start and end, with a gain of 6dB */
- shared_ptr<Content> staircase = content_factory(film, "test/data/staircase.wav").front ();
+ shared_ptr<Content> staircase = content_factory("test/data/staircase.wav").front ();
film->examine_and_add_content (staircase);
wait_for_jobs ();
- staircase->set_position (DCPTime::from_frames (2000, film->audio_frame_rate()));
+ staircase->set_position (film, DCPTime::from_frames (2000, film->audio_frame_rate()));
staircase->set_trim_start (ContentTime::from_frames (12, 48000));
staircase->set_trim_end (ContentTime::from_frames (35, 48000));
staircase->audio->set_gain (20 * log10(2));
/* And again at an offset of 50000 samples, trimmed both start and end, with a gain of 6dB */
- staircase = content_factory(film, "test/data/staircase.wav").front ();
+ staircase = content_factory("test/data/staircase.wav").front ();
film->examine_and_add_content (staircase);
wait_for_jobs ();
- staircase->set_position (DCPTime::from_frames (50000, film->audio_frame_rate()));
+ staircase->set_position (film, DCPTime::from_frames(50000, film->audio_frame_rate()));
staircase->set_trim_start (ContentTime::from_frames (12, 48000));
staircase->set_trim_end (ContentTime::from_frames (35, 48000));
staircase->audio->set_gain (20 * log10(2));
/* 1s of red at 5s in */
- shared_ptr<Content> red = content_factory(film, "test/data/flat_red.png").front ();
+ shared_ptr<Content> red = content_factory("test/data/flat_red.png").front ();
film->examine_and_add_content (red);
wait_for_jobs ();
- red->set_position (DCPTime::from_seconds (5));
+ red->set_position (film, DCPTime::from_seconds(5));
red->video->set_length (24);
film->set_video_frame_rate (24);
diff --git a/test/upmixer_a_test.cc b/test/upmixer_a_test.cc
index 651ac7f38..c89d3f29a 100644
--- a/test/upmixer_a_test.cc
+++ b/test/upmixer_a_test.cc
@@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE (upmixer_a_test)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
film->set_audio_processor (AudioProcessor::from_id ("stereo-5.1-upmix-a"));
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/white.wav"));
+ shared_ptr<FFmpegContent> content (new FFmpegContent ("test/data/white.wav"));
film->examine_and_add_content (content);
wait_for_jobs ();
diff --git a/test/vf_kdm_test.cc b/test/vf_kdm_test.cc
index bbaa3d6d2..9b48f9b28 100644
--- a/test/vf_kdm_test.cc
+++ b/test/vf_kdm_test.cc
@@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE (vf_kdm_test)
A->set_name ("frobozz");
A->set_interop (true);
- shared_ptr<FFmpegContent> c (new FFmpegContent (A, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/test.mp4"));
A->examine_and_add_content (c);
A->set_encrypted (true);
wait_for_jobs ();
@@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE (vf_kdm_test)
B->set_name ("frobozz");
B->set_interop (true);
- shared_ptr<DCPContent> d (new DCPContent (B, "build/test/vf_kdm_test_ov/" + A->dcp_name()));
+ shared_ptr<DCPContent> d (new DCPContent ("build/test/vf_kdm_test_ov/" + A->dcp_name()));
d->add_kdm (A_kdm);
d->set_reference_video (true);
B->examine_and_add_content (d);
@@ -112,7 +112,7 @@ BOOST_AUTO_TEST_CASE (vf_kdm_test)
C->set_name ("frobozz");
C->set_interop (true);
- shared_ptr<DCPContent> e (new DCPContent (C, "build/test/vf_kdm_test_vf/" + B->dcp_name()));
+ shared_ptr<DCPContent> e (new DCPContent ("build/test/vf_kdm_test_vf/" + B->dcp_name()));
e->add_kdm (B_kdm);
e->add_ov ("build/test/vf_kdm_test_ov/" + A->dcp_name());
C->examine_and_add_content (e);
diff --git a/test/vf_test.cc b/test/vf_test.cc
index fa1e7cdab..285139f7e 100644
--- a/test/vf_test.cc
+++ b/test/vf_test.cc
@@ -48,44 +48,44 @@ BOOST_AUTO_TEST_CASE (vf_test1)
{
shared_ptr<Film> film = new_test_film ("vf_test1");
film->set_interop (false);
- shared_ptr<DCPContent> dcp (new DCPContent (film, "test/data/reels_test2"));
+ shared_ptr<DCPContent> dcp (new DCPContent ("test/data/reels_test2"));
film->examine_and_add_content (dcp);
wait_for_jobs ();
/* Multi-reel DCP can't be referenced if we are using a single reel for the project */
film->set_reel_type (REELTYPE_SINGLE);
string why_not;
- BOOST_CHECK (!dcp->can_reference_video(why_not));
- BOOST_CHECK (!dcp->can_reference_audio(why_not));
- BOOST_CHECK (!dcp->can_reference_text(TEXT_OPEN_SUBTITLE, why_not));
- BOOST_CHECK (!dcp->can_reference_text(TEXT_CLOSED_CAPTION, why_not));
+ BOOST_CHECK (!dcp->can_reference_video(film, why_not));
+ BOOST_CHECK (!dcp->can_reference_audio(film, why_not));
+ BOOST_CHECK (!dcp->can_reference_text(film, TEXT_OPEN_SUBTITLE, why_not));
+ BOOST_CHECK (!dcp->can_reference_text(film, TEXT_CLOSED_CAPTION, why_not));
/* Multi-reel DCP can be referenced if we are using by-video-content */
film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
- BOOST_CHECK (dcp->can_reference_video(why_not));
- BOOST_CHECK (dcp->can_reference_audio(why_not));
+ BOOST_CHECK (dcp->can_reference_video(film, why_not));
+ BOOST_CHECK (dcp->can_reference_audio(film, why_not));
/* (but reels_test2 has no texts to reference) */
- BOOST_CHECK (!dcp->can_reference_text(TEXT_OPEN_SUBTITLE, why_not));
- BOOST_CHECK (!dcp->can_reference_text(TEXT_CLOSED_CAPTION, why_not));
+ BOOST_CHECK (!dcp->can_reference_text(film, TEXT_OPEN_SUBTITLE, why_not));
+ BOOST_CHECK (!dcp->can_reference_text(film, TEXT_CLOSED_CAPTION, why_not));
- shared_ptr<FFmpegContent> other (new FFmpegContent (film, "test/data/test.mp4"));
+ shared_ptr<FFmpegContent> other (new FFmpegContent("test/data/test.mp4"));
film->examine_and_add_content (other);
wait_for_jobs ();
/* Not possible if there is overlap */
- other->set_position (DCPTime (0));
- BOOST_CHECK (!dcp->can_reference_video(why_not));
- BOOST_CHECK (!dcp->can_reference_audio(why_not));
- BOOST_CHECK (!dcp->can_reference_text(TEXT_OPEN_SUBTITLE, why_not));
- BOOST_CHECK (!dcp->can_reference_text(TEXT_CLOSED_CAPTION, why_not));
+ other->set_position (film, DCPTime());
+ BOOST_CHECK (!dcp->can_reference_video(film, why_not));
+ BOOST_CHECK (!dcp->can_reference_audio(film, why_not));
+ BOOST_CHECK (!dcp->can_reference_text(film, TEXT_OPEN_SUBTITLE, why_not));
+ BOOST_CHECK (!dcp->can_reference_text(film, TEXT_CLOSED_CAPTION, why_not));
/* This should not be considered an overlap */
- other->set_position (dcp->end ());
- BOOST_CHECK (dcp->can_reference_video(why_not));
- BOOST_CHECK (dcp->can_reference_audio(why_not));
+ other->set_position (film, dcp->end(film));
+ BOOST_CHECK (dcp->can_reference_video(film, why_not));
+ BOOST_CHECK (dcp->can_reference_audio(film, why_not));
/* (reels_test2 has no texts to reference) */
- BOOST_CHECK (!dcp->can_reference_text(TEXT_OPEN_SUBTITLE, why_not));
- BOOST_CHECK (!dcp->can_reference_text(TEXT_CLOSED_CAPTION, why_not));
+ BOOST_CHECK (!dcp->can_reference_text(film, TEXT_OPEN_SUBTITLE, why_not));
+ BOOST_CHECK (!dcp->can_reference_text(film, TEXT_CLOSED_CAPTION, why_not));
}
/** Make a OV with video and audio and a VF referencing the OV and adding subs */
@@ -95,11 +95,11 @@ BOOST_AUTO_TEST_CASE (vf_test2)
shared_ptr<Film> ov = new_test_film ("vf_test2_ov");
ov->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
ov->set_name ("vf_test2_ov");
- shared_ptr<Content> video = content_factory (ov, "test/data/flat_red.png").front();
+ shared_ptr<Content> video = content_factory ("test/data/flat_red.png").front();
ov->examine_and_add_content (video);
wait_for_jobs ();
video->video->set_length (24 * 5);
- shared_ptr<Content> audio = content_factory(ov, "test/data/white.wav").front();
+ shared_ptr<Content> audio = content_factory ("test/data/white.wav").front();
ov->examine_and_add_content (audio);
wait_for_jobs ();
ov->make_dcp ();
@@ -110,13 +110,13 @@ BOOST_AUTO_TEST_CASE (vf_test2)
vf->set_name ("vf_test2_vf");
vf->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
vf->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
- shared_ptr<DCPContent> dcp (new DCPContent (vf, ov->dir (ov->dcp_name ())));
+ shared_ptr<DCPContent> dcp (new DCPContent(ov->dir (ov->dcp_name ())));
BOOST_REQUIRE (dcp);
vf->examine_and_add_content (dcp);
wait_for_jobs ();
dcp->set_reference_video (true);
dcp->set_reference_audio (true);
- shared_ptr<Content> sub = content_factory(vf, "test/data/subrip4.srt").front();
+ shared_ptr<Content> sub = content_factory("test/data/subrip4.srt").front();
vf->examine_and_add_content (sub);
DCPOMATIC_ASSERT (!wait_for_jobs ());
vf->make_dcp ();
@@ -153,11 +153,11 @@ BOOST_AUTO_TEST_CASE (vf_test3)
shared_ptr<Film> ov = new_test_film ("vf_test3_ov");
ov->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
ov->set_name ("vf_test3_ov");
- shared_ptr<Content> video = content_factory(ov, "test/data/flat_red.png").front();
+ shared_ptr<Content> video = content_factory("test/data/flat_red.png").front();
ov->examine_and_add_content (video);
wait_for_jobs ();
video->video->set_length (24 * 5);
- shared_ptr<Content> audio = content_factory(ov, "test/data/white.wav").front();
+ shared_ptr<Content> audio = content_factory("test/data/white.wav").front();
ov->examine_and_add_content (audio);
wait_for_jobs ();
ov->make_dcp ();
@@ -168,7 +168,7 @@ BOOST_AUTO_TEST_CASE (vf_test3)
vf->set_name ("vf_test3_vf");
vf->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
vf->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
- shared_ptr<DCPContent> dcp (new DCPContent (vf, ov->dir (ov->dcp_name ())));
+ shared_ptr<DCPContent> dcp (new DCPContent(ov->dir(ov->dcp_name())));
BOOST_REQUIRE (dcp);
dcp->set_trim_start (ContentTime::from_seconds (1));
dcp->set_trim_end (ContentTime::from_seconds (1));
@@ -199,11 +199,11 @@ BOOST_AUTO_TEST_CASE (vf_test4)
shared_ptr<Film> ov = new_test_film ("vf_test4_ov");
ov->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
ov->set_name ("vf_test4_ov");
- shared_ptr<Content> video = content_factory (ov, "test/data/flat_red.png").front();
+ shared_ptr<Content> video = content_factory("test/data/flat_red.png").front();
ov->examine_and_add_content (video);
wait_for_jobs ();
video->video->set_length (24 * 5);
- shared_ptr<Content> audio = content_factory(ov, "test/data/white.wav").front();
+ shared_ptr<Content> audio = content_factory("test/data/white.wav").front();
ov->examine_and_add_content (audio);
wait_for_jobs ();
ov->make_dcp ();
@@ -215,17 +215,17 @@ BOOST_AUTO_TEST_CASE (vf_test4)
vf->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
vf->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
vf->set_sequence (false);
- shared_ptr<DCPContent> dcp (new DCPContent (vf, ov->dir (ov->dcp_name ())));
+ shared_ptr<DCPContent> dcp (new DCPContent(ov->dir(ov->dcp_name())));
BOOST_REQUIRE (dcp);
vf->examine_and_add_content (dcp);
wait_for_jobs ();
- dcp->set_position(DCPTime::from_seconds(10));
+ dcp->set_position(vf, DCPTime::from_seconds(10));
dcp->set_reference_video (true);
dcp->set_reference_audio (true);
- shared_ptr<Content> more_video = content_factory(vf, "test/data/flat_red.png").front();
+ shared_ptr<Content> more_video = content_factory("test/data/flat_red.png").front();
vf->examine_and_add_content (more_video);
DCPOMATIC_ASSERT (!wait_for_jobs ());
- more_video->set_position (DCPTime ());
+ more_video->set_position (vf, DCPTime());
vf->write_metadata ();
vf->make_dcp ();
DCPOMATIC_ASSERT (!wait_for_jobs ());
diff --git a/test/video_content_scale_test.cc b/test/video_content_scale_test.cc
index 35812df35..67bfda3e5 100644
--- a/test/video_content_scale_test.cc
+++ b/test/video_content_scale_test.cc
@@ -96,7 +96,7 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop
doc->read_string (s);
list<string> notes;
- shared_ptr<FFmpegContent> vc (new FFmpegContent (film, doc, 10, notes));
+ shared_ptr<FFmpegContent> vc (new FFmpegContent (doc, 10, notes));
optional<VideoContentScale> sc;
if (ratio) {
diff --git a/test/video_mxf_content_test.cc b/test/video_mxf_content_test.cc
index 9104702b6..5da7ad641 100644
--- a/test/video_mxf_content_test.cc
+++ b/test/video_mxf_content_test.cc
@@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE (video_mxf_content_test)
film->set_container (Ratio::from_id ("185"));
film->set_name ("video_mxf_content_test");
- shared_ptr<Content> content = content_factory(film, ref_mxf).front();
+ shared_ptr<Content> content = content_factory(ref_mxf).front();
shared_ptr<VideoMXFContent> check = dynamic_pointer_cast<VideoMXFContent> (content);
BOOST_REQUIRE (check);
film->examine_and_add_content (content);