X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=inline;f=test%2Fvideo_decoder_fill_test.cc;h=67e84b7137863c5803a2f6d9f171ef8c677f77ae;hb=b4252ca75667f06c58721e7def1f326452ec29e7;hp=9ee00450d15f58537c455409b2b6d3caa3da6b47;hpb=b18134cd8dcd5c3ae877283fd43d20251939813f;p=dcpomatic.git diff --git a/test/video_decoder_fill_test.cc b/test/video_decoder_fill_test.cc index 9ee00450d..67e84b713 100644 --- a/test/video_decoder_fill_test.cc +++ b/test/video_decoder_fill_test.cc @@ -21,6 +21,7 @@ #include "lib/image_decoder.h" #include "lib/image_content.h" #include "test.h" +#include using std::list; using std::cout; @@ -32,9 +33,9 @@ BOOST_AUTO_TEST_CASE (video_decoder_fill_test1) shared_ptr c (new ImageContent (film, "test/data/simple_testcard_640x480.png")); ImageDecoder decoder (c); - decoder.fill_2d (0, 4); - BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 4); - list::iterator i = decoder._decoded_video.begin(); + decoder.fill_one_eye (0, 4, EYES_BOTH); + BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 4U); + list::iterator i = decoder._decoded_video.begin(); for (int j = 0; j < 4; ++j) { BOOST_CHECK_EQUAL (i->frame, j); ++i; @@ -42,9 +43,9 @@ BOOST_AUTO_TEST_CASE (video_decoder_fill_test1) decoder._decoded_video.clear (); - decoder.fill_2d (0, 7); + decoder.fill_one_eye (0, 7, EYES_BOTH); BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 7); - i = decoder._decoded_video.begin(); + i = decoder._decoded_video.begin(); for (int j = 0; j < 7; ++j) { BOOST_CHECK_EQUAL (i->frame, j); ++i; @@ -57,18 +58,18 @@ BOOST_AUTO_TEST_CASE (video_decoder_fill_test2) shared_ptr c (new ImageContent (film, "test/data/simple_testcard_640x480.png")); ImageDecoder decoder (c); - decoder.fill_3d (0, 4, EYES_LEFT); + decoder.fill_both_eyes (0, 4, EYES_LEFT); BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 8); - list::iterator i = decoder._decoded_video.begin(); + list::iterator i = decoder._decoded_video.begin(); for (int j = 0; j < 8; ++j) { BOOST_CHECK_EQUAL (i->frame, j / 2); BOOST_CHECK_EQUAL (i->eyes, (j % 2) == 0 ? EYES_LEFT : EYES_RIGHT); ++i; } - decoder.fill_3d (0, 7, EYES_RIGHT); + decoder.fill_both_eyes (0, 7, EYES_RIGHT); BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 15); - i = decoder._decoded_video.begin(); + i = decoder._decoded_video.begin(); for (int j = 0; j < 15; ++j) { BOOST_CHECK_EQUAL (i->frame, j / 2); BOOST_CHECK_EQUAL (i->eyes, (j % 2) == 0 ? EYES_LEFT : EYES_RIGHT);