diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-01 14:32:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-01 14:32:45 +0100 |
| commit | c98c87afe29d9ef74bdced8a9c96d7752f3fe80f (patch) | |
| tree | 9fad96b3e680ae368ef7488af80488edd4436394 /test | |
| parent | bbbfb3208e74a4de2f9b4540a17ec43d4e3541a3 (diff) | |
Fix 3D support.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ffmpeg_decoder_seek_test.cc | 7 | ||||
| -rw-r--r-- | test/ffmpeg_decoder_sequential_test.cc | 9 | ||||
| -rw-r--r-- | test/recover_test.cc | 8 | ||||
| -rw-r--r-- | test/seek_zero_test.cc | 7 |
4 files changed, 18 insertions, 13 deletions
diff --git a/test/ffmpeg_decoder_seek_test.cc b/test/ffmpeg_decoder_seek_test.cc index dd80765f4..968c3bdf9 100644 --- a/test/ffmpeg_decoder_seek_test.cc +++ b/test/ffmpeg_decoder_seek_test.cc @@ -36,16 +36,17 @@ using std::cerr; using std::vector; +using std::list; using boost::shared_ptr; using boost::optional; static void check (FFmpegDecoder& decoder, int frame) { - optional<ContentVideo> v; + list<ContentVideo> v; v = decoder.get_video (frame, true); - BOOST_CHECK (v); - BOOST_CHECK_EQUAL (v->frame, frame); + BOOST_CHECK (v.size() == 1); + BOOST_CHECK_EQUAL (v.front().frame, frame); } static void diff --git a/test/ffmpeg_decoder_sequential_test.cc b/test/ffmpeg_decoder_sequential_test.cc index 48b9b6b3b..b4ff36e6e 100644 --- a/test/ffmpeg_decoder_sequential_test.cc +++ b/test/ffmpeg_decoder_sequential_test.cc @@ -32,6 +32,7 @@ using std::cout; using std::cerr; +using std::list; using boost::shared_ptr; using boost::optional; @@ -57,13 +58,13 @@ test (boost::filesystem::path file, float fps, int first) VideoFrame const N = decoder.video_content()->video_length().frames (decoder.video_content()->video_frame_rate ()); decoder.test_gaps = 0; for (VideoFrame i = 0; i < N; ++i) { - optional<ContentVideo> v; + list<ContentVideo> v; v = decoder.get_video (i, true); if (i < first) { - BOOST_CHECK (!v); + BOOST_CHECK (v.empty ()); } else { - BOOST_CHECK (v); - BOOST_CHECK_EQUAL (v->frame, i); + BOOST_CHECK (v.size() == 1); + BOOST_CHECK_EQUAL (v.front().frame, i); } } BOOST_CHECK_EQUAL (decoder.test_gaps, 0); diff --git a/test/recover_test.cc b/test/recover_test.cc index dfbc9f60d..31b882a2e 100644 --- a/test/recover_test.cc +++ b/test/recover_test.cc @@ -34,9 +34,11 @@ using std::string; using boost::shared_ptr; static void -note (dcp::NoteType, string n) +note (dcp::NoteType t, string n) { - cout << n << "\n"; + if (t == dcp::ERROR) { + cout << n << "\n"; + } } BOOST_AUTO_TEST_CASE (recover_test) @@ -55,7 +57,7 @@ BOOST_AUTO_TEST_CASE (recover_test) film->make_dcp (); wait_for_jobs (); - boost::filesystem::path const video = "build/test/recover_test/video/185_2K_aa7e8a4665281568bbe11645a3d4ba4e_24_bicubic_200000000_P_S_3D.mxf"; + boost::filesystem::path const video = "build/test/recover_test/video/185_2K_3651eded785682b85f4baca4b1d3b7a9_24_bicubic_200000000_P_S_3D.mxf"; boost::filesystem::copy_file ( video, diff --git a/test/seek_zero_test.cc b/test/seek_zero_test.cc index 03968ae5c..77e95c28c 100644 --- a/test/seek_zero_test.cc +++ b/test/seek_zero_test.cc @@ -32,6 +32,7 @@ #include "test.h" using std::cout; +using std::list; using boost::shared_ptr; using boost::dynamic_pointer_cast; using boost::optional; @@ -58,7 +59,7 @@ BOOST_AUTO_TEST_CASE (seek_zero_test) VideoFrame const first_frame = video_delay.round_up (content->video_frame_rate ()).frames (content->video_frame_rate ()); FFmpegDecoder decoder (content, film->log()); - optional<ContentVideo> a = decoder.get_video (first_frame, true); - BOOST_CHECK (a); - BOOST_CHECK_EQUAL (a->frame, first_frame); + list<ContentVideo> a = decoder.get_video (first_frame, true); + BOOST_CHECK (a.size() == 1); + BOOST_CHECK_EQUAL (a.front().frame, first_frame); } |
