summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-17 22:25:59 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 22:26:33 +0100
commit50033becbec6e0991585f89ed9a38c9d029de61d (patch)
tree01881592593ee8e8aeec3c92c6bbb133d50d06d4 /src
parent7a6d7724348efb76f12e8dfd03ebc2d16120de50 (diff)
Bv2.1 8.5: Features must have FFEC/FFMC markers.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc39
-rw-r--r--src/verify.h4
2 files changed, 42 insertions, 1 deletions
diff --git a/src/verify.cc b/src/verify.cc
index e02c573b..aa296fec 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -47,6 +47,7 @@
#include "exceptions.h"
#include "compose.hpp"
#include "raw_convert.h"
+#include "reel_markers_asset.h"
#include "smpte_subtitle_asset.h"
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/parsers/XercesDOMParser.hpp>
@@ -1046,7 +1047,17 @@ dcp::verify (
}
if (cpl->release_territory()) {
- verify_language_tag (cpl->release_territory().get(), notes);
+ if (!cpl->release_territory_scope() || cpl->release_territory_scope().get() != "http://www.smpte-ra.org/schemas/429-16/2014/CPL-Metadata#scope/release-territory/UNM49") {
+ auto terr = cpl->release_territory().get();
+ /* Must be a valid region tag, or "001" */
+ try {
+ LanguageTag::RegionSubtag test (terr);
+ } catch (...) {
+ if (terr != "001") {
+ notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::BAD_LANGUAGE, terr});
+ }
+ }
+ }
}
if (dcp->standard() == dcp::SMPTE) {
@@ -1073,6 +1084,10 @@ dcp::verify (
size_t fewest_closed_captions = SIZE_MAX;
/* most number of closed caption assets seen in a reel */
size_t most_closed_captions = 0;
+ /* true if we've seen a FFEC marker */
+ auto have_ffec = false;
+ /* true if we've seen a FFMC marker */
+ auto have_ffmc = false;
for (auto reel: cpl->reels()) {
stage ("Checking reel", optional<boost::filesystem::path>());
@@ -1142,6 +1157,15 @@ dcp::verify (
}
}
+ if (reel->main_markers()) {
+ if (reel->main_markers()->get(Marker::FFEC)) {
+ have_ffec = true;
+ }
+ if (reel->main_markers()->get(Marker::FFMC)) {
+ have_ffmc = true;
+ }
+ }
+
fewest_closed_captions = std::min (fewest_closed_captions, reel->closed_captions().size());
most_closed_captions = std::max (most_closed_captions, reel->closed_captions().size());
}
@@ -1156,6 +1180,15 @@ dcp::verify (
notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::CLOSED_CAPTION_ASSET_COUNTS_DIFFER});
}
+ if (cpl->content_kind() == FEATURE) {
+ if (!have_ffec) {
+ notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_FFEC_IN_FEATURE});
+ }
+ if (!have_ffmc) {
+ notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_FFMC_IN_FEATURE});
+ }
+ }
+
check_text_timing (cpl->reels(), notes);
LinesCharactersResult result;
@@ -1310,6 +1343,10 @@ dcp::note_to_string (dcp::VerificationNote note)
return "Closed caption assets must have an <EntryPoint> of 0.";
case dcp::VerificationNote::MISSING_HASH:
return String::compose("An asset is missing a <Hash> tag: %1", note.note().get());
+ case dcp::VerificationNote::MISSING_FFEC_IN_FEATURE:
+ return "The DCP is marked as a Feature but there is no FFEC (first frame of end credits) marker";
+ case dcp::VerificationNote::MISSING_FFMC_IN_FEATURE:
+ return "The DCP is marked as a Feature but there is no FFMC (first frame of moving credits) marker";
}
return "";
diff --git a/src/verify.h b/src/verify.h
index 5ba029c9..5fb46a1b 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -153,6 +153,10 @@ public:
CLOSED_CAPTION_ENTRY_POINT_NON_ZERO,
/** <Hash> must be present for assets in CPLs */
MISSING_HASH,
+ /** If ContentKind is Feature there must be a FFEC marker */
+ MISSING_FFEC_IN_FEATURE,
+ /** If ContentKind is Feature there must be a FFMC marker */
+ MISSING_FFMC_IN_FEATURE,
};
VerificationNote (Type type, Code code)