#include <boost/test/unit_test.hpp>
#include <cstdio>
#include <iostream>
+#include <tuple>
using std::list;
++st;
BOOST_REQUIRE (st == stages.end());
- BOOST_CHECK_EQUAL (notes.size(), 0U);
+ for (auto note: notes) {
+ BOOST_CHECK(note.type() == dcp::VerificationNote::Type::OK);
+ }
}
using namespace boost::filesystem;
auto dir = setup (1, "incorrect_picture_sound_hash");
+ auto cpl = make_shared<dcp::CPL>(find_cpl(dir));
auto video_path = path(dir / "video.mxf");
HashCalculator video_calc(video_path);
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INCORRECT_PICTURE_HASH, canonical(video_path)
).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash(video_calc.old_hash()).set_calculated_hash(video_calc.new_hash()),
using namespace boost::filesystem;
auto dir = setup (1, "mismatched_picture_sound_hashes");
+ auto cpl = make_shared<dcp::CPL>(find_cpl(dir));
HashCalculator calc(dir / dcp_test1_cpl());
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(dir / dcp_test1_cpl())
).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash("x" + calc.old_hash()).set_calculated_hash(calc.old_hash()),
e.replace ("<ContentKind>", "<ContentKind>x");
}
+ auto cpl = std::make_shared<dcp::CPL>(find_cpl(dir));
+
check_verify_result (
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(dir / dcp_test1_cpl())
).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
std::vector<dcp::VerificationNote> expected =
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(cpl_path)
).set_cpl_id(cpl->id()).set_calculated_hash("7n7GQ2TbxQbmHYuAR8ml7XDOep8=").set_reference_hash("skI+5b/9LA/y6h0mcyxysJYanxI="),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_ASSET, canonical(dir) / "video.mxf" }
});
}
auto cpl = std::make_shared<dcp::CPL>(cpl_path);
std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::EMPTY_ASSET_PATH }
};
auto cpl = std::make_shared<dcp::CPL>(cpl_path);
std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_STANDARD },
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "invalid character encountered", canonical(cpl_path), 42
auto cpl = std::make_shared<dcp::CPL>(cpl_path);
std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML,
"value 'urn:uuid:6affb8ee-0020-4dff-a53c-17652f6358a' does not match regular expression "
auto cpl = std::make_shared<dcp::CPL>(cpl_path);
std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(cpl_path)
).set_cpl_id(cpl->id()).set_reference_hash("skI+5b/9LA/y6h0mcyxysJYanxI=").set_calculated_hash("sz3BeIugJ567q3HMnA62JeRw4TE="),
auto cpl = std::make_shared<dcp::CPL>(cpl_path);
std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML,
"value 'urn:uuid:x199d58b-5ef8-4d49-b270-07e590ccb280' does not match regular "
auto cpl = std::make_shared<dcp::CPL>(cpl_path);
std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML,
"value 'urn:uuid:x17b3de4-6dda-408d-b19b-6711354b0bc3' does not match regular "
path const cpl_file = dir / "cpl_cbfd2bc0-21cf-4a8f-95d8-9cddcbe51296.xml";
path const pkl_file = dir / "pkl_d87a950c-bd6f-41f6-90cc-56ccd673e131.xml";
path const assetmap_file = dir / "ASSETMAP";
+ auto cpl = std::make_shared<dcp::CPL>(cpl_file);
auto st = stages.begin();
BOOST_CHECK_EQUAL (st->first, "Checking DCP");
++st;
BOOST_REQUIRE (st == stages.end());
- BOOST_REQUIRE_EQUAL(notes.size(), 25U);
- auto i = notes.begin ();
- BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::Type::BV21_ERROR);
- BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::Code::INVALID_STANDARD);
- ++i;
+ vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
+ };
+
for (int j = 0; j < 24; ++j) {
- BOOST_CHECK_EQUAL(i->type(), dcp::VerificationNote::Type::BV21_ERROR);
- BOOST_CHECK_EQUAL(i->code(), dcp::VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K);
- ++i;
+ expected.push_back(
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K, string("2")
+ ).set_cpl_id(cpl->id())
+ );
}
+
+ check_verify_result(notes, expected);
}
/* DCP with a short asset */
auto cpl = dcp.cpls()[0];
vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_DURATION, string("d7576dcb-a361-4139-96b8-267f5f8d7f91")
prepare_directory (dir);
auto cpl = dcp_from_frame (oversized_frame, dir);
- vector<dcp::VerificationNote> expected;
+ vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ };
+
for (auto i = 0; i < 24; ++i) {
expected.push_back(
dcp::VerificationNote(
prepare_directory (dir);
auto cpl = dcp_from_frame (oversized_frame, dir);
- vector<dcp::VerificationNote> expected;
+ vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ };
for (auto i = 0; i < 24; ++i) {
expected.push_back(
check_verify_result(
{ dir },
{},
- { dcp::VerificationNote(dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()).set_cpl_id(cpl->id()) }
- );
+ {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ dcp::VerificationNote(dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()).set_cpl_id(cpl->id())
+ });
}
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"theFontId"}
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"theFontId"}
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'Foo'"), path(), 5
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE, asset->id(), boost::filesystem::canonical(asset->file().get())
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"Arial"}
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'Foo'"), path(), 2
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::EMPTY_TEXT
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"font0"}
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE, asset->id(), boost::filesystem::canonical(asset->file().get())
).set_cpl_id(cpl->id()),
{ vf_dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::EXTERNAL_ASSET, picture->asset()->id() },
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:MainSoundXConfiguration'"), canonical(cpl->file().get()), 50
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("badlang")
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("badlang")
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("this-is-wrong")
).set_cpl_id(cpl->id()),
static
-vector<dcp::VerificationNote>
+std::tuple<vector<dcp::VerificationNote>, shared_ptr<dcp::CPL>, boost::filesystem::path>
check_picture_size (int width, int height, int frame_rate, bool three_d)
{
using namespace boost::filesystem;
d->set_annotation_text("A Test DCP");
d->write_xml();
- return dcp::verify({dcp_path}, {}, &stage, &progress, {}, xsd_test).notes;
+ /* It seems that for the Ubuntu 16.04 compiler we can't use an initializer list here */
+ return std::tuple<vector<dcp::VerificationNote>, shared_ptr<dcp::CPL>, boost::filesystem::path>{ dcp::verify({dcp_path}, {}, &stage, &progress, {}, xsd_test).notes, cpl, dcp_path };
}
void
check_picture_size_ok (int width, int height, int frame_rate, bool three_d)
{
- auto notes = check_picture_size(width, height, frame_rate, three_d);
- BOOST_CHECK_EQUAL (notes.size(), 0U);
+ vector<dcp::VerificationNote> notes;
+ shared_ptr<dcp::CPL> cpl;
+ boost::filesystem::path dir;
+ std::tie(notes, cpl, dir) = check_picture_size(width, height, frame_rate, three_d);
+
+ std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ };
+ check_verify_result(notes, expected);
}
void
check_picture_size_bad_frame_size (int width, int height, int frame_rate, bool three_d)
{
- auto notes = check_picture_size(width, height, frame_rate, three_d);
- BOOST_REQUIRE_EQUAL (notes.size(), 1U);
- BOOST_CHECK_EQUAL (notes.front().type(), dcp::VerificationNote::Type::BV21_ERROR);
- BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::Code::INVALID_PICTURE_SIZE_IN_PIXELS);
+ vector<dcp::VerificationNote> notes;
+ shared_ptr<dcp::CPL> cpl;
+ boost::filesystem::path dir;
+ std::tie(notes, cpl, dir) = check_picture_size(width, height, frame_rate, three_d);
+
+ std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_SIZE_IN_PIXELS, dcp::String::compose("%1x%2", width, height), canonical(dir / "video.mxf")
+ ).set_cpl_id(cpl->id())
+ };
+ check_verify_result(notes, expected);
}
void
check_picture_size_bad_2k_frame_rate (int width, int height, int frame_rate, bool three_d)
{
- auto notes = check_picture_size(width, height, frame_rate, three_d);
- BOOST_REQUIRE_EQUAL (notes.size(), 2U);
- BOOST_CHECK_EQUAL (notes.back().type(), dcp::VerificationNote::Type::BV21_ERROR);
- BOOST_CHECK_EQUAL (notes.back().code(), dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K);
+ vector<dcp::VerificationNote> notes;
+ shared_ptr<dcp::CPL> cpl;
+ boost::filesystem::path dir;
+ std::tie(notes, cpl, dir) = check_picture_size(width, height, frame_rate, three_d);
+
+ std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE, dcp::String::compose("%1/1", frame_rate * (three_d ? 2 : 1))
+ ).set_cpl_id(cpl->id()),
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K, dcp::String::compose("%1/1", frame_rate), canonical(dir / "video.mxf")
+ ).set_cpl_id(cpl->id())
+ };
+
+ check_verify_result(notes, expected);
}
void
check_picture_size_bad_4k_frame_rate (int width, int height, int frame_rate, bool three_d)
{
- auto notes = check_picture_size(width, height, frame_rate, three_d);
- BOOST_REQUIRE_EQUAL (notes.size(), 1U);
- BOOST_CHECK_EQUAL (notes.front().type(), dcp::VerificationNote::Type::BV21_ERROR);
- BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_4K);
+ vector<dcp::VerificationNote> notes;
+ shared_ptr<dcp::CPL> cpl;
+ boost::filesystem::path dir;
+ std::tie(notes, cpl, dir) = check_picture_size(width, height, frame_rate, three_d);
+
+ std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_4K, dcp::String::compose("%1/1", frame_rate), canonical(dir / "video.mxf")
+ ).set_cpl_id(cpl->id())
+ };
+
+ check_verify_result(notes, expected);
}
check_picture_size_bad_4k_frame_rate (3996, 2160, 48, false);
/* No 4K 3D */
- auto notes = check_picture_size(3996, 2160, 24, true);
- BOOST_REQUIRE_EQUAL (notes.size(), 1U);
- BOOST_CHECK_EQUAL (notes.front().type(), dcp::VerificationNote::Type::BV21_ERROR);
- BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::Code::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D);
+ vector<dcp::VerificationNote> notes;
+ shared_ptr<dcp::CPL> cpl;
+ boost::filesystem::path dir;
+ std::tie(notes, cpl, dir) = check_picture_size(3996, 2160, 24, true);
+
+ std::vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D },
+ };
}
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf")
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_TIMED_TEXT_SIZE_IN_BYTES, string("121698284"), canonical(dir / "subs.mxf")
).set_cpl_id(cpl->id()),
dcp::VerificationNote(
- dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, string("121634816"), canonical(dir / "subs.mxf")
+ dcp::VerificationNote::Type::BV21_ERROR,
+ dcp::VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES,
+ dcp::raw_convert<string>(121634816),
+ canonical(dir / "subs.mxf")
).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf")
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE, canonical(dir / "subs.mxf")
).set_cpl_id(cpl->id()),
{ path },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(path / "subs1.mxf")
).set_cpl_id(cpl->id()),
{ path },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(path / "subs1.mxf")
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf")
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_SUBTITLE_START_TIME, canonical(dir / "subs.mxf")
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_DURATION
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_TIMED_TEXT_DURATION , "72 96", boost::filesystem::canonical(asset->file().get())
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_LINE_COUNT
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_LINE_COUNT
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::NEARLY_INVALID_SUBTITLE_LINE_LENGTH
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_LINE_LENGTH
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_CLOSED_CAPTION_LINE_COUNT
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_CLOSED_CAPTION_LINE_COUNT
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_CLOSED_CAPTION_LINE_LENGTH
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CLOSED_CAPTION_VALIGN
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INCORRECT_CLOSED_CAPTION_ORDERING
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_SOUND_FRAME_RATE, string("96000"), canonical(dir / "audiofoo.mxf")
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_ANNOTATION_TEXT, canonical(cpl->file().get())
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISMATCHED_CPL_ANNOTATION_TEXT, canonical(cpl->file().get())
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_ASSET_DURATION
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_MAIN_SUBTITLE_FROM_SOME_REELS
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_CLOSED_CAPTION_ASSET_COUNTS
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, code, subs->id()
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
note.set_cpl_id(cpl->id());
}
+ test_notes.push_back(ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl));
check_verify_result({dir}, {}, test_notes);
}
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA_VERSION_NUMBER, cpl->file().get()
).set_cpl_id(cpl->id())
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:NameX'"), cpl->file().get(), 70
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:ValueX'"), cpl->file().get(), 74
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:PropertyX'"), cpl->file().get(), 72
).set_cpl_id(cpl->id()),
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:PropertyListX'"), cpl->file().get(), 71
).set_cpl_id(cpl->id()),
BOOST_AUTO_TEST_CASE (verify_unsigned_cpl_with_encrypted_content)
{
- path dir = "build/test/verify_unsigned_cpl_with_encrypted_content";
+ path const dir = "build/test/verify_unsigned_cpl_with_encrypted_content";
prepare_directory (dir);
for (auto i: directory_iterator("test/ref/DCP/encryption_test")) {
copy_file (i.path(), dir / i.path().filename());
e.delete_lines ("<dsig:Signature", "</dsig:Signature>");
}
- dcp::CPL cpl(cpl_path);
+ auto cpl = std::make_shared<dcp::CPL>(cpl_path);
check_verify_result (
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::ALL_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(cpl_path)
- ).set_cpl_id(cpl.id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
+ ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL, encryption_test_pkl_id(), canonical(pkl)
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSING_FFOC
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSING_LFOC
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, canonical(cpl_path)
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT, canonical(cpl_path)
- ).set_cpl_id(cpl.id())
+ ).set_cpl_id(cpl->id())
});
}
e.delete_lines ("<dsig:Signature", "</dsig:Signature>");
}
- dcp::CPL cpl(cpl_path);
+ auto cpl = std::make_shared<dcp::CPL>(cpl_path);
check_verify_result (
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::ALL_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL, encryption_test_pkl_id(), canonical(pkl)
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSING_FFOC
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSING_LFOC
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, canonical(cpl_path)
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT, encryption_test_pkl_id(), canonical(pkl)
)
e.delete_lines ("<dsig:Signature", "</dsig:Signature>");
}
- check_verify_result({dir}, {}, {});
+ auto cpl = make_shared<dcp::CPL>(find_cpl(dir));
+
+ check_verify_result(
+ {dir},
+ {},
+ {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ });
}
auto reader = picture.start_read ();
auto frame = reader->get_frame (0);
verify_j2k(frame, 0, 0, 24, notes);
- BOOST_REQUIRE_EQUAL (notes.size(), 0U);
+ BOOST_CHECK(notes.empty());
}
auto reader = picture.start_read ();
auto frame = reader->get_frame (0);
verify_j2k(frame, 0, 0, 24, notes);
- BOOST_REQUIRE_EQUAL (notes.size(), 0U);
+ BOOST_CHECK(notes.empty());
}
auto reader = picture.start_read ();
auto frame = reader->get_frame (0);
verify_j2k(frame, 0, 0, 24, notes);
- BOOST_REQUIRE_EQUAL (notes.size(), 0U);
+ BOOST_CHECK(notes.empty());
}
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_TIMED_TEXT_DURATION , "240 0", boost::filesystem::canonical(subs_mxf)
).set_cpl_id(cpl->id()),
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_TIMED_TEXT_DURATION , "240 0", boost::filesystem::canonical(subs_mxf)
).set_cpl_id(cpl->id()),
{
auto const path = private_test / "data" / "xm";
+ auto cpl = std::make_shared<dcp::CPL>(find_prefix(path, "CPL_"));
+ BOOST_REQUIRE(cpl);
+
check_verify_result (
{ path },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING,
dcp::VerificationNote::Code::THREED_ASSET_MARKED_AS_TWOD, boost::filesystem::canonical(find_file(path, "j2c"))
);
}
- dcp::CPL cpl (find_cpl(dir));
+ auto cpl = make_shared<dcp::CPL>(find_cpl(dir));
check_verify_result (
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
+ ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::UNEXPECTED_ENTRY_POINT
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::UNEXPECTED_DURATION
- ).set_cpl_id(cpl.id())
+ ).set_cpl_id(cpl->id())
});
}
e.replace("trailer", "trip");
}
- dcp::CPL cpl (find_cpl(dir));
+ auto cpl = std::make_shared<dcp::CPL>(find_cpl(dir));
check_verify_result (
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
+ ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_CONTENT_KIND, string("trip")
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
});
}
e.replace("<ContentKind>trailer</ContentKind>", "<ContentKind scope=\"http://bobs.contents/\">trip</ContentKind>");
}
- dcp::CPL cpl (find_cpl(dir));
+ auto cpl = std::make_shared<dcp::CPL>(find_cpl(dir));
check_verify_result (
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
+ ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
});
}
}
dcp::PKL pkl(find_pkl(dir));
- dcp::CPL cpl(find_cpl(dir));
+ auto cpl = std::make_shared<dcp::CPL>(find_cpl(dir));
check_verify_result(
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
+ ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, "width 1997 is not a multiple of 2", canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, "height 4080 is bigger than the asset height 1080", canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
});
}
}
dcp::PKL pkl(find_pkl(dir));
- dcp::CPL cpl(find_cpl(dir));
+ auto cpl = std::make_shared<dcp::CPL>(find_cpl(dir));
check_verify_result(
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
+ ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, "height 5125 is not a multiple of 2", canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, "width 9900 is bigger than the asset width 1998", canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id()),
+ ).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, "height 5125 is bigger than the asset height 1080", canonical(find_cpl(dir))
- ).set_cpl_id(cpl.id())
+ ).set_cpl_id(cpl->id())
});
}
}
dcp::PKL pkl(find_pkl(dir));
+ auto cpl = std::make_shared<dcp::CPL>(find_cpl(dir));
check_verify_result(
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::DUPLICATE_ASSET_ID_IN_PKL, pkl.id(), canonical(find_pkl(dir)) },
});
}
dcp::PKL pkl(find_pkl(dir));
dcp::AssetMap asset_map(find_asset_map(dir));
- dcp::CPL cpl(find_cpl(dir));
+ auto cpl = make_shared<dcp::CPL>(find_cpl(dir));
check_verify_result(
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::DUPLICATE_ASSET_ID_IN_ASSETMAP, asset_map.id(), canonical(find_asset_map(dir))
),
{ path },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_SOUND_CHANNEL_COUNTS, canonical(find_file(path, "audio2"))
).set_cpl_id(cpl->id())
{ path },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION, std::string{"MainSoundConfiguration has 6 channels but sound assets have 2"}, canonical(find_cpl(path))
).set_cpl_id(cpl->id())
dcp->set_annotation_text("A Test DCP");
dcp->write_xml();
- vector<dcp::VerificationNote> expected;
+ vector<dcp::VerificationNote> expected = {
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSING_FFOC
+ ).set_cpl_id(cpl->id()),
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSING_LFOC
+ ).set_cpl_id(cpl->id())
+ };
for (auto frame = 0; frame < 24; frame++) {
expected.push_back(
}
}
- expected.push_back(
- dcp::VerificationNote(
- dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSING_FFOC
- ).set_cpl_id(cpl->id())
- );
-
- expected.push_back(
- dcp::VerificationNote(
- dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSING_LFOC
- ).set_cpl_id(cpl->id())
- );
-
check_verify_result({ path }, {}, expected);
}
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE
).set_cpl_id(cpl->id()),
).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT, std::string{"315de731-1173-484c-9a35-bdacf5a9d99d"}
- ).set_cpl_id(cpl->id())
+ ).set_cpl_id(cpl->id()),
});
}
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
{ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
dcp::VerificationNote(dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_LOAD_FONT_FOR_FONT).set_id("theFontId").set_cpl_id(cpl->id())
});
{ dir },
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_LOAD_FONT).set_id(reel_subs->id()).set_cpl_id(cpl->id())
});
}
auto dcp1 = make_simple(dir / "1");
dcp1->write_xml();
+ auto cpl = dcp1->cpls()[0];
auto const asset_1 = dcp::MonoPictureAsset(dir / "1" / "video.mxf").id();
{dir / "1"},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_ASSET_MAP_ID).set_id(asset_1).set_other_id(asset_2)
});
}
{dir},
{},
{
+ ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl),
dcp::VerificationNote(dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::EMPTY_CONTENT_VERSION_LABEL_TEXT, cpl->file().get()).set_cpl_id(cpl->id())
});
}
{ dir },
{ kdm },
{
+ ok(dcp::VerificationNote::Code::ALL_ENCRYPTED, cpl),
dcp::VerificationNote(
dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, canonical(cpl_file)
).set_cpl_id(cpl->id()),