libdcp.git
8 months agoMake EqualityOptions into a class.
Carl Hetherington [Tue, 25 Jul 2023 12:40:19 +0000 (14:40 +0200)]
Make EqualityOptions into a class.

8 months agoCleanup: fix typo in comment.
Carl Hetherington [Tue, 25 Jul 2023 12:31:43 +0000 (14:31 +0200)]
Cleanup: fix typo in comment.

9 months agoAdd asset_hashes_can_differ option to the equality checks. v1.8.74
Carl Hetherington [Wed, 28 Jun 2023 21:00:57 +0000 (23:00 +0200)]
Add asset_hashes_can_differ option to the equality checks.

Before recent changes Asset::_hash would be empty when the equality
checks were run (and Asset::equals() compares them directly).

This mean that differences in asset hash were being ignored, but
are no longer; so now we need this option to restore that behaviour
where required.

9 months agoWhen reading a DCP set up asset hashes from the CPL/PKL, not by digesting the actual...
Carl Hetherington [Mon, 26 Jun 2023 22:11:43 +0000 (00:11 +0200)]
When reading a DCP set up asset hashes from the CPL/PKL, not by digesting the actual asset.

Previously when reading a DCP we would recalculate asset hashes.  This meant that corrupted
DCPs could be loaded in and their hashes re-written (if nobody checked the new hashes against
the ones in the PKL/CPL).

It seems better to take the hashes from the metadata.  Then if the assets are corrupted
and the DCP is re-written the PKL/CPL hashes will be preserved, showing rather than hiding
the corruption.

9 months agoAdd Asset::unset_hash().
Carl Hetherington [Mon, 26 Jun 2023 22:06:14 +0000 (00:06 +0200)]
Add Asset::unset_hash().

9 months agoCleanup: remove unnecessary namespace.
Carl Hetherington [Mon, 26 Jun 2023 22:05:55 +0000 (00:05 +0200)]
Cleanup: remove unnecessary namespace.

9 months agoFix tests that were writing assets with the same filename to different reels.
Carl Hetherington [Mon, 26 Jun 2023 22:05:38 +0000 (00:05 +0200)]
Fix tests that were writing assets with the same filename to different reels.

9 months agoCleanup: sorting.
Carl Hetherington [Mon, 26 Jun 2023 00:13:22 +0000 (02:13 +0200)]
Cleanup: sorting.

9 months agoMove Editor class from verify_test.cc to test.cc
Carl Hetherington [Sun, 25 Jun 2023 23:56:07 +0000 (01:56 +0200)]
Move Editor class from verify_test.cc to test.cc

9 months agoAdd verifier check for the actual asset file's ID not being the same as the one in...
Carl Hetherington [Sun, 25 Jun 2023 23:45:17 +0000 (01:45 +0200)]
Add verifier check for the actual asset file's ID not being the same as the one in the asset map.

9 months agoCleanup: better variable names.
Carl Hetherington [Sun, 25 Jun 2023 23:20:34 +0000 (01:20 +0200)]
Cleanup: better variable names.

9 months agoCleanup: const.
Carl Hetherington [Sun, 25 Jun 2023 23:18:06 +0000 (01:18 +0200)]
Cleanup: const.

9 months agoAdd Asset::set_file_preserving_hash().
Carl Hetherington [Tue, 20 Jun 2023 20:06:02 +0000 (22:06 +0200)]
Add Asset::set_file_preserving_hash().

9 months agoCleanup: set annotation text in make_simple().
Carl Hetherington [Tue, 20 Jun 2023 20:05:20 +0000 (22:05 +0200)]
Cleanup: set annotation text in make_simple().

10 months agoVerify error if SMPTE subtitle asset has <Text> but no <LoadFont>. v1.8.73
Carl Hetherington [Tue, 30 May 2023 23:36:49 +0000 (01:36 +0200)]
Verify error if SMPTE subtitle asset has <Text> but no <LoadFont>.

10 months agoCleanup: replace a nasty try/catch.
Carl Hetherington [Tue, 30 May 2023 23:35:49 +0000 (01:35 +0200)]
Cleanup: replace a nasty try/catch.

10 months agoCleanup: formatting.
Carl Hetherington [Tue, 30 May 2023 23:20:09 +0000 (01:20 +0200)]
Cleanup: formatting.

10 months agoCleanup: remove some unpleasant (and I think unnecessary) casting.
Carl Hetherington [Tue, 30 May 2023 23:18:01 +0000 (01:18 +0200)]
Cleanup: remove some unpleasant (and I think unnecessary) casting.

10 months agoRename MISSING_LOAD_FONT -> MISSING_LOAD_FONT_FOR_FONT.
Carl Hetherington [Tue, 30 May 2023 23:13:08 +0000 (01:13 +0200)]
Rename MISSING_LOAD_FONT -> MISSING_LOAD_FONT_FOR_FONT.

10 months agoCleanup: comment typo fix.
Carl Hetherington [Tue, 30 May 2023 23:12:13 +0000 (01:12 +0200)]
Cleanup: comment typo fix.

10 months agoAdd SoundAsset::active_channels(). v1.8.72
Carl Hetherington [Sun, 28 May 2023 21:01:32 +0000 (23:01 +0200)]
Add SoundAsset::active_channels().

10 months agoFix stupid mistake introduced in 1e010ab5. v1.8.71
Carl Hetherington [Sun, 28 May 2023 21:00:58 +0000 (23:00 +0200)]
Fix stupid mistake introduced in 1e010ab5.

10 months agoDon't unconditionally clear _fonts when inspecting assets (DoM #2536). v1.8.70
Carl Hetherington [Sun, 28 May 2023 00:12:39 +0000 (02:12 +0200)]
Don't unconditionally clear _fonts when inspecting assets (DoM #2536).

resolve_fonts() is sometimes called for the same asset with different
lists of things to check.  If it is called first with a font, and
then without one, we want to keep the font from the first call.

10 months agoCleanup: use find_if().
Carl Hetherington [Sun, 28 May 2023 00:12:03 +0000 (02:12 +0200)]
Cleanup: use find_if().

10 months agoCleanup: reduce some scopes.
Carl Hetherington [Sun, 28 May 2023 18:07:32 +0000 (20:07 +0200)]
Cleanup: reduce some scopes.

10 months agoMore detailed error message.
Carl Hetherington [Wed, 24 May 2023 21:46:57 +0000 (23:46 +0200)]
More detailed error message.

10 months agoRemove unnecessary initializers.
Carl Hetherington [Sun, 21 May 2023 20:03:23 +0000 (22:03 +0200)]
Remove unnecessary initializers.

11 months agoFormatting tidying; use vector instead of scoped_array.
Carl Hetherington [Sun, 14 May 2023 22:46:43 +0000 (00:46 +0200)]
Formatting tidying; use vector instead of scoped_array.

11 months agoStyle/formatting tweaks.
Carl Hetherington [Sun, 14 May 2023 22:41:40 +0000 (00:41 +0200)]
Style/formatting tweaks.

11 months agoAdd SubtitleAsset::ensure_font(). v1.8.69
Carl Hetherington [Thu, 11 May 2023 23:35:26 +0000 (01:35 +0200)]
Add SubtitleAsset::ensure_font().

11 months agoCleanup: ues BOOST_CHECK_EQUAL. v1.8.68
Carl Hetherington [Thu, 11 May 2023 18:06:14 +0000 (20:06 +0200)]
Cleanup: ues BOOST_CHECK_EQUAL.

11 months agoRemove some debugging prints.
Carl Hetherington [Thu, 11 May 2023 12:57:41 +0000 (14:57 +0200)]
Remove some debugging prints.

11 months agoCheck that all <Font> tags have a corresponding <LoadFont> in the verifier.
Carl Hetherington [Thu, 11 May 2023 12:47:52 +0000 (14:47 +0200)]
Check that all <Font> tags have a corresponding <LoadFont> in the verifier.

11 months agoAdd ID member to verification note.
Carl Hetherington [Thu, 11 May 2023 12:47:19 +0000 (14:47 +0200)]
Add ID member to verification note.

11 months agoGive better errors when invalid urn:uuid: strings are found (DoM #2521).
Carl Hetherington [Wed, 26 Apr 2023 14:42:43 +0000 (16:42 +0200)]
Give better errors when invalid urn:uuid: strings are found (DoM #2521).

12 months agoFix crash when trying to verify an encrypted SMPTE subtitle asset. v1.8.67
Carl Hetherington [Thu, 20 Apr 2023 12:56:30 +0000 (14:56 +0200)]
Fix crash when trying to verify an encrypted SMPTE subtitle asset.

12 months agoAdd test for too many subtitle namespaces.
Carl Hetherington [Fri, 7 Apr 2023 18:59:44 +0000 (20:59 +0200)]
Add test for too many subtitle namespaces.

12 months agoAdd missing operator case.
Carl Hetherington [Fri, 7 Apr 2023 18:59:33 +0000 (20:59 +0200)]
Add missing operator case.

12 months agoRemove xmlns:xs namespace from subtitle XML (DoM #2498).
Carl Hetherington [Thu, 6 Apr 2023 20:32:14 +0000 (22:32 +0200)]
Remove xmlns:xs namespace from subtitle XML (DoM #2498).

12 months agoFix build.
Carl Hetherington [Sun, 16 Apr 2023 21:43:21 +0000 (23:43 +0200)]
Fix build.

12 months agoCheck for tile parts being too big in the verifier (DoM #2450).
Carl Hetherington [Sun, 16 Apr 2023 21:34:42 +0000 (23:34 +0200)]
Check for tile parts being too big in the verifier (DoM #2450).

12 months agoBump openjpeg to allow higher than 250Mbit/s data rates for J2K (DoM #1665).
Carl Hetherington [Sun, 16 Apr 2023 21:34:15 +0000 (23:34 +0200)]
Bump openjpeg to allow higher than 250Mbit/s data rates for J2K (DoM #1665).

12 months agoCleanup: include ordering and white space.
Carl Hetherington [Sun, 16 Apr 2023 20:17:26 +0000 (22:17 +0200)]
Cleanup: include ordering and white space.

12 months agoUse a map and boost::any to make it a little neater to add more metadata to Verificat...
Carl Hetherington [Sat, 15 Apr 2023 20:27:01 +0000 (22:27 +0200)]
Use a map and boost::any to make it a little neater to add more metadata to VerificationNote.

12 months agoUse a shared_ptr<vector> for ArrayData rather than a shared_array.
Carl Hetherington [Sun, 16 Apr 2023 20:07:10 +0000 (22:07 +0200)]
Use a shared_ptr<vector> for ArrayData rather than a shared_array.

This is simpler and allows us to remove the hack of allocating some
"maximum" buffer for incoming JPEG2000 data.

It does mean that the buffer is zero-initialized before being written
to, but hopefully that doesn't matter too much.

12 months agoCleanup: remove a couple of unnecessary namespace qualifiers.
Carl Hetherington [Sat, 15 Apr 2023 13:42:55 +0000 (15:42 +0200)]
Cleanup: remove a couple of unnecessary namespace qualifiers.

12 months agoReplace slightly weird add_font_assets() API.
Carl Hetherington [Fri, 14 Apr 2023 14:05:59 +0000 (16:05 +0200)]
Replace slightly weird add_font_assets() API.

12 months agoCleanup: use a find_if().
Carl Hetherington [Fri, 14 Apr 2023 14:05:23 +0000 (16:05 +0200)]
Cleanup: use a find_if().

12 months agoFix resolve_fonts() if it is called twice.
Carl Hetherington [Thu, 13 Apr 2023 21:40:25 +0000 (23:40 +0200)]
Fix resolve_fonts() if it is called twice.

12 months agoAdd const version of add_font_assets().
Carl Hetherington [Thu, 13 Apr 2023 21:39:59 +0000 (23:39 +0200)]
Add const version of add_font_assets().

12 months agoAdd check for Interop font assets being present (in the ASSETMAP and on disk).
Carl Hetherington [Thu, 13 Apr 2023 21:39:40 +0000 (23:39 +0200)]
Add check for Interop font assets being present (in the ASSETMAP and on disk).

12 months agoAdd some missing full stops.
Carl Hetherington [Thu, 13 Apr 2023 21:38:01 +0000 (23:38 +0200)]
Add some missing full stops.

12 months agoAdd font assets to combined DCPs; otherwise the fonts don't show up in the ASSETMAP.
Carl Hetherington [Thu, 13 Apr 2023 21:37:29 +0000 (23:37 +0200)]
Add font assets to combined DCPs; otherwise the fonts don't show up in the ASSETMAP.

12 months agoFix typos in variable names.
Carl Hetherington [Tue, 11 Apr 2023 20:57:11 +0000 (22:57 +0200)]
Fix typos in variable names.

12 months agoFix typos in exceptions.
Carl Hetherington [Tue, 11 Apr 2023 20:56:50 +0000 (22:56 +0200)]
Fix typos in exceptions.

12 months agoFix typos in comments.
Carl Hetherington [Tue, 11 Apr 2023 20:53:05 +0000 (22:53 +0200)]
Fix typos in comments.

12 months agoClarify success message from dcpverify a little.
Carl Hetherington [Fri, 7 Apr 2023 19:09:45 +0000 (21:09 +0200)]
Clarify success message from dcpverify a little.

12 months agoAdd check for mismatch between sound asset and MainSoundConfiguration. v1.8.66
Carl Hetherington [Tue, 4 Apr 2023 21:09:29 +0000 (23:09 +0200)]
Add check for mismatch between sound asset and MainSoundConfiguration.

12 months agoAdd check for mismatched sound channel counts.
Carl Hetherington [Sun, 2 Apr 2023 21:10:39 +0000 (23:10 +0200)]
Add check for mismatched sound channel counts.

12 months agoPass MainSoundConfiguration object rather than a string.
Carl Hetherington [Sun, 2 Apr 2023 21:10:24 +0000 (23:10 +0200)]
Pass MainSoundConfiguration object rather than a string.

I guess originally it was a string mostly because it's not very well defined,
and Interop seemingly does whatever it wants.  This basic change also means
that things are checked more carefully, and so we must be more relaxed with
some things seen in the wild that I can't find contradictions for in the
standard (and also with the case of channel IDs, which does seem to be
mentioned in the standard).

12 months agoAdd some missing sound field specifiers to tests.
Carl Hetherington [Tue, 4 Apr 2023 21:05:27 +0000 (23:05 +0200)]
Add some missing sound field specifiers to tests.

13 months agoRemove now-redundant test. v1.8.65
Carl Hetherington [Mon, 20 Mar 2023 15:55:09 +0000 (16:55 +0100)]
Remove now-redundant test.

13 months agoAllow specification of channels that need a MCASubDescriptor.
Carl Hetherington [Mon, 20 Mar 2023 23:37:12 +0000 (00:37 +0100)]
Allow specification of channels that need a MCASubDescriptor.

13 months agoRemove now-presumed-wrong 2.0 MCA sound field.
Carl Hetherington [Fri, 17 Mar 2023 13:54:40 +0000 (14:54 +0100)]
Remove now-presumed-wrong 2.0 MCA sound field.

13 months agoUse an enum instead of a bool in PictureAsset::start_write().
Carl Hetherington [Fri, 17 Mar 2023 13:11:34 +0000 (14:11 +0100)]
Use an enum instead of a bool in PictureAsset::start_write().

13 months agoRemove the bools and default parameters from SoundAsset::start_write().
Carl Hetherington [Fri, 17 Mar 2023 12:33:08 +0000 (13:33 +0100)]
Remove the bools and default parameters from SoundAsset::start_write().

They were more confusing than they were worth.

13 months agoCleanup: using sorting.
Carl Hetherington [Thu, 16 Mar 2023 22:02:22 +0000 (23:02 +0100)]
Cleanup: using sorting.

13 months agoAllow writing to sound assets with int32_t as well as float.
Carl Hetherington [Thu, 16 Mar 2023 20:07:10 +0000 (21:07 +0100)]
Allow writing to sound assets with int32_t as well as float.

13 months agoSpecify number of channels in the data passed to SoundAssetWriter, and pad channels...
Carl Hetherington [Thu, 16 Mar 2023 18:51:27 +0000 (19:51 +0100)]
Specify number of channels in the data passed to SoundAssetWriter, and pad channels that aren't there.

13 months agoAdd Asset::rename_file().
Carl Hetherington [Mon, 6 Mar 2023 00:01:04 +0000 (01:01 +0100)]
Add Asset::rename_file().

13 months agoCleanup: fix indentation.
Carl Hetherington [Mon, 6 Mar 2023 00:00:28 +0000 (01:00 +0100)]
Cleanup: fix indentation.

13 months agoFix default value of include_mca_subdescriptors in dcp.h
Carl Hetherington [Sun, 5 Mar 2023 22:32:50 +0000 (23:32 +0100)]
Fix default value of include_mca_subdescriptors in dcp.h

13 months agoAdd include_mca_subdescriptors flag to SoundAsset writer. v1.8.64
Carl Hetherington [Wed, 1 Mar 2023 18:44:25 +0000 (19:44 +0100)]
Add include_mca_subdescriptors flag to SoundAsset writer.

13 months agoAdd include_mca_subdescriptors to DCP::write_xml(), passing it through to the CPL.
Carl Hetherington [Wed, 1 Mar 2023 18:41:09 +0000 (19:41 +0100)]
Add include_mca_subdescriptors to DCP::write_xml(), passing it through to the CPL.

13 months agoAdd include_mca_subdescriptors option to CPL::write_xml().
Carl Hetherington [Tue, 28 Feb 2023 13:17:04 +0000 (14:17 +0100)]
Add include_mca_subdescriptors option to CPL::write_xml().

13 months agoCleanup: extract write_mca_subdescriptors().
Carl Hetherington [Tue, 28 Feb 2023 11:08:47 +0000 (12:08 +0100)]
Cleanup: extract write_mca_subdescriptors().

13 months agoFix tests again on Windows. v1.8.63
Carl Hetherington [Mon, 27 Feb 2023 09:46:36 +0000 (10:46 +0100)]
Fix tests again on Windows.

13 months agoFix signed-ness warning on macOS.
Carl Hetherington [Mon, 27 Feb 2023 09:08:42 +0000 (10:08 +0100)]
Fix signed-ness warning on macOS.

13 months agoRemove LIBDCP_VERSION in favour of dcp::version. v1.8.62
Carl Hetherington [Sun, 26 Feb 2023 20:07:11 +0000 (21:07 +0100)]
Remove LIBDCP_VERSION in favour of dcp::version.

The former is only set at configure which is a bit confusing,
and I can't think of a reason to have both.

13 months agoFix warning.
Carl Hetherington [Sun, 26 Feb 2023 20:06:58 +0000 (21:06 +0100)]
Fix warning.

13 months agoFix tests with different library versions.
Carl Hetherington [Sun, 26 Feb 2023 19:56:34 +0000 (20:56 +0100)]
Fix tests with different library versions.

13 months agoFix test references after IssueDate change. v1.8.61
Carl Hetherington [Sun, 26 Feb 2023 10:20:02 +0000 (11:20 +0100)]
Fix test references after IssueDate change.

14 months agoBe explicit about the version of SMPTE 428-7 that is used for subtitles, 2389-vpos v1.8.60
Carl Hetherington [Sun, 11 Dec 2022 21:27:34 +0000 (22:27 +0100)]
Be explicit about the version of SMPTE 428-7 that is used for subtitles,
and default to writing the 2014 namespace.

14 months agoAllow verification of 428-7-2014 subtitles.
Carl Hetherington [Sun, 11 Dec 2022 21:26:46 +0000 (22:26 +0100)]
Allow verification of 428-7-2014 subtitles.

14 months agoUpdate comment with details about SMPTE 2010/2014 subtitle standards.
Carl Hetherington [Sun, 11 Dec 2022 19:21:37 +0000 (20:21 +0100)]
Update comment with details about SMPTE 2010/2014 subtitle standards.

14 months agoDon't crash if the descriptor's sampling rate denominator is 0.
Carl Hetherington [Fri, 17 Feb 2023 20:27:28 +0000 (21:27 +0100)]
Don't crash if the descriptor's sampling rate denominator is 0.

14 months agoFix incorrect filename encoding on Windows (DoM #2459). v1.8.59
Carl Hetherington [Fri, 17 Feb 2023 09:36:10 +0000 (10:36 +0100)]
Fix incorrect filename encoding on Windows (DoM #2459).

14 months agoChange how whitespace in subtitles is handled.
Carl Hetherington [Thu, 16 Feb 2023 20:56:22 +0000 (21:56 +0100)]
Change how whitespace in subtitles is handled.

Previously we would discard any whitespace subtitle content we found.
This had the side-effect of making a verification test fail (checking
that at least one subtitle is in each reel; blank subtitles are often
used to avoid this warning).

Here we take any subtitle content, whitespace or not, inside a
<Text> or <Image> node which I think is a little more correct.

14 months agoInterop CPLs don't have MainPictureStoredArea (#2452). v1.8.58
Carl Hetherington [Mon, 13 Feb 2023 14:17:26 +0000 (15:17 +0100)]
Interop CPLs don't have MainPictureStoredArea (#2452).

14 months agoGive a better error when a KDMFormatError is thrown (DoM #2446). v1.8.57
Carl Hetherington [Sun, 12 Feb 2023 22:09:46 +0000 (23:09 +0100)]
Give a better error when a KDMFormatError is thrown (DoM #2446).

14 months agoThrow xmlpp::internal_error also as KDMFormatError.
Carl Hetherington [Sun, 12 Feb 2023 22:09:29 +0000 (23:09 +0100)]
Throw xmlpp::internal_error also as KDMFormatError.

14 months agoAdd --no-asset-hash-check and --asset-hash-check-maximum-size (DoM #2444). v1.8.56
Carl Hetherington [Sun, 12 Feb 2023 18:38:53 +0000 (19:38 +0100)]
Add --no-asset-hash-check and --asset-hash-check-maximum-size (DoM #2444).

14 months agoTerminate dcpverify correctly when an invalid option is passed.
Carl Hetherington [Sun, 12 Feb 2023 18:37:26 +0000 (19:37 +0100)]
Terminate dcpverify correctly when an invalid option is passed.

14 months agoAdd another raw_convert().
Carl Hetherington [Sun, 12 Feb 2023 18:37:06 +0000 (19:37 +0100)]
Add another raw_convert().

14 months agoCleanup: use a local variable.
Carl Hetherington [Sun, 12 Feb 2023 14:40:07 +0000 (15:40 +0100)]
Cleanup: use a local variable.

14 months agoIn Deluxe's "Specifications for Digital Cinema Source and DCP Content Delivery" v1.8.55
Carl Hetherington [Thu, 2 Feb 2023 00:03:40 +0000 (01:03 +0100)]
In Deluxe's "Specifications for Digital Cinema Source and DCP Content Delivery"
they say that subtitle <IssueDate> must be of the form yyyy-mm-ddThh:mm:ss

They don't explain it, and the standards don't say this (as far as I can see)
but as usual their QC fails <IssueDates> that don't meet this "spec" so here
we are.

See also:
https://dcpomatic.com/forum/viewtopic.php?t=2069

14 months agoCheck IssueDate for Deluxe complaint.
Carl Hetherington [Thu, 2 Feb 2023 00:03:27 +0000 (01:03 +0100)]
Check IssueDate for Deluxe complaint.

14 months agoAdd with_timezone parameter to ::to_string().
Carl Hetherington [Thu, 2 Feb 2023 00:02:50 +0000 (01:02 +0100)]
Add with_timezone parameter to ::to_string().

14 months agoOnly write the appropriate number of AudioChannelLabelSubDescriptors (DoM #2431). v1.8.54
Carl Hetherington [Mon, 23 Jan 2023 23:54:52 +0000 (00:54 +0100)]
Only write the appropriate number of AudioChannelLabelSubDescriptors (DoM #2431).

14 months agoAdd channels parameter to simple_audio().
Carl Hetherington [Mon, 23 Jan 2023 23:54:25 +0000 (00:54 +0100)]
Add channels parameter to simple_audio().