diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-13 23:03:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-17 20:13:22 +0100 |
| commit | f423e80a1832644be0a4ccb5ea999be324cb344f (patch) | |
| tree | 0fe5e832604d5f2bc6ce40fcd31c0ee17970ee3a /src | |
| parent | 61ae69d6e8e105adc4bff1dadbbbf100dc5ab7eb (diff) | |
Bv2.1 7.2.1: Check size of timed text asset is not larger than 115MB.
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 9 | ||||
| -rw-r--r-- | src/verify.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc index 9cfcd4b9..3c36e8f6 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -659,6 +659,13 @@ verify_subtitle_asset ( if (smpte->language()) { verify_language_tag (*smpte->language(), notes); } + if (boost::filesystem::file_size(*asset->file()) > 115 * 1024 * 1024) { + notes.push_back ( + VerificationNote( + VerificationNote::VERIFY_BV21_ERROR, VerificationNote::TIMED_TEXT_ASSET_TOO_LARGE_IN_BYTES, *asset->file() + ) + ); + } } } @@ -857,6 +864,8 @@ dcp::note_to_string (dcp::VerificationNote note) return "3D 4K DCPs are not allowed by Bv2.1"; case dcp::VerificationNote::CLOSED_CAPTION_XML_TOO_LARGE_IN_BYTES: return String::compose("The XML for the closed caption asset %1 is longer than the 256KB maximum required by Bv2.1", note.file()->filename()); + case dcp::VerificationNote::TIMED_TEXT_ASSET_TOO_LARGE_IN_BYTES: + return String::compose("The total size of the timed text asset %1 is larger than the 115MB maximum required by Bv2.1", note.file()->filename()); } return ""; diff --git a/src/verify.h b/src/verify.h index 24c19b2b..3b5dafac 100644 --- a/src/verify.h +++ b/src/verify.h @@ -104,6 +104,8 @@ public: PICTURE_ASSET_4K_3D, /** A closed caption's XML file is larger than 256KB [Bv2.1_7.2.1] */ CLOSED_CAPTION_XML_TOO_LARGE_IN_BYTES, + /** Any timed text asset's total files is larger than 115MB [Bv2.1_7.2.1] */ + TIMED_TEXT_ASSET_TOO_LARGE_IN_BYTES, }; VerificationNote (Type type, Code code) |
