using namespace dcpomatic;
+static
+void
+filter_ok(std::vector<dcp::VerificationNote>& notes)
+{
+ notes.erase(std::remove_if(notes.begin(), notes.end(), [](dcp::VerificationNote const& note) { return note.type() == dcp::VerificationNote::Type::OK; }), notes.end());
+}
+
+
/** Test Film::reels() */
BOOST_AUTO_TEST_CASE (reels_test1)
{
BOOST_CHECK_EQUAL (r.back().from.get(), 288000);
BOOST_CHECK_EQUAL (r.back().to.get(), 288000 * 2);
- film->set_j2k_bandwidth (100000000);
+ film->set_video_bit_rate(100000000);
film->set_reel_type (ReelType::BY_LENGTH);
/* This is just over 2.5s at 100Mbit/s; should correspond to 60 frames */
film->set_reel_length (31253154);
auto A = make_shared<FFmpegContent>("test/data/test2.mp4");
auto film = new_test_film2 ("reels_test6", {A});
- film->set_j2k_bandwidth (100000000);
+ film->set_video_bit_rate(100000000);
film->set_reel_type (ReelType::BY_LENGTH);
/* This is just over 2.5s at 100Mbit/s; should correspond to 60 frames */
film->set_reel_length (31253154);
make_and_verify_dcp (film);
vector<boost::filesystem::path> dirs = { film->dir(film->dcp_name(false)) };
- auto notes = dcp::verify(dirs, {}, boost::bind(&no_op), boost::bind(&no_op), {}, TestPaths::xsd());
- dump_notes (notes);
- BOOST_REQUIRE (notes.empty());
+ auto result = dcp::verify(dirs, {}, boost::bind(&no_op), boost::bind(&no_op), {}, TestPaths::xsd());
+ filter_ok(result.notes);
+ dump_notes(result.notes);
+ BOOST_REQUIRE(result.notes.empty());
}
make_and_verify_dcp (film);
vector<boost::filesystem::path> dirs = { film->dir(film->dcp_name(false)) };
- auto const notes = dcp::verify(dirs, {}, boost::bind(&no_op), boost::bind(&no_op), {}, TestPaths::xsd());
- dump_notes (notes);
- BOOST_REQUIRE (notes.empty());
+ auto result = dcp::verify(dirs, {}, boost::bind(&no_op), boost::bind(&no_op), {}, TestPaths::xsd());
+ filter_ok(result.notes);
+ dump_notes(result.notes);
+ BOOST_REQUIRE(result.notes.empty());
}
make_and_verify_dcp (film);
- auto const notes = dcp::verify({}, {}, boost::bind(&no_op), boost::bind(&no_op), {}, TestPaths::xsd());
- dump_notes (notes);
- BOOST_REQUIRE (notes.empty());
+ auto result = dcp::verify({}, {}, boost::bind(&no_op), boost::bind(&no_op), {}, TestPaths::xsd());
+ filter_ok(result.notes);
+ dump_notes(result.notes);
+ BOOST_REQUIRE(result.notes.empty());
}
BOOST_REQUIRE (!wait_for_jobs());
vector<boost::filesystem::path> dirs = { film->dir(film->dcp_name(false)) };
- auto const notes = dcp::verify(dirs, {}, boost::bind(&no_op), boost::bind(&no_op), {}, TestPaths::xsd());
- dump_notes (notes);
- BOOST_REQUIRE (notes.empty());
+ auto result = dcp::verify(dirs, {}, boost::bind(&no_op), boost::bind(&no_op), {}, TestPaths::xsd());
+ filter_ok(result.notes);
+ dump_notes(result.notes);
+ BOOST_REQUIRE(result.notes.empty());
}