libdcp.git
3 years agoAdd some missing override statements. sub-rework
Carl Hetherington [Sun, 11 Apr 2021 22:38:01 +0000 (00:38 +0200)]
Add some missing override statements.

3 years agoSplit ReelClosedCaptionAsset into Interop and SMPTE parts.
Carl Hetherington [Sun, 11 Apr 2021 22:20:44 +0000 (00:20 +0200)]
Split ReelClosedCaptionAsset into Interop and SMPTE parts.

3 years agoC++11 tidying.
Carl Hetherington [Sun, 11 Apr 2021 20:25:21 +0000 (22:25 +0200)]
C++11 tidying.

3 years agoSpecify CPL standard on construction.
Carl Hetherington [Sun, 11 Apr 2021 20:24:44 +0000 (22:24 +0200)]
Specify CPL standard on construction.

Then choose which standard DCP should use based on the CPL(s).

3 years agoSplit ReelSubtitleAsset into Interop and SMPTE classes.
Carl Hetherington [Sun, 11 Apr 2021 18:49:44 +0000 (20:49 +0200)]
Split ReelSubtitleAsset into Interop and SMPTE classes.

3 years agoSmall bits of tidying up.
Carl Hetherington [Sun, 11 Apr 2021 18:49:18 +0000 (20:49 +0200)]
Small bits of tidying up.

3 years agoAdd header guards.
Carl Hetherington [Sun, 11 Apr 2021 18:46:55 +0000 (20:46 +0200)]
Add header guards.

3 years agoExtract some parts of ReelEncryptableAsset into ReelFileAsset
Carl Hetherington [Sat, 10 Apr 2021 22:10:30 +0000 (00:10 +0200)]
Extract some parts of ReelEncryptableAsset into ReelFileAsset

3 years agoRename ReelFileAsset -> ReelEncryptableAsset
Carl Hetherington [Sat, 10 Apr 2021 21:54:31 +0000 (23:54 +0200)]
Rename ReelFileAsset -> ReelEncryptableAsset

3 years agoAdd check for Bv2.1 10.4.3 - container duration vs reel duration in timed text.
Carl Hetherington [Fri, 9 Apr 2021 21:49:42 +0000 (23:49 +0200)]
Add check for Bv2.1 10.4.3 - container duration vs reel duration in timed text.

3 years agoAdd accessor for intrinsic_duration in SMPTESubtitleAsset.
Carl Hetherington [Fri, 9 Apr 2021 21:49:07 +0000 (23:49 +0200)]
Add accessor for intrinsic_duration in SMPTESubtitleAsset.

3 years agoMake sound asset language optional.
Carl Hetherington [Thu, 8 Apr 2021 22:02:09 +0000 (00:02 +0200)]
Make sound asset language optional.

3 years agoVerify that SMPTE subtitle IDs are handled properly (DoM #1962).
Carl Hetherington [Thu, 8 Apr 2021 00:07:05 +0000 (02:07 +0200)]
Verify that SMPTE subtitle IDs are handled properly (DoM #1962).

3 years agoDon't set the MXF _id from the XML <Id> tag.
Carl Hetherington [Thu, 8 Apr 2021 00:05:04 +0000 (02:05 +0200)]
Don't set the MXF _id from the XML <Id> tag.

They should not be the same, so it's unhelpful to make them so.
parse_xml() sets up _xml_id anyway.

3 years agoExpose the MXF ResourceID from SMPTESubtitleAsset.
Carl Hetherington [Thu, 8 Apr 2021 00:04:44 +0000 (02:04 +0200)]
Expose the MXF ResourceID from SMPTESubtitleAsset.

3 years agoComment tweaks.
Carl Hetherington [Thu, 8 Apr 2021 00:04:06 +0000 (02:04 +0200)]
Comment tweaks.

3 years agoDon't try to verify encrypted JPEG2000 bitstreams.
Carl Hetherington [Tue, 6 Apr 2021 12:34:23 +0000 (14:34 +0200)]
Don't try to verify encrypted JPEG2000 bitstreams.

3 years agoHide dump_notes() again.
Carl Hetherington [Tue, 6 Apr 2021 12:34:05 +0000 (14:34 +0200)]
Hide dump_notes() again.

3 years agoCall verify_j2k when verifying DCPs.
Carl Hetherington [Mon, 5 Apr 2021 22:39:20 +0000 (00:39 +0200)]
Call verify_j2k when verifying DCPs.

3 years agoAdd Luminance::value_in_foot_lamberts().
Carl Hetherington [Sat, 3 Apr 2021 18:29:45 +0000 (20:29 +0200)]
Add Luminance::value_in_foot_lamberts().

3 years agoWrite MCA tags based on the specified sound field.
Carl Hetherington [Thu, 25 Mar 2021 23:09:15 +0000 (00:09 +0100)]
Write MCA tags based on the specified sound field.

I had previously assumed that one should write MCA information into
the sound MXF based on what channels actually contain sound rather
than silence.

However a previous example of a stereo DCP gives a verification error
in EasyDCP (see DoM bug #1935) which is solved by adding MCA tags
for each channel in the specified sound field (e.g. at least 6 tags
for a file which is marked as 5.1) even if the audio is really stereo.

This commit removes the "active channels" stuff and makes sure
that if we say a file is 5.1 we write at least 6 MCA tags (and
similarly for 7.1).

3 years agoAdd operator!= and operator< for LanguageTag
Carl Hetherington [Tue, 23 Mar 2021 18:16:46 +0000 (19:16 +0100)]
Add operator!= and operator< for LanguageTag

3 years agoAdd headerpad option for the macOS linker.
Carl Hetherington [Sun, 21 Mar 2021 22:02:18 +0000 (23:02 +0100)]
Add headerpad option for the macOS linker.

3 years agoAdd access to DCNC list.
Carl Hetherington [Sat, 20 Mar 2021 09:51:34 +0000 (10:51 +0100)]
Add access to DCNC list.

3 years agoAdd DCNC tags file.
Carl Hetherington [Fri, 19 Mar 2021 21:45:46 +0000 (22:45 +0100)]
Add DCNC tags file.

3 years agoMissing library for static build.
Carl Hetherington [Fri, 19 Mar 2021 10:03:42 +0000 (11:03 +0100)]
Missing library for static build.

3 years agoFix static test buid.
Carl Hetherington [Thu, 18 Mar 2021 23:08:25 +0000 (00:08 +0100)]
Fix static test buid.

3 years agoImprove errors when verifying a non-DCP directory.
Carl Hetherington [Wed, 17 Mar 2021 23:20:17 +0000 (00:20 +0100)]
Improve errors when verifying a non-DCP directory.

3 years agoTidy how we're finding the tags and xsd directories.
Carl Hetherington [Wed, 17 Mar 2021 10:53:28 +0000 (11:53 +0100)]
Tidy how we're finding the tags and xsd directories.

3 years agoFix combining when two DCPs both contain copies of the same asset.
Carl Hetherington [Wed, 17 Mar 2021 21:38:08 +0000 (22:38 +0100)]
Fix combining when two DCPs both contain copies of the same asset.

3 years agoFix various bugs in subtitle/ccap verification.
Carl Hetherington [Mon, 15 Mar 2021 00:36:51 +0000 (01:36 +0100)]
Fix various bugs in subtitle/ccap verification.

Check that subtitles don't overlap reel boundaries, and fix a few
tests that trip this check.

Fix confusion when calculating subtitle timings during verification
where the picture asset frame rate was being used rather than the
subtitle asset's edit rate.

Do the subtitle timing verification for Interop as well as SMPTE
subtitles.

Take <StartTime> tags into account when checking subtitles, even
though Bv2.1 says they should be set to 0.

Rename Time::as_editable_units to Time::as_editable_units_ceil
and add a _floor variant, then use that to round down when checking
reel boundary overlaps.

3 years agoAdd operator-= to Time.
Carl Hetherington [Mon, 15 Mar 2021 00:30:47 +0000 (01:30 +0100)]
Add operator-= to Time.

3 years agoUse std::array.
Carl Hetherington [Sat, 27 Feb 2021 23:09:48 +0000 (00:09 +0100)]
Use std::array.

3 years agoUse new write() method in example.
Carl Hetherington [Sat, 27 Feb 2021 23:09:38 +0000 (00:09 +0100)]
Use new write() method in example.

3 years agoWhitespace.
Carl Hetherington [Sat, 27 Feb 2021 23:09:29 +0000 (00:09 +0100)]
Whitespace.

3 years agoAdd missing dcp::init() to example.
Carl Hetherington [Sat, 27 Feb 2021 23:09:14 +0000 (00:09 +0100)]
Add missing dcp::init() to example.

3 years agoAdd new write() method.
Carl Hetherington [Sat, 27 Feb 2021 23:08:56 +0000 (00:08 +0100)]
Add new write() method.

3 years agoImproved comments.
Carl Hetherington [Fri, 26 Feb 2021 09:08:02 +0000 (10:08 +0100)]
Improved comments.

3 years agoEnglish language tweaks.
Carl Hetherington [Sun, 21 Feb 2021 11:10:59 +0000 (12:10 +0100)]
English language tweaks.

3 years agoDon't give a verification error if there are closed caption tracks with different...
Carl Hetherington [Sat, 20 Feb 2021 21:52:04 +0000 (22:52 +0100)]
Don't give a verification error if there are closed caption tracks with different languages (DoM bug #1907).

3 years agoSome const correctness for decompress_j2k
Carl Hetherington [Sun, 14 Feb 2021 19:55:37 +0000 (20:55 +0100)]
Some const correctness for decompress_j2k

3 years agoComment fixes.
Carl Hetherington [Sun, 7 Feb 2021 01:44:52 +0000 (02:44 +0100)]
Comment fixes.

3 years agoBasic analysis (verification) of J2K codestreams.
Carl Hetherington [Wed, 27 Jan 2021 00:27:53 +0000 (01:27 +0100)]
Basic analysis (verification) of J2K codestreams.

3 years agoDon't use flat_red.j2c for the simple DCP test as it's only 8-bit.
Carl Hetherington [Thu, 28 Jan 2021 22:13:15 +0000 (23:13 +0100)]
Don't use flat_red.j2c for the simple DCP test as it's only 8-bit.

3 years agoUse 1 guard bit in JPEG2000 encoding for 2K, per Bv2.1.
Carl Hetherington [Thu, 28 Jan 2021 21:27:40 +0000 (22:27 +0100)]
Use 1 guard bit in JPEG2000 encoding for 2K, per Bv2.1.

3 years agoRename j2k.{cc,h} => j2k_transcode.{cc,h}
Carl Hetherington [Wed, 27 Jan 2021 00:06:05 +0000 (01:06 +0100)]
Rename j2k.{cc,h} => j2k_transcode.{cc,h}

3 years agoTweak comment.
Carl Hetherington [Sat, 6 Feb 2021 21:22:45 +0000 (22:22 +0100)]
Tweak comment.

3 years agoImprove a comment.
Carl Hetherington [Thu, 4 Feb 2021 20:33:19 +0000 (21:33 +0100)]
Improve a comment.

3 years agoFix failure to write Interop closed captions.
Carl Hetherington [Thu, 4 Feb 2021 16:34:16 +0000 (17:34 +0100)]
Fix failure to write Interop closed captions.

3 years agoSome compilers don't like x = {} where x is a boost::optional<string>
Carl Hetherington [Tue, 2 Feb 2021 21:02:29 +0000 (22:02 +0100)]
Some compilers don't like x = {} where x is a boost::optional<string>

Fails on ubuntu 16 and debian 9.

3 years agoFix strange Windows build error introduced in 6c37cc1979b2a01205a888c4c98f3334685ee8dd
Carl Hetherington [Sun, 31 Jan 2021 22:50:17 +0000 (23:50 +0100)]
Fix strange Windows build error introduced in 6c37cc1979b2a01205a888c4c98f3334685ee8dd

3 years ago0 => nullptr fix.
Carl Hetherington [Tue, 26 Jan 2021 23:38:32 +0000 (00:38 +0100)]
0 => nullptr fix.

3 years agoFix install.
Carl Hetherington [Tue, 26 Jan 2021 20:53:27 +0000 (21:53 +0100)]
Fix install.

3 years agoRename ReelMXF -> ReelFileAsset.
Carl Hetherington [Tue, 26 Jan 2021 20:52:21 +0000 (21:52 +0100)]
Rename ReelMXF -> ReelFileAsset.

3 years agoDoc fixes.
Carl Hetherington [Sun, 24 Jan 2021 22:14:21 +0000 (23:14 +0100)]
Doc fixes.

3 years agoFix previous.
Carl Hetherington [Sun, 24 Jan 2021 22:00:36 +0000 (23:00 +0100)]
Fix previous.

3 years agoTidying.
Carl Hetherington [Sun, 24 Jan 2021 21:56:33 +0000 (22:56 +0100)]
Tidying.

3 years agoTidying.
Carl Hetherington [Sun, 24 Jan 2021 03:15:26 +0000 (04:15 +0100)]
Tidying.

3 years agoTidying.
Carl Hetherington [Sat, 23 Jan 2021 14:35:24 +0000 (15:35 +0100)]
Tidying.

3 years agoTidy a little and add some coding style.
Carl Hetherington [Sat, 23 Jan 2021 14:34:24 +0000 (15:34 +0100)]
Tidy a little and add some coding style.

3 years agoRemove Windows XP support and pin asdcplib version.
Carl Hetherington [Sat, 23 Jan 2021 08:49:29 +0000 (09:49 +0100)]
Remove Windows XP support and pin asdcplib version.

3 years agoSmall bits of pre-release tidying.
Carl Hetherington [Sat, 23 Jan 2021 08:48:00 +0000 (09:48 +0100)]
Small bits of pre-release tidying.

3 years agoFix name clash of ERROR with windows.h
Carl Hetherington [Sat, 23 Jan 2021 08:30:44 +0000 (09:30 +0100)]
Fix name clash of ERROR with windows.h

3 years agoRemove some unused #includes.
Carl Hetherington [Fri, 22 Jan 2021 10:03:12 +0000 (11:03 +0100)]
Remove some unused #includes.

3 years agoAssorted c++11 cleanups.
Carl Hetherington [Fri, 22 Jan 2021 00:39:22 +0000 (01:39 +0100)]
Assorted c++11 cleanups.

3 years agoc++11 bits in examples/
Carl Hetherington [Thu, 21 Jan 2021 23:53:30 +0000 (00:53 +0100)]
c++11 bits in examples/

3 years agoTry to fix MinGW build.
Carl Hetherington [Thu, 21 Jan 2021 23:02:12 +0000 (00:02 +0100)]
Try to fix MinGW build.

3 years agoMove all ostream operator<< into some test-only stream_operators.{cc,h} files.
Carl Hetherington [Thu, 21 Jan 2021 16:10:19 +0000 (17:10 +0100)]
Move all ostream operator<< into some test-only stream_operators.{cc,h} files.

3 years agoSome more use of enum class.
Carl Hetherington [Thu, 21 Jan 2021 09:56:07 +0000 (10:56 +0100)]
Some more use of enum class.

3 years agoUse enum class for the things in types.h
Carl Hetherington [Thu, 21 Jan 2021 00:57:06 +0000 (01:57 +0100)]
Use enum class for the things in types.h

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.