Add another 3D test.
authorCarl Hetherington <cth@carlh.net>
Mon, 15 Jan 2018 21:58:59 +0000 (21:58 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 15 Jan 2018 21:58:59 +0000 (21:58 +0000)
test/threed_test.cc

index a41defe8fd0fc9822285abfcd32219206e2aefbf..cdf9a530497d428715b3c33cc3490db6f82b02e5 100644 (file)
@@ -35,6 +35,7 @@
 using std::cout;
 using boost::shared_ptr;
 
+/** Basic sanity check of 3D_LEFT_RIGHT */
 BOOST_AUTO_TEST_CASE (threed_test1)
 {
        shared_ptr<Film> film = new_test_film ("threed_test1");
@@ -55,7 +56,7 @@ BOOST_AUTO_TEST_CASE (threed_test1)
        BOOST_REQUIRE (!wait_for_jobs ());
 }
 
-/** Basic sanity check of 3D-alternate; at the moment this is just to make sure
+/** Basic sanity check of 3D_ALTERNATE; at the moment this is just to make sure
  *  that such a transcode completes without error.
  */
 BOOST_AUTO_TEST_CASE (threed_test2)
@@ -77,3 +78,25 @@ BOOST_AUTO_TEST_CASE (threed_test2)
 
        BOOST_REQUIRE (!wait_for_jobs ());
 }
+
+/** Basic sanity check of 3D_LEFT and 3D_RIGHT; at the moment this is just to make sure
+ *  that such a transcode completes without error.
+ */
+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"));
+       film->examine_and_add_content (L);
+       shared_ptr<FFmpegContent> R (new FFmpegContent (film, "test/data/test.mp4"));
+       film->examine_and_add_content (R);
+       wait_for_jobs ();
+
+       L->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT);
+       R->video->set_frame_type (VIDEO_FRAME_TYPE_3D_RIGHT);
+
+       film->set_three_d (true);
+       film->make_dcp ();
+       film->write_metadata ();
+
+       BOOST_REQUIRE (!wait_for_jobs ());
+}