diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-14 02:06:18 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 2d5beb0d6794df13ad1df47e84fd7a57d1d1c64d (patch) | |
| tree | 70034dc6789e55394dac0ec87b968c58b96e4b48 /test | |
| parent | 826ed68a1e34ce158342da324ff7203af0449641 (diff) | |
Rename video/audio/subtitle part methods.
Diffstat (limited to 'test')
| -rw-r--r-- | test/audio_analysis_test.cc | 2 | ||||
| -rw-r--r-- | test/audio_decoder_test.cc | 8 | ||||
| -rw-r--r-- | test/audio_delay_test.cc | 2 | ||||
| -rw-r--r-- | test/black_fill_test.cc | 4 | ||||
| -rw-r--r-- | test/dcp_subtitle_test.cc | 4 | ||||
| -rw-r--r-- | test/ffmpeg_decoder_sequential_test.cc | 2 | ||||
| -rw-r--r-- | test/ffmpeg_pts_offset_test.cc | 2 | ||||
| -rw-r--r-- | test/frame_rate_test.cc | 72 | ||||
| -rw-r--r-- | test/isdcf_name_test.cc | 2 | ||||
| -rw-r--r-- | test/recover_test.cc | 2 | ||||
| -rw-r--r-- | test/reels_test.cc | 8 | ||||
| -rw-r--r-- | test/scaling_test.cc | 2 | ||||
| -rw-r--r-- | test/seek_zero_test.cc | 2 | ||||
| -rw-r--r-- | test/srt_subtitle_test.cc | 12 | ||||
| -rw-r--r-- | test/threed_test.cc | 2 | ||||
| -rw-r--r-- | test/time_calculation_test.cc | 92 | ||||
| -rw-r--r-- | test/video_content_scale_test.cc | 2 | ||||
| -rw-r--r-- | test/xml_subtitle_test.cc | 8 |
18 files changed, 114 insertions, 114 deletions
diff --git a/test/audio_analysis_test.cc b/test/audio_analysis_test.cc index 75306d8b7..517e7f640 100644 --- a/test/audio_analysis_test.cc +++ b/test/audio_analysis_test.cc @@ -112,7 +112,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")); - c->audio->set_audio_delay (-250); + c->audio->set_delay (-250); film->examine_and_add_content (c); wait_for_jobs (); diff --git a/test/audio_decoder_test.cc b/test/audio_decoder_test.cc index f714e0682..21480a5c3 100644 --- a/test/audio_decoder_test.cc +++ b/test/audio_decoder_test.cc @@ -90,7 +90,7 @@ public: void seek (ContentTime t, bool accurate) { AudioDecoder::seek (t, accurate); - _position = t.frames_round (_test_audio_content->audio->resampled_audio_frame_rate ()); + _position = t.frames_round (_test_audio_content->audio->resampled_frame_rate ()); } private: @@ -104,7 +104,7 @@ shared_ptr<TestAudioDecoder> decoder; static ContentAudio get (Frame from, Frame length) { - decoder->seek (ContentTime::from_frames (from, content->audio->resampled_audio_frame_rate ()), true); + decoder->seek (ContentTime::from_frames (from, content->audio->resampled_frame_rate ()), true); ContentAudio ca = decoder->get_audio (content->audio->stream(), from, length, true); BOOST_CHECK_EQUAL (ca.frame, from); return ca; @@ -137,8 +137,8 @@ BOOST_AUTO_TEST_CASE (audio_decoder_get_audio_test) /* Read off the end */ - Frame const from = content->audio->resampled_audio_frame_rate() * 61; - Frame const length = content->audio->resampled_audio_frame_rate() * 4; + Frame const from = content->audio->resampled_frame_rate() * 61; + Frame const length = content->audio->resampled_frame_rate() * 4; ContentAudio ca = get (from, length); for (int i = 0; i < content->audio->stream()->channels(); ++i) { diff --git a/test/audio_delay_test.cc b/test/audio_delay_test.cc index f12e8717e..f1b804830 100644 --- a/test/audio_delay_test.cc +++ b/test/audio_delay_test.cc @@ -54,7 +54,7 @@ void test_audio_delay (int delay_in_ms) film->set_name (film_name); shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/staircase.wav")); - content->audio->set_audio_delay (delay_in_ms); + content->audio->set_delay (delay_in_ms); film->examine_and_add_content (content); wait_for_jobs (); diff --git a/test/black_fill_test.cc b/test/black_fill_test.cc index 173c256e2..02f10a31b 100644 --- a/test/black_fill_test.cc +++ b/test/black_fill_test.cc @@ -46,10 +46,10 @@ BOOST_AUTO_TEST_CASE (black_fill_test) wait_for_jobs (); contentA->video->set_scale (VideoContentScale (Ratio::from_id ("185"))); - contentA->video->set_video_length (3); + contentA->video->set_length (3); contentA->set_position (DCPTime::from_frames (2, film->video_frame_rate ())); contentB->video->set_scale (VideoContentScale (Ratio::from_id ("185"))); - contentB->video->set_video_length (1); + contentB->video->set_length (1); contentB->set_position (DCPTime::from_frames (7, film->video_frame_rate ())); film->make_dcp (); diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc index 84ec322f8..8a4677162 100644 --- a/test/dcp_subtitle_test.cc +++ b/test/dcp_subtitle_test.cc @@ -49,8 +49,8 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test) BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (2)); - content->subtitle->set_use_subtitles (true); - content->subtitle->set_burn_subtitles (false); + content->subtitle->set_use (true); + content->subtitle->set_burn (false); film->make_dcp (); wait_for_jobs (); diff --git a/test/ffmpeg_decoder_sequential_test.cc b/test/ffmpeg_decoder_sequential_test.cc index 03bf9e2ce..9cd123890 100644 --- a/test/ffmpeg_decoder_sequential_test.cc +++ b/test/ffmpeg_decoder_sequential_test.cc @@ -53,7 +53,7 @@ test (boost::filesystem::path file, float fps, int gaps, int video_length) shared_ptr<Log> log (new NullLog); shared_ptr<FFmpegDecoder> decoder (new FFmpegDecoder (content, log, false)); - BOOST_CHECK_CLOSE (decoder->video_content()->video_frame_rate(), fps, 0.01); + BOOST_CHECK_CLOSE (decoder->video_content()->frame_rate(), fps, 0.01); #ifdef DCPOMATIC_DEBUG decoder->test_gaps = 0; diff --git a/test/ffmpeg_pts_offset_test.cc b/test/ffmpeg_pts_offset_test.cc index 0148487ed..7e3cd9cfd 100644 --- a/test/ffmpeg_pts_offset_test.cc +++ b/test/ffmpeg_pts_offset_test.cc @@ -35,7 +35,7 @@ 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")); content->_audio_streams.push_back (shared_ptr<FFmpegAudioStream> (new FFmpegAudioStream)); - content->video->_video_frame_rate = 24; + content->video->_frame_rate = 24; { /* Sound == video so no offset required */ diff --git a/test/frame_rate_test.cc b/test/frame_rate_test.cc index 4d865de7b..68a6ffa2d 100644 --- a/test/frame_rate_test.cc +++ b/test/frame_rate_test.cc @@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) afr.push_back (30); Config::instance()->set_allowed_dcp_frame_rates (afr); - content->video->_video_frame_rate = 60; + content->video->_frame_rate = 60; int best = film->best_video_frame_rate (); FrameRateChange frc = FrameRateChange (60, best); BOOST_CHECK_EQUAL (best, 30); @@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, false); BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1); - content->video->_video_frame_rate = 50; + content->video->_frame_rate = 50; best = film->best_video_frame_rate (); frc = FrameRateChange (50, best); BOOST_CHECK_EQUAL (best, 25); @@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, false); BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1); - content->video->_video_frame_rate = 48; + content->video->_frame_rate = 48; best = film->best_video_frame_rate (); frc = FrameRateChange (48, best); BOOST_CHECK_EQUAL (best, 24); @@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, false); BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1); - content->video->_video_frame_rate = 30; + content->video->_frame_rate = 30; best = film->best_video_frame_rate (); frc = FrameRateChange (30, best); BOOST_CHECK_EQUAL (best, 30); @@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, false); BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1); - content->video->_video_frame_rate = 29.97; + content->video->_frame_rate = 29.97; best = film->best_video_frame_rate (); frc = FrameRateChange (29.97, best); BOOST_CHECK_EQUAL (best, 30); @@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, true); BOOST_CHECK_CLOSE (frc.speed_up, 30 / 29.97, 0.1); - content->video->_video_frame_rate = 25; + content->video->_frame_rate = 25; best = film->best_video_frame_rate (); frc = FrameRateChange (25, best); BOOST_CHECK_EQUAL (best, 25); @@ -108,7 +108,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, false); BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1); - content->video->_video_frame_rate = 24; + content->video->_frame_rate = 24; best = film->best_video_frame_rate (); frc = FrameRateChange (24, best); BOOST_CHECK_EQUAL (best, 24); @@ -117,7 +117,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, false); BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1); - content->video->_video_frame_rate = 14.5; + content->video->_frame_rate = 14.5; best = film->best_video_frame_rate (); frc = FrameRateChange (14.5, best); BOOST_CHECK_EQUAL (best, 30); @@ -126,7 +126,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, true); BOOST_CHECK_CLOSE (frc.speed_up, 15 / 14.5, 0.1); - content->video->_video_frame_rate = 12.6; + content->video->_frame_rate = 12.6; best = film->best_video_frame_rate (); frc = FrameRateChange (12.6, best); BOOST_CHECK_EQUAL (best, 25); @@ -135,7 +135,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, true); BOOST_CHECK_CLOSE (frc.speed_up, 25 / 25.2, 0.1); - content->video->_video_frame_rate = 12.4; + content->video->_frame_rate = 12.4; best = film->best_video_frame_rate (); frc = FrameRateChange (12.4, best); BOOST_CHECK_EQUAL (best, 25); @@ -144,7 +144,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, true); BOOST_CHECK_CLOSE (frc.speed_up, 25 / 24.8, 0.1); - content->video->_video_frame_rate = 12; + content->video->_frame_rate = 12; best = film->best_video_frame_rate (); frc = FrameRateChange (12, best); BOOST_CHECK_EQUAL (best, 24); @@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) afr.push_back (60); Config::instance()->set_allowed_dcp_frame_rates (afr); - content->video->_video_frame_rate = 60; + content->video->_frame_rate = 60; best = film->best_video_frame_rate (); frc = FrameRateChange (60, best); BOOST_CHECK_EQUAL (best, 60); @@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, false); BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1); - content->video->_video_frame_rate = 50; + content->video->_frame_rate = 50; best = film->best_video_frame_rate (); frc = FrameRateChange (50, best); BOOST_CHECK_EQUAL (best, 50); @@ -180,7 +180,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) BOOST_CHECK_EQUAL (frc.change_speed, false); BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1); - content->video->_video_frame_rate = 48; + content->video->_frame_rate = 48; best = film->best_video_frame_rate (); frc = FrameRateChange (48, best); BOOST_CHECK_EQUAL (best, 48); @@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single) afr.push_back (24); Config::instance()->set_allowed_dcp_frame_rates (afr); - content->video->_video_frame_rate = 25; + content->video->_frame_rate = 25; best = film->best_video_frame_rate (); frc = FrameRateChange (25, best); BOOST_CHECK_EQUAL (best, 24); @@ -234,16 +234,16 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_double) afr.push_back (30); Config::instance()->set_allowed_dcp_frame_rates (afr); - A->video->_video_frame_rate = 30; - B->video->_video_frame_rate = 24; + A->video->_frame_rate = 30; + B->video->_frame_rate = 24; BOOST_CHECK_EQUAL (film->best_video_frame_rate(), 25); - A->video->_video_frame_rate = 24; - B->video->_video_frame_rate = 24; + A->video->_frame_rate = 24; + B->video->_frame_rate = 24; BOOST_CHECK_EQUAL (film->best_video_frame_rate(), 24); - A->video->_video_frame_rate = 24; - B->video->_video_frame_rate = 48; + A->video->_frame_rate = 24; + B->video->_frame_rate = 48; BOOST_CHECK_EQUAL (film->best_video_frame_rate(), 24); } @@ -263,45 +263,45 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test) shared_ptr<FFmpegAudioStream> stream (new FFmpegAudioStream ("foo", 0, 0, 0)); content->_audio_streams.push_back (stream); - content->video->_video_frame_rate = 24; + content->video->_frame_rate = 24; film->set_video_frame_rate (24); stream->_frame_rate = 48000; - BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 48000); + BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 48000); stream->_frame_rate = 44100; - BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 48000); + BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 48000); stream->_frame_rate = 80000; - BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 96000); + BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 96000); - content->video->_video_frame_rate = 23.976; + content->video->_frame_rate = 23.976; film->set_video_frame_rate (24); stream->_frame_rate = 48000; - BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 47952); + BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 47952); - content->video->_video_frame_rate = 29.97; + 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_audio_frame_rate(), 47952); + BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 47952); - content->video->_video_frame_rate = 25; + content->video->_frame_rate = 25; film->set_video_frame_rate (24); stream->_frame_rate = 48000; - BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 50000); + BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 50000); - content->video->_video_frame_rate = 25; + content->video->_frame_rate = 25; film->set_video_frame_rate (24); stream->_frame_rate = 44100; - BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 50000); + BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 50000); /* Check some out-there conversions (not the best) */ - content->video->_video_frame_rate = 14.99; + content->video->_frame_rate = 14.99; film->set_video_frame_rate (25); stream->_frame_rate = 16000; - /* The FrameRateChange within resampled_audio_frame_rate should choose to double-up + /* 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_audio_frame_rate(), lrint (48000 * 2 * 14.99 / 25)); + BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), lrint (48000 * 2 * 14.99 / 25)); } diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc index de56d476e..bdd9c0313 100644 --- a/test/isdcf_name_test.cc +++ b/test/isdcf_name_test.cc @@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) 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"); - AudioMapping mapping = sound->audio->audio_mapping (); + AudioMapping mapping = sound->audio->mapping (); mapping.set (0, dcp::LEFT, 1.0); sound->audio->set_mapping (mapping); diff --git a/test/recover_test.cc b/test/recover_test.cc index 006a21646..5d86fb927 100644 --- a/test/recover_test.cc +++ b/test/recover_test.cc @@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE (recover_test_3d) film->set_three_d (true); shared_ptr<ImageContent> content (new ImageContent (film, "test/data/3d_test")); - content->video->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT); + content->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT); film->examine_and_add_content (content); wait_for_jobs (); diff --git a/test/reels_test.cc b/test/reels_test.cc index ac4fcdd99..c30ae6c60 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -89,21 +89,21 @@ BOOST_AUTO_TEST_CASE (reels_test2) shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_red.png")); film->examine_and_add_content (c); wait_for_jobs (); - c->video->set_video_length (24); + c->video->set_length (24); } { shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_green.png")); film->examine_and_add_content (c); wait_for_jobs (); - c->video->set_video_length (24); + c->video->set_length (24); } { shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_blue.png")); film->examine_and_add_content (c); wait_for_jobs (); - c->video->set_video_length (24); + c->video->set_length (24); } film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT); @@ -193,7 +193,7 @@ BOOST_AUTO_TEST_CASE (reels_test4) content[i].reset (new ImageContent (film, "test/data/flat_green.png")); film->examine_and_add_content (content[i]); wait_for_jobs (); - content[i]->video->set_video_length (24); + content[i]->video->set_length (24); } shared_ptr<TextSubtitleContent> subs (new TextSubtitleContent (film, "test/data/subrip3.srt")); diff --git a/test/scaling_test.cc b/test/scaling_test.cc index 25359c605..43f5ed7e7 100644 --- a/test/scaling_test.cc +++ b/test/scaling_test.cc @@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE (scaling_test) wait_for_jobs (); - imc->video->set_video_length (1); + imc->video->set_length (1); /* F-133: 133 image in a flat container */ scaling_test_for (film, imc, "133", "185"); diff --git a/test/seek_zero_test.cc b/test/seek_zero_test.cc index 612a5f548..f05920c26 100644 --- a/test/seek_zero_test.cc +++ b/test/seek_zero_test.cc @@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE (seek_zero_test) video_delay = ContentTime (); } - Frame const first_frame = video_delay.round_up (content->video->video_frame_rate ()).frames_round (content->video->video_frame_rate ()); + Frame const first_frame = video_delay.round_up (content->video->frame_rate ()).frames_round (content->video->frame_rate ()); FFmpegDecoder decoder (content, film->log(), false); list<ContentVideo> a = decoder.get_video (first_frame, true); diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc index b6dce58f4..721e0ac5d 100644 --- a/test/srt_subtitle_test.cc +++ b/test/srt_subtitle_test.cc @@ -47,8 +47,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test) film->examine_and_add_content (content); wait_for_jobs (); - content->subtitle->set_use_subtitles (true); - content->subtitle->set_burn_subtitles (false); + content->subtitle->set_use (true); + content->subtitle->set_burn (false); film->make_dcp (); wait_for_jobs (); @@ -67,8 +67,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2) film->examine_and_add_content (content); wait_for_jobs (); - content->subtitle->set_use_subtitles (true); - content->subtitle->set_burn_subtitles (false); + content->subtitle->set_use (true); + content->subtitle->set_burn (false); /* Use test/data/subrip2.srt as if it were a font file */ content->subtitle->fonts().front()->set_file (FontFiles::NORMAL, "test/data/subrip2.srt"); @@ -92,8 +92,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3) film->examine_and_add_content (content); wait_for_jobs (); - content->subtitle->set_use_subtitles (true); - content->subtitle->set_burn_subtitles (false); + content->subtitle->set_use (true); + content->subtitle->set_burn (false); film->make_dcp (); wait_for_jobs (); diff --git a/test/threed_test.cc b/test/threed_test.cc index 05fd77a8a..1e728bc9b 100644 --- a/test/threed_test.cc +++ b/test/threed_test.cc @@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE (threed_test) shared_ptr<Film> film = new_test_film ("threed_test"); film->set_name ("test_film2"); shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4")); - c->video->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT); + c->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT); film->examine_and_add_content (c); wait_for_jobs (); diff --git a/test/time_calculation_test.cc b/test/time_calculation_test.cc index 7c8259f97..353a97dd0 100644 --- a/test/time_calculation_test.cc +++ b/test/time_calculation_test.cc @@ -128,19 +128,19 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test) /* 25fps content, 25fps DCP */ film->set_video_frame_rate (25); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() / 25.0)); + BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 25.0)); /* 25fps content, 24fps DCP; length should be increased */ film->set_video_frame_rate (24); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() / 24.0)); + BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 24.0)); /* 25fps content, 30fps DCP; length should be decreased */ film->set_video_frame_rate (30); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() / 30.0)); + BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 30.0)); /* 25fps content, 50fps DCP; length should be the same */ film->set_video_frame_rate (50); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() / 25.0)); + BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 25.0)); /* 25fps content, 60fps DCP; length should be decreased */ film->set_video_frame_rate (60); - BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() * (50.0 / 60) / 25.0)); + BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() * (50.0 / 60) / 25.0)); } /** Test Player::dcp_to_content_video */ @@ -161,7 +161,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 0, no trim, content rate = DCP rate */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, no trim, content rate = DCP rate */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, 1.5s trim, content rate = DCP rate */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -204,7 +204,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -216,7 +216,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, no trim, content rate 24, DCP rate 25 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -232,7 +232,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.6)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -251,7 +251,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -263,7 +263,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -277,7 +277,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -295,7 +295,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (48); + content->video->set_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -307,7 +307,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (48); + content->video->set_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -321,7 +321,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (48); + content->video->set_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -335,7 +335,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 0s, no trim, content rate 29.9978733, DCP rate 30 */ content->set_position (DCPTime::from_seconds (0)); content->set_trim_start (ContentTime::from_seconds (0)); - content->video->set_video_frame_rate (29.9978733); + content->video->set_frame_rate (29.9978733); film->set_video_frame_rate (30); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 0, no trim, content rate = DCP rate */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -378,7 +378,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, no trim, content rate = DCP rate */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -390,7 +390,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, 1.5s trim, content rate = DCP rate */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -406,7 +406,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -418,7 +418,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, no trim, content rate 24, DCP rate 25 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -430,7 +430,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, 1.6s trim, content rate 24, DCP rate 25, so the 1.6s trim is at 24fps */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.6)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -448,7 +448,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -460,7 +460,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -472,7 +472,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -489,7 +489,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (48); + content->video->set_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -501,7 +501,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (48); + content->video->set_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -513,7 +513,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (48); + content->video->set_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); @@ -543,7 +543,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 0, no trim, video/audio content rate = video/audio DCP rate */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -556,7 +556,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, video/audio content rate = video/audio DCP rate */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -571,7 +571,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, 1.5s trim, video/audio content rate = video/audio DCP rate */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -586,7 +586,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 0, no trim, content video rate 24, DCP video rate 25, both audio rates still 48k */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); @@ -599,7 +599,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, content video rate 24, DCP rate 25, both audio rates still 48k. */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); @@ -616,7 +616,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.6)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); @@ -635,7 +635,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (48); stream->_frame_rate = 48000; player->setup_pieces (); @@ -648,7 +648,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -663,7 +663,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -681,7 +681,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (48); stream->_frame_rate = 48000; player->setup_pieces (); @@ -694,7 +694,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -709,7 +709,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -724,7 +724,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 0, no trim, video content rate = video DCP rate, content audio rate = 44.1k */ content->set_position (DCPTime ()); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); @@ -737,7 +737,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, video content rate = video DCP rate, content audio rate = 44.1k */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime ()); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); @@ -752,7 +752,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, 1.5s trim, video content rate = video DCP rate, content audio rate = 44.1k */ content->set_position (DCPTime::from_seconds (3)); content->set_trim_start (ContentTime::from_seconds (1.5)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); @@ -767,7 +767,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Check with a large start trim */ content->set_position (DCPTime::from_seconds (0)); content->set_trim_start (ContentTime::from_seconds (54143)); - content->video->set_video_frame_rate (24); + content->video->set_frame_rate (24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); diff --git a/test/video_content_scale_test.cc b/test/video_content_scale_test.cc index 78f3bf9b0..9b50fa8c7 100644 --- a/test/video_content_scale_test.cc +++ b/test/video_content_scale_test.cc @@ -100,7 +100,7 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop dcp::Size answer = sc.get().size (vc->video, display_size, film_size); if (answer != correct) { - cerr << "Testing " << vc->video->video_size().width << "x" << vc->video->video_size().height << "\n"; + cerr << "Testing " << vc->video->size().width << "x" << vc->video->size().height << "\n"; cerr << "Testing " << display_size.width << "x" << display_size.height << "\n"; cerr << answer.width << "x" << answer.height << " instead of " << correct.width << "x" << correct.height << "\n"; } diff --git a/test/xml_subtitle_test.cc b/test/xml_subtitle_test.cc index 8b051d0d1..dc464429f 100644 --- a/test/xml_subtitle_test.cc +++ b/test/xml_subtitle_test.cc @@ -41,8 +41,8 @@ BOOST_AUTO_TEST_CASE (xml_subtitle_test) film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, "test/data/subrip2.srt")); - content->subtitle->set_use_subtitles (true); - content->subtitle->set_burn_subtitles (false); + content->subtitle->set_use (true); + content->subtitle->set_burn (false); film->examine_and_add_content (content); wait_for_jobs (); film->make_dcp (); @@ -62,8 +62,8 @@ BOOST_AUTO_TEST_CASE (xml_subtitle_test2) film->set_interop (true); film->set_sequence (false); shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, "test/data/subrip2.srt")); - content->subtitle->set_use_subtitles (true); - content->subtitle->set_burn_subtitles (false); + content->subtitle->set_use (true); + content->subtitle->set_burn (false); film->examine_and_add_content (content); film->examine_and_add_content (content); wait_for_jobs (); |
