Supporters update.
[dcpomatic.git] / test / recover_test.cc
index b36dad05a5e9390ef3c394a8b3260a6aea559e3e..63c611831ea69b98fbc273a3f1ed55f55e966349 100644 (file)
@@ -32,6 +32,7 @@
 #include "lib/ffmpeg_content.h"
 #include "lib/video_content.h"
 #include "lib/ratio.h"
+#include <dcp/equality_options.h>
 #include <dcp/mono_picture_asset.h>
 #include <dcp/stereo_picture_asset.h>
 #include <boost/test/unit_test.hpp>
@@ -40,7 +41,6 @@
 
 using std::cout;
 using std::make_shared;
-using std::shared_ptr;
 using std::string;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
@@ -58,13 +58,13 @@ note (dcp::NoteType t, string n)
 
 BOOST_AUTO_TEST_CASE (recover_test_2d)
 {
-       shared_ptr<Film> film = new_test_film ("recover_test_2d");
+       auto film = new_test_film("recover_test_2d");
        film->set_interop (false);
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
        film->set_container (Ratio::from_id ("185"));
        film->set_name ("recover_test");
 
-       shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/count300bd24.m2ts"));
+       auto content = make_shared<FFmpegContent>("test/data/count300bd24.m2ts");
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE (recover_test_2d)
                        dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE
                });
 
-       boost::filesystem::path const video = "build/test/recover_test_2d/video/185_2K_02543352c540f4b083bff3f1e309d4a9_24_100000000_P_S_0_1200000.mxf";
+       boost::filesystem::path const video = "build/test/recover_test_2d/video/185_2K_4650f318cea570763a0c6411c8c098ce_24_100000000_P_S_L21_0_1200000.mxf";
        boost::filesystem::copy_file (
                video,
                "build/test/recover_test_2d/original.mxf"
@@ -83,10 +83,19 @@ BOOST_AUTO_TEST_CASE (recover_test_2d)
 
        boost::filesystem::resize_file (video, 2 * 1024 * 1024);
 
-       make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE });
+       make_and_verify_dcp(
+               film,
+               {
+                       dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE,
+                       dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE
+               },
+               true,
+               /* We end up with two CPLs in this directory, which Clairmeta gives an error for */
+               false
+               );
 
-       shared_ptr<dcp::MonoPictureAsset> A (new dcp::MonoPictureAsset ("build/test/recover_test_2d/original.mxf"));
-       shared_ptr<dcp::MonoPictureAsset> B (new dcp::MonoPictureAsset (video));
+       auto A = make_shared<dcp::MonoPictureAsset>("build/test/recover_test_2d/original.mxf");
+       auto B = make_shared<dcp::MonoPictureAsset>(video);
 
        dcp::EqualityOptions eq;
        BOOST_CHECK (A->equals (B, eq, boost::bind (&note, _1, _2)));
@@ -109,7 +118,7 @@ BOOST_AUTO_TEST_CASE (recover_test_3d, * boost::unit_test::depends_on("recover_t
 
        make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE });
 
-       boost::filesystem::path const video = "build/test/recover_test_3d/video/185_2K_70e6661af92ae94458784c16a21a9748_24_100000000_P_S_3D_0_96000.mxf";
+       boost::filesystem::path const video = "build/test/recover_test_3d/video/185_2K_60a75a531ca9546bdd513163117e2214_24_100000000_P_S_L21_3D_0_96000.mxf";
 
        boost::filesystem::copy_file (
                video,
@@ -118,7 +127,15 @@ BOOST_AUTO_TEST_CASE (recover_test_3d, * boost::unit_test::depends_on("recover_t
 
        boost::filesystem::resize_file (video, 2 * 1024 * 1024);
 
-       make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE });
+       make_and_verify_dcp(
+               film,
+               {
+                       dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE
+               },
+               true,
+               /* We end up with two CPLs in this directory, which Clairmeta gives an error for */
+               false
+               );
 
        auto A = make_shared<dcp::StereoPictureAsset>("build/test/recover_test_3d/original.mxf");
        auto B = make_shared<dcp::StereoPictureAsset>(video);
@@ -145,7 +162,7 @@ BOOST_AUTO_TEST_CASE (recover_test_2d_encrypted, * boost::unit_test::depends_on(
        make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE });
 
        boost::filesystem::path const video =
-               "build/test/recover_test_2d_encrypted/video/185_2K_02543352c540f4b083bff3f1e309d4a9_24_100000000_Eeafcb91c9f5472edf01f3a2404c57258_S_0_1200000.mxf";
+               "build/test/recover_test_2d_encrypted/video/185_2K_4650f318cea570763a0c6411c8c098ce_24_100000000_Eeafcb91c9f5472edf01f3a2404c57258_S_L21_0_1200000.mxf";
 
        boost::filesystem::copy_file (
                video,
@@ -154,7 +171,15 @@ BOOST_AUTO_TEST_CASE (recover_test_2d_encrypted, * boost::unit_test::depends_on(
 
        boost::filesystem::resize_file (video, 2 * 1024 * 1024);
 
-       make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE });
+       make_and_verify_dcp(
+               film,
+               {
+                       dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE
+               },
+               true,
+               /* We end up with two CPLs in this directory, which Clairmeta gives an error for */
+               false
+               );
 
        auto A = make_shared<dcp::MonoPictureAsset>("build/test/recover_test_2d_encrypted/original.mxf");
        A->set_key (film->key ());