libdcp.git
3 years agoFix strange crash in verify(). bv2.1-verify
Carl Hetherington [Wed, 20 Jan 2021 22:34:54 +0000 (23:34 +0100)]
Fix strange crash in verify().

This appears to be necessary to stop the first write to
state.subtitle_language from segfaulting.  It looks like the
optional<> is in some uninitialised / indeterminate state.

I could only reproduce this crash when running verify() from DoM,
not from the `dcpverify` tool.  And some simple test programs suggest
that even doing

State state;

should call the constructors of anything in State.

3 years agoI don't think we need BOOST_NO_CXX11_SCOPED_ENUMS any more.
Carl Hetherington [Wed, 20 Jan 2021 22:34:37 +0000 (23:34 +0100)]
I don't think we need BOOST_NO_CXX11_SCOPED_ENUMS any more.

3 years agoCleanup: more test naming tweaks.
Carl Hetherington [Wed, 20 Jan 2021 11:15:04 +0000 (12:15 +0100)]
Cleanup: more test naming tweaks.

3 years agoTidy up some test names.
Carl Hetherington [Wed, 20 Jan 2021 10:18:26 +0000 (11:18 +0100)]
Tidy up some test names.

3 years agoCleanup: rename some check_ prefixes to verify_.
Carl Hetherington [Tue, 19 Jan 2021 23:54:22 +0000 (00:54 +0100)]
Cleanup: rename some check_ prefixes to verify_.

3 years agoCleanup: some more use of initialiser lists.
Carl Hetherington [Tue, 19 Jan 2021 23:41:09 +0000 (00:41 +0100)]
Cleanup: some more use of initialiser lists.

3 years agoVerificationNote message tidying.
Carl Hetherington [Tue, 19 Jan 2021 23:31:41 +0000 (00:31 +0100)]
VerificationNote message tidying.

3 years agoTidy up parameters in VerificationNote.
Carl Hetherington [Tue, 19 Jan 2021 22:36:27 +0000 (23:36 +0100)]
Tidy up parameters in VerificationNote.

3 years agoCleanup: now have using namespace boost::filesystem.
Carl Hetherington [Tue, 19 Jan 2021 19:34:34 +0000 (20:34 +0100)]
Cleanup: now have using namespace boost::filesystem.

3 years agoFix tests to actually check the results in several cases.
Carl Hetherington [Tue, 19 Jan 2021 19:32:18 +0000 (20:32 +0100)]
Fix tests to actually check the results in several cases.

3 years ago_line should be optional.
Carl Hetherington [Tue, 19 Jan 2021 01:09:53 +0000 (02:09 +0100)]
_line should be optional.

3 years agoCleanup: remove lots of unnecessary namespace qualifiers.
Carl Hetherington [Tue, 19 Jan 2021 00:30:26 +0000 (01:30 +0100)]
Cleanup: remove lots of unnecessary namespace qualifiers.

3 years agoCleanup: tidy enum names for verification codes.
Carl Hetherington [Tue, 19 Jan 2021 00:27:23 +0000 (01:27 +0100)]
Cleanup: tidy enum names for verification codes.

3 years agoCleanup: more use of prepare_directory().
Carl Hetherington [Mon, 18 Jan 2021 23:46:05 +0000 (00:46 +0100)]
Cleanup: more use of prepare_directory().

3 years agoCleanup: more use of check_verify_result.
Carl Hetherington [Mon, 18 Jan 2021 23:43:33 +0000 (00:43 +0100)]
Cleanup: more use of check_verify_result.

3 years agoCleanup: remove BRANCH file.
Carl Hetherington [Mon, 18 Jan 2021 23:33:51 +0000 (00:33 +0100)]
Cleanup: remove BRANCH file.

3 years agoBv2.1 10.1: if any asset is encrypted they all must be.
Carl Hetherington [Mon, 18 Jan 2021 23:33:14 +0000 (00:33 +0100)]
Bv2.1 10.1: if any asset is encrypted they all must be.

3 years agoRename encrypted() to any_encrypted() and add all_encrypted().
Carl Hetherington [Mon, 18 Jan 2021 23:32:53 +0000 (00:32 +0100)]
Rename encrypted() to any_encrypted() and add all_encrypted().

3 years agoBv2.1 9.2: PKL must be signed if it contains encrypted assets.
Carl Hetherington [Mon, 18 Jan 2021 23:05:44 +0000 (00:05 +0100)]
Bv2.1 9.2: PKL must be signed if it contains encrypted assets.

3 years agoBv2.1 9.1: PKL annotation text must match CPL ContentTitleText if there is only one...
Carl Hetherington [Mon, 18 Jan 2021 21:53:57 +0000 (22:53 +0100)]
Bv2.1 9.1: PKL annotation text must match CPL ContentTitleText if there is only one CPL in the PKL.

3 years agoAdd some more access to PKL.
Carl Hetherington [Mon, 18 Jan 2021 21:53:12 +0000 (22:53 +0100)]
Add some more access to PKL.

3 years agoBv2.1 8.7: CPLs with encrypted content must be signed.
Carl Hetherington [Mon, 18 Jan 2021 19:13:41 +0000 (20:13 +0100)]
Bv2.1 8.7: CPLs with encrypted content must be signed.

3 years agoBv2.1 8.6.3: <ExtensionMetadata> must be present and have precise contents.
Carl Hetherington [Mon, 18 Jan 2021 16:06:23 +0000 (17:06 +0100)]
Bv2.1 8.6.3: <ExtensionMetadata> must be present and have precise contents.

3 years agoBv2.1 8.6.{1.2}: CompositionMetadataAsset must exist and it must have some <VersionNu...
Carl Hetherington [Mon, 18 Jan 2021 12:05:11 +0000 (13:05 +0100)]
Bv2.1 8.6.{1.2}: CompositionMetadataAsset must exist and it must have some <VersionNumber>.

3 years agoAdd CPL::unset_version_number().
Carl Hetherington [Mon, 18 Jan 2021 12:03:47 +0000 (13:03 +0100)]
Add CPL::unset_version_number().

3 years agoBv2.1 8.5: FFOC and LFOC should be present and have particular values.
Carl Hetherington [Sun, 17 Jan 2021 23:27:34 +0000 (00:27 +0100)]
Bv2.1 8.5: FFOC and LFOC should be present and have particular values.

3 years agoRequire instrinsic duration of ReelMarkersAsset to be specified on construction.
Carl Hetherington [Sun, 17 Jan 2021 23:24:21 +0000 (00:24 +0100)]
Require instrinsic duration of ReelMarkersAsset to be specified on construction.

We need the intrinsic duration to match other assets in the reel,
so we can't just calculate it from the markers.

3 years agoAssert that entry_point and intrinsic_duration are not completely bogus.
Carl Hetherington [Sun, 17 Jan 2021 23:21:34 +0000 (00:21 +0100)]
Assert that entry_point and intrinsic_duration are not completely bogus.

3 years agoBv2.1 8.5: Features must have FFEC/FFMC markers.
Carl Hetherington [Sun, 17 Jan 2021 21:25:59 +0000 (22:25 +0100)]
Bv2.1 8.5: Features must have FFEC/FFMC markers.

3 years agoUse feature not trailer for some tests to avoid verification errors about FFEC/FFMC.
Carl Hetherington [Sun, 17 Jan 2021 21:25:50 +0000 (22:25 +0100)]
Use feature not trailer for some tests to avoid verification errors about FFEC/FFMC.

3 years agoAdd CPL::set_content_kind.
Carl Hetherington [Sun, 17 Jan 2021 21:21:29 +0000 (22:21 +0100)]
Add CPL::set_content_kind.

3 years agoRead scope attribute of ReleaseTerritory.
Carl Hetherington [Sun, 17 Jan 2021 21:06:20 +0000 (22:06 +0100)]
Read scope attribute of ReleaseTerritory.

3 years agoCheck that the Editor actually edits something.
Carl Hetherington [Sun, 17 Jan 2021 19:26:28 +0000 (20:26 +0100)]
Check that the Editor actually edits something.

3 years agoUse an enum class for Marker.
Carl Hetherington [Fri, 15 Jan 2021 22:11:47 +0000 (23:11 +0100)]
Use an enum class for Marker.

3 years agoBv2.1 8.4 We must have <Hash>es
Carl Hetherington [Fri, 15 Jan 2021 21:56:38 +0000 (22:56 +0100)]
Bv2.1 8.4 We must have <Hash>es

3 years agoBv2.1 8.3.2: text tracks must have <EntryPoint> and it must be zero.
Carl Hetherington [Fri, 15 Jan 2021 21:04:42 +0000 (22:04 +0100)]
Bv2.1 8.3.2: text tracks must have <EntryPoint> and it must be zero.

3 years agoAdd ReelAsset::unset_entry_point().
Carl Hetherington [Fri, 15 Jan 2021 21:04:23 +0000 (22:04 +0100)]
Add ReelAsset::unset_entry_point().

3 years agoBv2.1 8.3.1: MainSubtitles must be in all reels (if they are there at
Carl Hetherington [Thu, 14 Jan 2021 23:17:09 +0000 (00:17 +0100)]
Bv2.1 8.3.1: MainSubtitles must be in all reels (if they are there at
all) and ClosedCaptions must have the same count on all reels.

3 years agoBv2.1 8.2: all parts of a reel must have the same duration.
Carl Hetherington [Thu, 14 Jan 2021 22:38:30 +0000 (23:38 +0100)]
Bv2.1 8.2: all parts of a reel must have the same duration.

3 years agoMake subtitle checking robust to CPLs with no subs/ccaps in some reels.
Carl Hetherington [Thu, 14 Jan 2021 22:38:03 +0000 (23:38 +0100)]
Make subtitle checking robust to CPLs with no subs/ccaps in some reels.

3 years agoBv2.1 8.1: CPL <AnnotationText> should be the same as <ContentTitleText>
Carl Hetherington [Thu, 14 Jan 2021 21:50:09 +0000 (22:50 +0100)]
Bv2.1 8.1: CPL <AnnotationText> should be the same as <ContentTitleText>

3 years agoBv2.1 8.1: CPL must have <AnnotationText>.
Carl Hetherington [Thu, 14 Jan 2021 21:38:58 +0000 (22:38 +0100)]
Bv2.1 8.1: CPL must have <AnnotationText>.

3 years agoMake CPL annotation_text optional.
Carl Hetherington [Thu, 14 Jan 2021 21:20:06 +0000 (22:20 +0100)]
Make CPL annotation_text optional.

3 years agoFix some directory paths for tests.
Carl Hetherington [Wed, 13 Jan 2021 01:20:02 +0000 (02:20 +0100)]
Fix some directory paths for tests.

3 years agoBv2.1 7.3: audio sample rate must be 48kHz.
Carl Hetherington [Wed, 13 Jan 2021 01:16:37 +0000 (02:16 +0100)]
Bv2.1 7.3: audio sample rate must be 48kHz.

3 years agoBv2.1 7.2.{6,7}: various limits on subtitle line and character counts.
Carl Hetherington [Tue, 12 Jan 2021 23:53:38 +0000 (00:53 +0100)]
Bv2.1 7.2.{6,7}: various limits on subtitle line and character counts.

3 years agoRemove some unnecessary std:: qualifiers.
Carl Hetherington [Tue, 12 Jan 2021 23:52:19 +0000 (00:52 +0100)]
Remove some unnecessary std:: qualifiers.

3 years agoBv2.1 7.2.{4,5}: check that subtitles are not too short, too close or
Carl Hetherington [Tue, 12 Jan 2021 16:47:23 +0000 (17:47 +0100)]
Bv2.1 7.2.{4,5}: check that subtitles are not too short, too close or
too early in the first reel.

3 years agoGive simple_{picture,sound} a length parameter and fix crazy implementation of simple...
Carl Hetherington [Mon, 11 Jan 2021 20:21:38 +0000 (21:21 +0100)]
Give simple_{picture,sound} a length parameter and fix crazy implementation of simple_sound().

3 years agoChange subtitle SubtitleAsset API to return const Subtitle pointers; add subtitles_in...
Carl Hetherington [Mon, 11 Jan 2021 20:20:47 +0000 (21:20 +0100)]
Change subtitle SubtitleAsset API to return const Subtitle pointers; add subtitles_in_reel().

3 years agoReplace std::list with std::vector in the API.
Carl Hetherington [Sun, 10 Jan 2021 23:16:40 +0000 (00:16 +0100)]
Replace std::list with std::vector in the API.

3 years agoc++11 and other tidying.
Carl Hetherington [Sat, 9 Jan 2021 21:01:12 +0000 (22:01 +0100)]
c++11 and other tidying.

3 years agoBRANCH
Carl Hetherington [Sat, 9 Jan 2021 13:56:12 +0000 (14:56 +0100)]
BRANCH

3 years agoStop tests failing when libdcp version changes.
Carl Hetherington [Sat, 9 Jan 2021 08:58:55 +0000 (09:58 +0100)]
Stop tests failing when libdcp version changes.

3 years agoBv2.1 7.2.4: first subtitle should be at least 4s into the DCP.
Carl Hetherington [Sat, 9 Jan 2021 00:39:08 +0000 (01:39 +0100)]
Bv2.1 7.2.4: first subtitle should be at least 4s into the DCP.

3 years agoBRANCH
Carl Hetherington [Fri, 8 Jan 2021 23:43:24 +0000 (00:43 +0100)]
BRANCH

3 years agoc++11 tidying.
Carl Hetherington [Fri, 8 Jan 2021 23:38:18 +0000 (00:38 +0100)]
c++11 tidying.

3 years agoBv2.1 7.2.3: Check that subtitle <StartTime> exists and is 0.
Carl Hetherington [Sat, 2 Jan 2021 23:31:40 +0000 (00:31 +0100)]
Bv2.1 7.2.3: Check that subtitle <StartTime> exists and is 0.

3 years agoBv2.1 7.2.2: Check that subtitle languages are the same for all reels.
Carl Hetherington [Mon, 14 Dec 2020 23:51:34 +0000 (00:51 +0100)]
Bv2.1 7.2.2: Check that subtitle languages are the same for all reels.

3 years agoRemove unused variable.
Carl Hetherington [Mon, 14 Dec 2020 23:24:12 +0000 (00:24 +0100)]
Remove unused variable.

3 years agoChange the word 'disagree' to 'differ'.
Carl Hetherington [Mon, 14 Dec 2020 22:58:53 +0000 (23:58 +0100)]
Change the word 'disagree' to 'differ'.

3 years agoBv2.1 7.2.2: Check that subtitle Language tags are present.
Carl Hetherington [Mon, 14 Dec 2020 22:23:41 +0000 (23:23 +0100)]
Bv2.1 7.2.2: Check that subtitle Language tags are present.

3 years agoFix to allow re-writing of SMPTE subtitles.
Carl Hetherington [Mon, 14 Dec 2020 22:23:22 +0000 (23:23 +0100)]
Fix to allow re-writing of SMPTE subtitles.

3 years agoBv2.1 7.2.1: Check total size of all timed text fonts is not larger than 10MB.
Carl Hetherington [Sun, 13 Dec 2020 22:49:48 +0000 (23:49 +0100)]
Bv2.1 7.2.1: Check total size of all timed text fonts is not larger than 10MB.

I'm not sure if this is what Bv2.1 means, but hopefully it's close
enough.

3 years agoBv2.1 7.2.1: Check size of timed text asset is not larger than 115MB.
Carl Hetherington [Sun, 13 Dec 2020 22:03:22 +0000 (23:03 +0100)]
Bv2.1 7.2.1: Check size of timed text asset is not larger than 115MB.

3 years agoUpdate BRANCH.
Carl Hetherington [Sun, 13 Dec 2020 21:36:07 +0000 (22:36 +0100)]
Update BRANCH.

3 years agoBv2.1 7.2.1: Check size of closed caption XML is not larger than 256KB.
Carl Hetherington [Sun, 13 Dec 2020 21:23:07 +0000 (22:23 +0100)]
Bv2.1 7.2.1: Check size of closed caption XML is not larger than 256KB.

3 years agoSubtitle constructor should not be public.
Carl Hetherington [Sun, 13 Dec 2020 21:18:26 +0000 (22:18 +0100)]
Subtitle constructor should not be public.

3 years agoBv2.1 7.1: Check picture size and frame rate.
Carl Hetherington [Sun, 13 Dec 2020 20:23:41 +0000 (21:23 +0100)]
Bv2.1 7.1: Check picture size and frame rate.

3 years agoExtent black_image() to make images of any size.
Carl Hetherington [Sun, 13 Dec 2020 20:22:30 +0000 (21:22 +0100)]
Extent black_image() to make images of any size.

3 years agoRaise an exception to head off a weird asdcplib error with empty JPEG2000 comments.
Carl Hetherington [Sun, 13 Dec 2020 20:22:15 +0000 (21:22 +0100)]
Raise an exception to head off a weird asdcplib error with empty JPEG2000 comments.

3 years agoThrow an exception on making a DCP with no reels.
Carl Hetherington [Sun, 13 Dec 2020 20:22:00 +0000 (21:22 +0100)]
Throw an exception on making a DCP with no reels.

3 years agoReplace dcp::File with dcp::ArrayData.
Carl Hetherington [Sun, 13 Dec 2020 00:30:30 +0000 (01:30 +0100)]
Replace dcp::File with dcp::ArrayData.

3 years agoRemove 32x32 test image.
Carl Hetherington [Sat, 12 Dec 2020 23:33:58 +0000 (00:33 +0100)]
Remove 32x32 test image.

3 years agoUse a valid frame size for simple_picture().
Carl Hetherington [Sat, 12 Dec 2020 22:08:56 +0000 (23:08 +0100)]
Use a valid frame size for simple_picture().

3 years agoRename some notes to clarify places where size refers to bytes, not pixels.
Carl Hetherington [Sat, 12 Dec 2020 19:52:29 +0000 (20:52 +0100)]
Rename some notes to clarify places where size refers to bytes, not pixels.

3 years agoBv2.1 6.2.1: Check that release territory conforms to RFC 5646.
Carl Hetherington [Sat, 12 Dec 2020 19:33:15 +0000 (20:33 +0100)]
Bv2.1 6.2.1: Check that release territory conforms to RFC 5646.

3 years agoBv2.1 6.2.1: Check that additional subtitle languages conform to RFC 5646.
Carl Hetherington [Sat, 12 Dec 2020 19:21:28 +0000 (20:21 +0100)]
Bv2.1 6.2.1: Check that additional subtitle languages conform to RFC 5646.

3 years agoBv2.1 6.2.1: Check that closed caption reel and XML <Language> conform to RFC 5646.
Carl Hetherington [Wed, 9 Dec 2020 15:27:26 +0000 (16:27 +0100)]
Bv2.1 6.2.1: Check that closed caption reel and XML <Language> conform to RFC 5646.

3 years agoFix namespace on closed caption Language tag.
Carl Hetherington [Wed, 9 Dec 2020 15:26:33 +0000 (16:26 +0100)]
Fix namespace on closed caption Language tag.

3 years agoSmall tweaks to how things are passed around.
Carl Hetherington [Wed, 9 Dec 2020 13:59:29 +0000 (14:59 +0100)]
Small tweaks to how things are passed around.

3 years agoBv2.1 6.2.1: Check that the sound MXF Language tag conforms to RFC 5646.
Carl Hetherington [Wed, 9 Dec 2020 12:13:23 +0000 (13:13 +0100)]
Bv2.1 6.2.1: Check that the sound MXF Language tag conforms to RFC 5646.

3 years agoStore sound asset language as a string, but set it as a
Carl Hetherington [Wed, 9 Dec 2020 12:12:21 +0000 (13:12 +0100)]
Store sound asset language as a string, but set it as a
dcp::LanguageTag.

This makes it work the same as other language tags, and tolerates
bad values while trying not to allow them to be created.

3 years agoExtract simple_sound() method.
Carl Hetherington [Wed, 9 Dec 2020 10:59:29 +0000 (11:59 +0100)]
Extract simple_sound() method.

3 years agoWe can always dump notes where there are none expected.
Carl Hetherington [Wed, 9 Dec 2020 09:54:55 +0000 (10:54 +0100)]
We can always dump notes where there are none expected.

3 years agoLanguageTag strings should not care about case.
Carl Hetherington [Wed, 9 Dec 2020 09:54:38 +0000 (10:54 +0100)]
LanguageTag strings should not care about case.

3 years ago Bv2.1 6.2.1: Check that subtitle XML <Language> conforms to RFC 5646.
Carl Hetherington [Wed, 9 Dec 2020 09:21:57 +0000 (10:21 +0100)]
 Bv2.1 6.2.1: Check that subtitle XML <Language> conforms to RFC 5646.

3 years agoTiny cleanup of using prepare_directory.
Carl Hetherington [Wed, 9 Dec 2020 00:17:38 +0000 (01:17 +0100)]
Tiny cleanup of using prepare_directory.

3 years agoBv2.1 6.2.1: Check that subtitle reel <Language> conforms to RFC 5646.
Carl Hetherington [Wed, 9 Dec 2020 00:08:14 +0000 (01:08 +0100)]
Bv2.1 6.2.1: Check that subtitle reel <Language> conforms to RFC 5646.

3 years agoBRANCH
Carl Hetherington [Tue, 8 Dec 2020 23:25:29 +0000 (00:25 +0100)]
BRANCH

3 years agoBv2.1 6.1: DCPs must be SMPTE.
Carl Hetherington [Tue, 8 Dec 2020 22:42:40 +0000 (23:42 +0100)]
Bv2.1 6.1: DCPs must be SMPTE.

3 years agoAdd VERIFY_BV21_ERROR.
Carl Hetherington [Tue, 8 Dec 2020 22:42:13 +0000 (23:42 +0100)]
Add VERIFY_BV21_ERROR.

3 years agoAdd BRANCH notes.
Carl Hetherington [Tue, 8 Dec 2020 22:41:51 +0000 (23:41 +0100)]
Add BRANCH notes.

3 years agoFix macOS test environment path.
Carl Hetherington [Sun, 17 Jan 2021 12:07:56 +0000 (13:07 +0100)]
Fix macOS test environment path.

3 years agoBump libcxml.
Carl Hetherington [Fri, 8 Jan 2021 20:51:10 +0000 (21:51 +0100)]
Bump libcxml.

3 years agoMore c++11 tidying.
Carl Hetherington [Fri, 8 Jan 2021 20:49:47 +0000 (21:49 +0100)]
More c++11 tidying.

3 years agoc++11 tidying.
Carl Hetherington [Fri, 8 Jan 2021 16:43:59 +0000 (17:43 +0100)]
c++11 tidying.

3 years agoRemove use of xmldiff in tests.
Carl Hetherington [Fri, 8 Jan 2021 16:43:49 +0000 (17:43 +0100)]
Remove use of xmldiff in tests.

3 years agostd::shared_ptr
Carl Hetherington [Sun, 20 Dec 2020 13:14:07 +0000 (14:14 +0100)]
std::shared_ptr

3 years agoFix test following previous commit.
Carl Hetherington [Thu, 7 Jan 2021 23:35:07 +0000 (00:35 +0100)]
Fix test following previous commit.