libdcp.git
3 years agoImprove handling of image subtitle IDs in XML (DoM bug #1965) backport
Carl Hetherington [Wed, 14 Apr 2021 07:56:21 +0000 (09:56 +0200)]
Improve handling of image subtitle IDs in XML (DoM bug #1965)

When reading/writing the XML for image subtitles, we assumed that
the content of the <Image> tag is just the ID of the PNG in the MXF,
without any prefix.

DoM bug #1965 mentions a DCP where this is not the case, and SMPTE
429-5-2009 has an example where there is urn:uuid: in the XML.

This change makes DoM write this urn:uuid: prefix, and accept it if
it's present (but not complain if it's not).

If the urn:uuid: _is_ required in the field, it's a bit surprising
that nobody has complained up to this point.  Maybe nobody noticed,
or nobody reported it.

Cherry-picked from 098007a1ee6a46b6ff11398f94faff5c85951da4 in master.

3 years agoIgnore parameters in PKL type strings when checking them.
Carl Hetherington [Wed, 14 Apr 2021 10:40:01 +0000 (12:40 +0200)]
Ignore parameters in PKL type strings when checking them.

Cherry-picked from 1ffc787c6318815592e8d81c4878488eb6183ca4 in master.

3 years agoRename write_subtitle_test -> shared_subtitle_test
Carl Hetherington [Wed, 14 Apr 2021 09:28:50 +0000 (11:28 +0200)]
Rename write_subtitle_test -> shared_subtitle_test

Cherry-picked from 66566512275d363f68781b9a47ade6967d09e676 in master.

3 years agoTest reference updates.
Carl Hetherington [Fri, 16 Apr 2021 18:46:40 +0000 (20:46 +0200)]
Test reference updates.

3 years agoMove some tests from write_subtitle_test into interop_subtitle_test.
Carl Hetherington [Wed, 14 Apr 2021 09:26:08 +0000 (11:26 +0200)]
Move some tests from write_subtitle_test into interop_subtitle_test.

Cherry-picked from 39e010ee51749198528f754c89e98b6d8fb123c4 in master.

3 years agoRename read_interop_subtitle_test -> interop_subtitle_test.
Carl Hetherington [Wed, 14 Apr 2021 09:23:59 +0000 (11:23 +0200)]
Rename read_interop_subtitle_test -> interop_subtitle_test.

Cherry-picked from 72d9cb462c03b1b41380e50ab9cccf2950207c18 in master.

3 years agoMove some tests from write_subtitle_test to smpte_subtitle_test.
Carl Hetherington [Fri, 16 Apr 2021 15:45:59 +0000 (17:45 +0200)]
Move some tests from write_subtitle_test to smpte_subtitle_test.

Cherry-picked from 9e3f8bfe9e274865590d49ad1e59e82f7894a12a in master.

3 years agoMerge read_smpte_subtitle_test with smpte_subtitle_test.
Carl Hetherington [Wed, 14 Apr 2021 09:11:47 +0000 (11:11 +0200)]
Merge read_smpte_subtitle_test with smpte_subtitle_test.

Cherry-picked from 4e514f7dcc12a72bb4c78fd5067ff872ef54025b in master.

3 years agoFix erroneous reports of unresolved assets when checking OV/VF pairs. v1.6.17
Carl Hetherington [Sat, 28 Nov 2020 00:01:55 +0000 (01:01 +0100)]
Fix erroneous reports of unresolved assets when checking OV/VF pairs.

3 years agoTest churn after adding a new one. v1.6.16
Carl Hetherington [Sat, 10 Oct 2020 19:07:02 +0000 (21:07 +0200)]
Test churn after adding a new one.

3 years agoFix crash when loading DCPs whose ASSETMAP contains files that are
Carl Hetherington [Sat, 10 Oct 2020 16:58:05 +0000 (18:58 +0200)]
Fix crash when loading DCPs whose ASSETMAP contains files that are
not mentioned in any PKL (#1855).

Back-ported from 4c8cc9e99678a4095772f283ffaaa1d6bd8aaf67 in master.

4 years agoBe more cautious in CertificateChain::private_key_valid. v1.6.15
Carl Hetherington [Tue, 10 Mar 2020 21:24:46 +0000 (22:24 +0100)]
Be more cautious in CertificateChain::private_key_valid.

4 years agoAdd fix_empty_font_ids() to replace empty Font ids with a dummy string. v1.6.14
Carl Hetherington [Sun, 15 Dec 2019 21:58:21 +0000 (22:58 +0100)]
Add fix_empty_font_ids() to replace empty Font ids with a dummy string.

Back-ported from abf4f7577877254ecd7a1dc7955e0d7ca49ad07c in master.

4 years agoJust emit EmptyAssetPathError from DCP::read, not a MissingAssetError as well. v1.6.13
Carl Hetherington [Sun, 24 Nov 2019 21:31:25 +0000 (22:31 +0100)]
Just emit EmptyAssetPathError from DCP::read, not a MissingAssetError as well.

4 years agoBump asdcplib for Python 3 compatibility in the build system. v1.6.12
Carl Hetherington [Sun, 17 Nov 2019 10:45:05 +0000 (11:45 +0100)]
Bump asdcplib for Python 3 compatibility in the build system.

4 years agoAllow DCP reading to continue even with empty <Path> nodes in ASSETMAP. v1.6.11
Carl Hetherington [Fri, 30 Aug 2019 21:28:06 +0000 (22:28 +0100)]
Allow DCP reading to continue even with empty <Path> nodes in ASSETMAP.

4 years agoFix incorrect LocalTime strings when timezone is behind UTC and not an integer number... v1.6.10
Carl Hetherington [Fri, 8 Nov 2019 22:48:42 +0000 (23:48 +0100)]
Fix incorrect LocalTime strings when timezone is behind UTC and not an integer number of hours.

4 years agoFix enum confusion.
Carl Hetherington [Wed, 9 Oct 2019 22:57:13 +0000 (00:57 +0200)]
Fix enum confusion.

4 years agoFix unit tests after CPL root namespace fix. v1.6.9
Carl Hetherington [Tue, 1 Oct 2019 20:56:54 +0000 (22:56 +0200)]
Fix unit tests after CPL root namespace fix.

4 years agoReject certificate chains where the adjacent certificates have the same subject.
Carl Hetherington [Wed, 26 Jun 2019 14:54:09 +0000 (15:54 +0100)]
Reject certificate chains where the adjacent certificates have the same subject.

This is a backport of 31f31800705880da6ec185f9b31c7e125ae18c38 from master.

4 years agoIn 8c852cb the CPL root attribute "dsig" was removed (to prevent
Carl Hetherington [Thu, 5 Sep 2019 00:51:11 +0000 (01:51 +0100)]
In 8c852cb the CPL root attribute "dsig" was removed (to prevent
'XML root element can contain only one namespace' errors)

In a266fc2 [Sony digest validation fix] this was (for some
unknown reason) re-added, which makes the root element bug recur.

This commit removes that namespace again.

It's a shame there was no unit test to pick this regression up.

4 years agoIncrease header size when writing SMPTE subtitle MXFs; fixes problems when writing... v1.6.8
Carl Hetherington [Tue, 21 May 2019 20:23:55 +0000 (21:23 +0100)]
Increase header size when writing SMPTE subtitle MXFs; fixes problems when writing lots of subs (DCP-o-matic bug #1561).

This is a backport of b7c7e14463d91608b080a5a63fcfb4d330ced863 from master.

5 years agoThrow a different exception when an unrecognised LabelSetType is found. v1.6.7
Carl Hetherington [Thu, 25 Apr 2019 15:46:14 +0000 (15:46 +0000)]
Throw a different exception when an unrecognised LabelSetType is found.

5 years agoAdd EPISODE and PROMO content types. v1.6.6
Carl Hetherington [Fri, 29 Mar 2019 14:35:02 +0000 (14:35 +0000)]
Add EPISODE and PROMO content types.

5 years agoFix incorrect dcpinfo output for sound assets.
Carl Hetherington [Fri, 22 Mar 2019 12:51:12 +0000 (12:51 +0000)]
Fix incorrect dcpinfo output for sound assets.

5 years agoCheck that all image data is present after loading a SMPTE subtitle asset. v1.6.5
Carl Hetherington [Fri, 15 Mar 2019 23:16:00 +0000 (23:16 +0000)]
Check that all image data is present after loading a SMPTE subtitle asset.

If we load SMPTE subtitles from a XML file try to load PNG data
from the same directory; this feels like a hack.

5 years agoTweak link flags. v1.6.4
Carl Hetherington [Tue, 12 Mar 2019 12:08:17 +0000 (12:08 +0000)]
Tweak link flags.

5 years agoAnd corresponding test updates.
Carl Hetherington [Tue, 12 Mar 2019 12:05:37 +0000 (12:05 +0000)]
And corresponding test updates.

5 years agoMore insulation against libdcp version updates.
Carl Hetherington [Tue, 12 Mar 2019 12:03:45 +0000 (12:03 +0000)]
More insulation against libdcp version updates.

5 years agoTry to fix libdcp static build.
Carl Hetherington [Tue, 12 Mar 2019 11:58:21 +0000 (11:58 +0000)]
Try to fix libdcp static build.

5 years agoUpdate tests for previous.
Carl Hetherington [Tue, 12 Mar 2019 11:53:04 +0000 (11:53 +0000)]
Update tests for previous.

5 years agoStop test output depending on libdcp version.
Carl Hetherington [Tue, 12 Mar 2019 11:52:43 +0000 (11:52 +0000)]
Stop test output depending on libdcp version.

5 years agoFix gcov shlib build; this fixes tests to run against the locally-built libdcp rather...
Carl Hetherington [Tue, 12 Mar 2019 11:49:50 +0000 (11:49 +0000)]
Fix gcov shlib build; this fixes tests to run against the locally-built libdcp rather than the installed one.

5 years agoFix string decoding; bump libcxml version. v1.6.3
Carl Hetherington [Tue, 12 Mar 2019 00:35:15 +0000 (00:35 +0000)]
Fix string decoding; bump libcxml version.

5 years agoBump wscript required version of libcxml. v1.6.2
Carl Hetherington [Mon, 11 Mar 2019 23:55:15 +0000 (23:55 +0000)]
Bump wscript required version of libcxml.

5 years agoBump libcxml to a release version.
Carl Hetherington [Mon, 11 Mar 2019 23:53:31 +0000 (23:53 +0000)]
Bump libcxml to a release version.

5 years agoUpdate for changes to video MXF headers.
Carl Hetherington [Mon, 4 Feb 2019 12:47:10 +0000 (12:47 +0000)]
Update for changes to video MXF headers.

5 years agoBump asdcplib for fix to DoM bug #1325.
Carl Hetherington [Thu, 31 Jan 2019 23:34:16 +0000 (23:34 +0000)]
Bump asdcplib for fix to DoM bug #1325.

5 years agoCheck return value of fread in File::File.
Carl Hetherington [Thu, 24 Jan 2019 22:21:02 +0000 (22:21 +0000)]
Check return value of fread in File::File.

5 years agoFix test references now that we indent things.
Carl Hetherington [Thu, 24 Jan 2019 17:36:22 +0000 (17:36 +0000)]
Fix test references now that we indent things.

5 years agoSlightly hacky but hopefully functional fix for KDMs after the changes
Carl Hetherington [Thu, 24 Jan 2019 17:34:37 +0000 (17:34 +0000)]
Slightly hacky but hopefully functional fix for KDMs after the changes
to signer.  The KDM stuff uses add_signature_value() but not sign()
since it has to allow pass-through of a KDM (so it handles <Signature> etc.
itself).  This means we have to make the indentation-adding optional.

It might have been nicer to make indent() not add indentation if it's
not already there.

5 years agoRemove sign test tool.
Carl Hetherington [Thu, 24 Jan 2019 02:21:10 +0000 (02:21 +0000)]
Remove sign test tool.

5 years agoFully indent PKL/CPL.
Carl Hetherington [Tue, 22 Jan 2019 00:40:16 +0000 (00:40 +0000)]
Fully indent PKL/CPL.

5 years agoAttempt to fix Sony digest validation by indenting the <Signer>
Carl Hetherington [Sun, 20 Jan 2019 20:26:41 +0000 (20:26 +0000)]
Attempt to fix Sony digest validation by indenting the <Signer>
and <Signature> before signing.  This is in the belief that, perhaps,
the Sony software "reformats" the XML before checking that the signature
is correct (or something).

5 years agoReveal path in MissingAssetError.
Carl Hetherington [Tue, 22 Jan 2019 15:45:48 +0000 (15:45 +0000)]
Reveal path in MissingAssetError.

5 years agoMissing include for arch.
Carl Hetherington [Thu, 17 Jan 2019 20:18:40 +0000 (20:18 +0000)]
Missing include for arch.

5 years agoUpdate waf and bump libcxml for similar updates.
Carl Hetherington [Thu, 17 Jan 2019 19:39:48 +0000 (19:39 +0000)]
Update waf and bump libcxml for similar updates.

5 years agoBump openjpeg2-cdist for debugging code.
Carl Hetherington [Tue, 15 Jan 2019 16:57:29 +0000 (16:57 +0000)]
Bump openjpeg2-cdist for debugging code.

5 years agoMerge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcp
Carl Hetherington [Mon, 14 Jan 2019 15:47:35 +0000 (15:47 +0000)]
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcp

5 years agoTidy repeated call of make_uuid() and don't put urn:uuid: in front of default content...
Carl Hetherington [Mon, 14 Jan 2019 15:30:55 +0000 (15:30 +0000)]
Tidy repeated call of make_uuid() and don't put urn:uuid: in front of default content version label text as it's a bit confusing.

5 years agoSpeculative removal of call to xmlSecKeySetName when signing, on
Carl Hetherington [Mon, 14 Jan 2019 15:32:58 +0000 (15:32 +0000)]
Speculative removal of call to xmlSecKeySetName when signing, on
the basis that I can't see what it's for and opendcp doesn't
do it.  Chasing Sony no-validate bug.

5 years agoMove verify API away from strings towards error codes.
Carl Hetherington [Sat, 12 Jan 2019 23:12:46 +0000 (23:12 +0000)]
Move verify API away from strings towards error codes.

5 years agoFix crash with insufficient parameters to libdcp.
Carl Hetherington [Thu, 10 Jan 2019 13:35:47 +0000 (13:35 +0000)]
Fix crash with insufficient parameters to libdcp.

5 years agoFix incorrect XML namespace in MXF header; I was using the prefix
Carl Hetherington [Tue, 8 Jan 2019 09:58:56 +0000 (09:58 +0000)]
Fix incorrect XML namespace in MXF header; I was using the prefix
instead of the namespace URI for what asdcplib calls
TimedTextDescriptor::NamespaceName.

Thanks to clairmeta; see https://github.com/Ymagis/ClairMeta/issues/72

5 years agoClairMeta points out that SMPTE subtitle MXF's ResourceID should
Carl Hetherington [Sun, 6 Jan 2019 23:02:21 +0000 (23:02 +0000)]
ClairMeta points out that SMPTE subtitle MXF's ResourceID should
be the same as the internal XML ID.  This in turn must be different
from the MXF's UUID.

I *think* that we have:

AssetUUID: MXF's UUID, which must be different; written from
the WriterInfo (set up by fill_writer_info, which is passed _id)

AssetID: MXF's ResourceID, which must be the _xml_id; written from
the TimedTextDescriptor.

I believe that this patch fixes the ResourceID to be the XML ID (as
required) without undoing the Doremi fix whereby the MXF UUID must
be different to the XML ID.

This patch quells ClairMeta's error.

5 years agoMore DCP verification detail and testing.
Carl Hetherington [Sun, 6 Jan 2019 19:30:00 +0000 (19:30 +0000)]
More DCP verification detail and testing.

5 years agoTidy up a bit.
Carl Hetherington [Sun, 6 Jan 2019 02:34:47 +0000 (02:34 +0000)]
Tidy up a bit.

5 years agoTidy up and slightly extend verify tests.
Carl Hetherington [Sun, 6 Jan 2019 02:10:56 +0000 (02:10 +0000)]
Tidy up and slightly extend verify tests.

5 years agoFix tests following additional verify check.
Carl Hetherington [Sun, 6 Jan 2019 01:37:20 +0000 (01:37 +0000)]
Fix tests following additional verify check.

5 years agoCheck CPL hash in the PKL on verify.
Carl Hetherington [Sun, 6 Jan 2019 01:02:38 +0000 (01:02 +0000)]
Check CPL hash in the PKL on verify.

5 years agoMerge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcp
Carl Hetherington [Sun, 6 Jan 2019 00:20:01 +0000 (00:20 +0000)]
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcp

5 years agoVery simple dcpverify.
Carl Hetherington [Sun, 6 Jan 2019 00:19:52 +0000 (00:19 +0000)]
Very simple dcpverify.

5 years agoFix some warnings.
Carl Hetherington [Sat, 29 Dec 2018 13:03:24 +0000 (13:03 +0000)]
Fix some warnings.

5 years agoAdd duration as H:M:S:F.
Carl Hetherington [Wed, 12 Dec 2018 21:26:42 +0000 (21:26 +0000)]
Add duration as H:M:S:F.

5 years agoSimpole DCP recovery utility (dcprecover) added.
Carl Hetherington [Wed, 14 Nov 2018 01:23:25 +0000 (01:23 +0000)]
Simpole DCP recovery utility (dcprecover) added.

5 years agoTake thumbprint rather than a full dcp::Certificate for trusted devices.
Carl Hetherington [Thu, 8 Nov 2018 23:56:52 +0000 (23:56 +0000)]
Take thumbprint rather than a full dcp::Certificate for trusted devices.

5 years agoSlightly nicer error handling.
Carl Hetherington [Thu, 8 Nov 2018 21:57:56 +0000 (21:57 +0000)]
Slightly nicer error handling.

5 years agoRename dcpsignerthumb -> dcpthumb.
Carl Hetherington [Thu, 8 Nov 2018 19:35:37 +0000 (19:35 +0000)]
Rename dcpsignerthumb -> dcpthumb.

5 years agoMore raw/locale_convert.
Carl Hetherington [Tue, 9 Oct 2018 18:20:01 +0000 (19:20 +0100)]
More raw/locale_convert.

5 years agoMerge branch 'master' of ssh://main.carlh.net/home/carl/git/libdcp
Carl Hetherington [Tue, 9 Oct 2018 13:53:14 +0000 (14:53 +0100)]
Merge branch 'master' of ssh://main.carlh.net/home/carl/git/libdcp

5 years agoMore _convert functions.
Carl Hetherington [Tue, 9 Oct 2018 13:53:10 +0000 (14:53 +0100)]
More _convert functions.

5 years agoMove some methods to where they make more sense.
Carl Hetherington [Fri, 28 Sep 2018 23:10:17 +0000 (00:10 +0100)]
Move some methods to where they make more sense.

5 years agoCope with multiple PKLs in a DCP.
Carl Hetherington [Tue, 25 Sep 2018 08:41:32 +0000 (09:41 +0100)]
Cope with multiple PKLs in a DCP.

5 years agoID churn.
Carl Hetherington [Tue, 25 Sep 2018 08:41:16 +0000 (09:41 +0100)]
ID churn.

5 years agoMerge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcp
Carl Hetherington [Sun, 23 Sep 2018 23:45:27 +0000 (00:45 +0100)]
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcp

5 years agoAdd missing constructor call.
Carl Hetherington [Sun, 23 Sep 2018 23:44:50 +0000 (00:44 +0100)]
Add missing constructor call.

5 years agoFix build with newer boost.
Carl Hetherington [Sat, 22 Sep 2018 16:03:29 +0000 (17:03 +0100)]
Fix build with newer boost.

5 years agoThrow a better error on bad content kind.
Carl Hetherington [Tue, 18 Sep 2018 19:25:21 +0000 (20:25 +0100)]
Throw a better error on bad content kind.

5 years agoAdd operator< for LocalTime.
Carl Hetherington [Fri, 14 Sep 2018 20:21:47 +0000 (21:21 +0100)]
Add operator< for LocalTime.

5 years agoBump waf.
Carl Hetherington [Mon, 10 Sep 2018 22:09:57 +0000 (23:09 +0100)]
Bump waf.

5 years agoBump libcxml for waf upgrade.
Carl Hetherington [Mon, 10 Sep 2018 21:23:33 +0000 (22:23 +0100)]
Bump libcxml for waf upgrade.

5 years agoBump libcxml.
Carl Hetherington [Mon, 10 Sep 2018 21:15:11 +0000 (22:15 +0100)]
Bump libcxml.

5 years agoFix missing version string when Popen communicate returns byte strings.
Carl Hetherington [Mon, 10 Sep 2018 20:30:36 +0000 (21:30 +0100)]
Fix missing version string when Popen communicate returns byte strings.

5 years agoSilence warnings from asdcplib when testing a MXF file for validity.
Carl Hetherington [Fri, 7 Sep 2018 12:03:07 +0000 (13:03 +0100)]
Silence warnings from asdcplib when testing a MXF file for validity.

5 years agoHopefully-correct PKL and AssetMap when using Interop PNG subtitles.
Carl Hetherington [Sun, 2 Sep 2018 22:39:01 +0000 (23:39 +0100)]
Hopefully-correct PKL and AssetMap when using Interop PNG subtitles.

5 years agoMerge branch 'master' of ssh://main.carlh.net/home/carl/git/libdcp
Carl Hetherington [Wed, 29 Aug 2018 10:55:18 +0000 (11:55 +0100)]
Merge branch 'master' of ssh://main.carlh.net/home/carl/git/libdcp

5 years agoAllow CCAP reel nodes to have language tags.
Carl Hetherington [Wed, 29 Aug 2018 10:55:10 +0000 (11:55 +0100)]
Allow CCAP reel nodes to have language tags.

5 years agoMissing initialisattion of DCPReadError::_message.
Carl Hetherington [Tue, 28 Aug 2018 20:48:30 +0000 (21:48 +0100)]
Missing initialisattion of DCPReadError::_message.

5 years agoSupport more than one closed caption asset per reel.
Carl Hetherington [Wed, 22 Aug 2018 15:11:46 +0000 (16:11 +0100)]
Support more than one closed caption asset per reel.

5 years agoMissing test files.
Carl Hetherington [Sat, 18 Aug 2018 14:45:44 +0000 (15:45 +0100)]
Missing test files.

5 years agoMissing header include.
Carl Hetherington [Fri, 17 Aug 2018 12:43:34 +0000 (13:43 +0100)]
Missing header include.

5 years agoThrow an exception on an unknown asset type. pkl
Carl Hetherington [Fri, 17 Aug 2018 08:40:16 +0000 (09:40 +0100)]
Throw an exception on an unknown asset type.

5 years agoUnexplained ID churn.
Carl Hetherington [Fri, 17 Aug 2018 01:15:32 +0000 (02:15 +0100)]
Unexplained ID churn.

5 years agoAdjust for Interop <PackingList> not needing content.
Carl Hetherington [Fri, 17 Aug 2018 01:15:02 +0000 (02:15 +0100)]
Adjust for Interop <PackingList> not needing content.

5 years agoRemove debug.
Carl Hetherington [Fri, 17 Aug 2018 00:50:31 +0000 (01:50 +0100)]
Remove debug.

5 years agoUse PKL types rather than file extensions.
Carl Hetherington [Fri, 17 Aug 2018 00:39:45 +0000 (01:39 +0100)]
Use PKL types rather than file extensions.

5 years agoRemoved unused variables.
Carl Hetherington [Thu, 16 Aug 2018 23:49:56 +0000 (00:49 +0100)]
Removed unused variables.

5 years agoUse PKL when verifying DCPs.
Carl Hetherington [Thu, 16 Aug 2018 23:45:59 +0000 (00:45 +0100)]
Use PKL when verifying DCPs.

5 years agoRead PKL when reading DCP.
Carl Hetherington [Fri, 20 Apr 2018 22:41:21 +0000 (23:41 +0100)]
Read PKL when reading DCP.

5 years agoMerge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcp
Carl Hetherington [Thu, 16 Aug 2018 22:33:22 +0000 (23:33 +0100)]
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/libdcp