Use a vector rather than a list when returning from content_factory().
[dcpomatic.git] / test / overlap_video_test.cc
index 724f4e75ba1354359ec5422a72f3d1aa2ace17ae..12a26fe609a792a214bc8aafd95c672091f790d2 100644 (file)
@@ -23,6 +23,7 @@
 #include "lib/content_factory.h"
 #include "lib/dcpomatic_time.h"
 #include "lib/film.h"
+#include "lib/piece.h"
 #include "lib/player.h"
 #include "lib/video_content.h"
 #include "test.h"
 
 using std::dynamic_pointer_cast;
 using std::make_shared;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE (overlap_video_test1)
 {
        auto film = new_test_film2 ("overlap_video_test1");
        film->set_sequence (false);
-       auto A = content_factory("test/data/flat_red.png").front();
+       auto A = content_factory("test/data/flat_red.png")[0];
        film->examine_and_add_content (A);
-       auto B = content_factory("test/data/flat_green.png").front();
+       auto B = content_factory("test/data/flat_green.png")[0];
        film->examine_and_add_content (B);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE (overlap_video_test1)
        B->video->set_length (24);
        B->set_position (film, dcpomatic::DCPTime::from_seconds(1));
 
-       auto player = make_shared<Player>(film);
+       auto player = make_shared<Player>(film, Image::Alignment::COMPACT);
        auto pieces = player->_pieces;
        BOOST_REQUIRE_EQUAL (pieces.size(), 2U);
        BOOST_CHECK_EQUAL (pieces.front()->content, A);