ClairMeta points out that SMPTE subtitle MXF's ResourceID should
authorCarl Hetherington <cth@carlh.net>
Sun, 6 Jan 2019 23:02:21 +0000 (23:02 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 6 Jan 2019 23:02:21 +0000 (23:02 +0000)
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.

src/smpte_subtitle_asset.cc

index 8408a57e40217f8ecd4bacbb72ddac9855b782db..94b16d5b088f1729c2025badac1c7b54c62a677f 100644 (file)
@@ -357,7 +357,9 @@ SMPTESubtitleAsset::write (boost::filesystem::path p) const
        }
 
        descriptor.NamespaceName = "dcst";
-       memcpy (descriptor.AssetID, writer_info.AssetUUID, ASDCP::UUIDlen);
+       unsigned int c;
+       Kumu::hex2bin (_xml_id.c_str(), descriptor.AssetID, ASDCP::UUIDlen, &c);
+       DCP_ASSERT (c == Kumu::UUID_Length);
        descriptor.ContainerDuration = _intrinsic_duration;
 
        ASDCP::TimedText::MXFWriter writer;