summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-23 11:14:44 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-23 11:14:44 +0100
commit4eb77be6999a3758998bfe37b28d4bb1cd55d51e (patch)
tree9e2882f27751ee6badb1ee9b333bf1d012bd083b /test
parentfa4bac5dd1b8d0e09bd4a4eb20c83c0564858649 (diff)
Various 3D fixes.
Diffstat (limited to 'test')
-rw-r--r--test/threed_test.cc51
-rw-r--r--test/wscript1
2 files changed, 52 insertions, 0 deletions
diff --git a/test/threed_test.cc b/test/threed_test.cc
new file mode 100644
index 000000000..50fe87b4a
--- /dev/null
+++ b/test/threed_test.cc
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <boost/test/unit_test.hpp>
+#include "test.h"
+#include "lib/film.h"
+#include "lib/ratio.h"
+#include "lib/dcp_content_type.h"
+#include "lib/ffmpeg_content.h"
+
+using std::cout;
+using boost::shared_ptr;
+
+BOOST_AUTO_TEST_CASE (threed_test)
+{
+ cout << "here we go.\n";
+ 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->set_ratio (Ratio::from_id ("185"));
+ c->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
+ film->examine_and_add_content (c);
+
+ wait_for_jobs ();
+
+ film->set_container (Ratio::from_id ("185"));
+ film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+ film->set_dcp_3d (true);
+ film->make_dcp ();
+ film->write_metadata ();
+
+ wait_for_jobs ();
+
+ exit (EXIT_SUCCESS);
+}
diff --git a/test/wscript b/test/wscript
index f0ee5f769..c59d9f7cf 100644
--- a/test/wscript
+++ b/test/wscript
@@ -16,6 +16,7 @@ def build(bld):
obj.use = 'libdcpomatic'
obj.source = """
test.cc
+ threed_test.cc
play_test.cc
frame_rate_test.cc
silence_padding_test.cc