Use optional for ReelAsset _annotation_text. v1.8.6
authorCarl Hetherington <cth@carlh.net>
Mon, 17 Jan 2022 17:45:19 +0000 (18:45 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 17 Jan 2022 19:16:52 +0000 (20:16 +0100)
Not only is this tag optional in Interop and SMPTE, but it would
appear that if it is present but empty a DCP will not play back
on Sony SRX320 / LMT3000 systems (DoM bug #2124).

Here we use optional<>, as seems to make sense, and also refuse
to write empty tags (instead omitting the tag entirely).

23 files changed:
src/reel_asset.cc
src/reel_asset.h
test/reel_asset_test.cc
test/ref/DCP/dcp_test1/ASSETMAP.xml
test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
test/ref/DCP/dcp_test1/pkl_6af1e0c1-c441-47f8-a502-3efd46b1fa4f.xml
test/ref/DCP/dcp_test2/ASSETMAP.xml
test/ref/DCP/dcp_test2/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
test/ref/DCP/dcp_test2/pkl_6af1e0c1-c441-47f8-a502-3efd46b1fa4f.xml
test/ref/DCP/dcp_test5/ASSETMAP.xml
test/ref/DCP/dcp_test5/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
test/ref/DCP/dcp_test5/pkl_5d51e8a1-b2a5-4da6-9b66-4615c3609440.xml
test/ref/DCP/dcp_test7/ASSETMAP
test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
test/ref/DCP/dcp_test7/pkl_6af1e0c1-c441-47f8-a502-3efd46b1fa4f.xml
test/ref/DCP/encryption_test/ASSETMAP.xml
test/ref/DCP/encryption_test/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
test/ref/DCP/encryption_test/pkl_8ee8f7da-8da2-4adb-ae0e-31e8f4b91900.xml
test/ref/cpl_metadata_test1.xml
test/ref/cpl_metadata_test2.xml
test/ref/write_interop_subtitle_test3/ASSETMAP
test/ref/write_interop_subtitle_test3/pkl_e94b8a0d-27f7-408a-af16-78d3df419a91.xml
test/verify_test.cc

index d233ee649ee20a7e8e598e69940bb15491586d8b..f9742628843446ee28668ac2c68e1b7bcf38ae87 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2022 Carl Hetherington <cth@carlh.net>
 
     This file is part of libdcp.
 
@@ -72,7 +72,7 @@ ReelAsset::ReelAsset (shared_ptr<const cxml::Node> node)
        : Object (remove_urn_uuid (node->string_child ("Id")))
        , _intrinsic_duration (node->number_child<int64_t> ("IntrinsicDuration"))
        , _duration (node->optional_number_child<int64_t>("Duration"))
-       , _annotation_text (node->optional_string_child ("AnnotationText").get_value_or (""))
+       , _annotation_text (node->optional_string_child("AnnotationText"))
        , _edit_rate (Fraction (node->string_child ("EditRate")))
        , _entry_point (node->optional_number_child<int64_t>("EntryPoint"))
 {
@@ -93,7 +93,10 @@ ReelAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
                a->set_namespace_declaration (ns.first, ns.second);
        }
        a->add_child("Id")->add_child_text ("urn:uuid:" + _id);
-       a->add_child("AnnotationText")->add_child_text (_annotation_text);
+       /* Empty <AnnotationText> tags cause refusal to play on some Sony SRX320 / LMT3000 systems (DoM bug #2124) */
+       if (_annotation_text && !_annotation_text->empty()) {
+               a->add_child("AnnotationText")->add_child_text(*_annotation_text);
+       }
        a->add_child("EditRate")->add_child_text (_edit_rate.as_string());
        a->add_child("IntrinsicDuration")->add_child_text (raw_convert<string> (_intrinsic_duration));
        if (_entry_point) {
@@ -124,7 +127,7 @@ bool
 ReelAsset::asset_equals (shared_ptr<const ReelAsset> other, EqualityOptions opt, NoteHandler note) const
 {
        if (_annotation_text != other->_annotation_text) {
-               string const s = "Reel: annotation texts differ (" + _annotation_text + " vs " + other->_annotation_text + ")\n";
+               string const s = "Reel: annotation texts differ (" + _annotation_text.get_value_or("") + " vs " + other->_annotation_text.get_value_or("") + ")\n";
                if (!opt.reel_annotation_texts_can_differ) {
                        note (NoteType::ERROR, s);
                        return false;
index ab06434ebe5f2f14774def1dc267e4afad623128..200c49ffdaad096b6435db9b466b3c2b45b2e4dd 100644 (file)
@@ -120,7 +120,7 @@ public:
        /** @return <Duration>, or <IntrinsicDuration> - <EntryPoint> if <Duration> is not present */
        int64_t actual_duration () const;
 
-       std::string annotation_text () const {
+       boost::optional<std::string> annotation_text () const {
                return _annotation_text;
        }
 
@@ -128,6 +128,10 @@ public:
                _annotation_text = at;
        }
 
+       void unset_annotation_text () {
+               _annotation_text = boost::none;
+       }
+
        bool asset_equals (std::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const;
 
 protected:
@@ -147,7 +151,7 @@ protected:
        boost::optional<int64_t> _duration;    ///< The &lt;Duration&gt; from the reel's entry for this asset, if present
 
 private:
-       std::string _annotation_text;          ///< The &lt;AnnotationText&gt; from the reel's entry for this asset
+       boost::optional<std::string> _annotation_text; ///< The &lt;AnnotationText&gt; from the reel's entry for this asset
        Fraction _edit_rate;                   ///< The &lt;EditRate&gt; from the reel's entry for this asset
        boost::optional<int64_t> _entry_point; ///< The &lt;EntryPoint&gt; from the reel's entry for this asset
 };
index 94f9c2653927f2ade7fbb52e28708cb5f5f1972e..9dd2f8c3fa10fce4cb59f66f4263ef707e186384 100644 (file)
@@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE (reel_picture_asset_test)
 
        dcp::ReelMonoPictureAsset pa (doc);
        BOOST_CHECK_EQUAL (pa.id(), "06ac1ca7-9c46-4107-8864-a6448e24b04b");
-       BOOST_CHECK_EQUAL (pa.annotation_text(), "Hello world!");
+       BOOST_CHECK_EQUAL (pa.annotation_text().get_value_or(""), "Hello world!");
        BOOST_CHECK_EQUAL (pa.edit_rate(), dcp::Fraction(24, 1));
        BOOST_CHECK_EQUAL (pa.intrinsic_duration(), 187048);
        BOOST_CHECK_EQUAL (pa.entry_point().get(), 42L);
@@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE (reel_smpte_subtitle_asset_test)
 
        dcp::ReelSMPTESubtitleAsset ps (doc);
        BOOST_CHECK_EQUAL (ps.id(), "8bca1489-aab1-9259-a4fd-8150abc1de12");
-       BOOST_CHECK_EQUAL (ps.annotation_text(), "Goodbye world!");
+       BOOST_CHECK_EQUAL (ps.annotation_text().get_value_or(""), "Goodbye world!");
        BOOST_CHECK_EQUAL (ps.edit_rate(), dcp::Fraction(25, 1));
        BOOST_CHECK_EQUAL (ps.intrinsic_duration(), 1870);
        BOOST_CHECK_EQUAL (ps.entry_point().get(), 0L);
index 10083febd6912ddeb0eed7dbf5e96644f3e8fb25..ee780c7c121c3fd0be8286773c41e7b6d097abf5 100644 (file)
@@ -26,7 +26,7 @@
           <Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
           <VolumeIndex>1</VolumeIndex>
           <Offset>0</Offset>
-          <Length>8762</Length>
+          <Length>8630</Length>
         </Chunk>
       </ChunkList>
     </Asset>
index ae0f23be58b644e5aec340a358c32d12e3ff0004..01eea88d3fcb85c33b648295d10aae23db999b8c 100644 (file)
@@ -18,7 +18,6 @@
       <AssetList>
         <MainMarkers>
           <Id>urn:uuid:93182bd2-b1e8-41a3-b5c8-6e6564273bff</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
@@ -36,7 +35,6 @@
         </MainMarkers>
         <MainPicture>
           <Id>urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
@@ -47,7 +45,6 @@
         </MainPicture>
         <MainSound>
           <Id>urn:uuid:8b92bcee-62fc-4a33-a51a-816e9611ce85</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
index 3f285d2364301cdf56e42fbab11d8e69fa7f0c67..cf75357430eea2caa2ae877751e6aee1863b71be 100644 (file)
@@ -9,8 +9,8 @@
     <Asset>
       <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
       <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
-      <Hash>c1DRq6GaSzV2brF0YnSNed46nqk=</Hash>
-      <Size>8762</Size>
+      <Hash>6pkiSEIBuZW7KEY73GrNNw8UjDE=</Hash>
+      <Size>8630</Size>
       <Type>text/xml</Type>
     </Asset>
     <Asset>
index 61cf5d218c0a25f4702b8e40cf3a415a455be205..23390415593494417831b385ab8d6f0151df91c0 100644 (file)
@@ -26,7 +26,7 @@
           <Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
           <VolumeIndex>1</VolumeIndex>
           <Offset>0</Offset>
-          <Length>1774</Length>
+          <Length>1686</Length>
         </Chunk>
       </ChunkList>
     </Asset>
index 6e5fab7336d64fd331f54edea7d0afca2557db15..3910dcd3c05ce1a8bcc38b629de72a28cc336c9a 100644 (file)
@@ -18,7 +18,6 @@
       <AssetList>
         <MainSound>
           <Id>urn:uuid:77e1fb48-ce0c-4d29-bf88-8c3bfec8013a</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
@@ -27,7 +26,6 @@
         </MainSound>
         <msp-cpl:MainStereoscopicPicture xmlns:msp-cpl="http://www.smpte-ra.org/schemas/429-10/2008/Main-Stereo-Picture-CPL">
           <Id>urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
index a37a062ad617d8baed322774199b91f98ae8d885..abfd510031eda5a44b8038c66ba586d89dc3fc85 100644 (file)
@@ -9,8 +9,8 @@
     <Asset>
       <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
       <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
-      <Hash>Q9GRM2MtKZAg5FEIEkRsL28rNeQ=</Hash>
-      <Size>1774</Size>
+      <Hash>9JCFUMDcUujOZxSqSig3u/5wIuI=</Hash>
+      <Size>1686</Size>
       <Type>text/xml</Type>
     </Asset>
     <Asset>
index 3f5d9076562792f58ae504b950c0063d6f72e2bd..fb9f897a194be86c447141890e595b9c611807fc 100644 (file)
@@ -26,7 +26,7 @@
           <Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
           <VolumeIndex>1</VolumeIndex>
           <Offset>0</Offset>
-          <Length>2156</Length>
+          <Length>2024</Length>
         </Chunk>
       </ChunkList>
     </Asset>
index a7a1441ef84892437b1d1b6f93e50241c08e3f49..69558723fa9280c45c85bc20af71476520b07afd 100644 (file)
@@ -18,7 +18,6 @@
       <AssetList>
         <MainPicture>
           <Id>urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
@@ -29,7 +28,6 @@
         </MainPicture>
         <MainSound>
           <Id>urn:uuid:8b92bcee-62fc-4a33-a51a-816e9611ce85</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
@@ -38,7 +36,6 @@
         </MainSound>
         <axd:AuxData xmlns:axd="http://www.dolby.com/schemas/2012/AD">
           <Id>urn:uuid:b68febcc-5ddf-489a-84a7-924f29fa2afd</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>1489</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
index 6f7974a49e8f27336f73cb7d631711c749e875ca..0ae84d3da3522a4499bdec488e7b156aff13bb09 100644 (file)
@@ -9,8 +9,8 @@
     <Asset>
       <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
       <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
-      <Hash>kvvGY8+ZNsyJyWk6i5Ha1dRpFQU=</Hash>
-      <Size>2156</Size>
+      <Hash>+a4c/A2gZJW4rVH5BZ7jbb6qXkc=</Hash>
+      <Size>2024</Size>
       <Type>text/xml</Type>
     </Asset>
     <Asset>
index f82ce56f3dd1dc9435a1f548edb0592a5c7f5795..71873d992c4a2436982ebdf07606b14a20daf619 100644 (file)
@@ -26,7 +26,7 @@
           <Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
           <VolumeIndex>1</VolumeIndex>
           <Offset>0</Offset>
-          <Length>2168</Length>
+          <Length>2036</Length>
         </Chunk>
       </ChunkList>
     </Asset>
index d3589fc585a80849973fb44a9f0e1897234a8a9b..89f6851d6fa855d93027a17f9ab36fa82a3289df 100644 (file)
@@ -18,7 +18,6 @@
       <AssetList>
         <MainMarkers>
           <Id>urn:uuid:93182bd2-b1e8-41a3-b5c8-6e6564273bff</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
@@ -36,7 +35,6 @@
         </MainMarkers>
         <MainPicture>
           <Id>urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
@@ -47,7 +45,6 @@
         </MainPicture>
         <MainSound>
           <Id>urn:uuid:8b92bcee-62fc-4a33-a51a-816e9611ce85</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
index a2c83a0e0fbb38927f4dbadc7c0b447a71db6936..6d529422b7a3fa8b09697d827d3c859bf40caca7 100644 (file)
@@ -9,8 +9,8 @@
     <Asset>
       <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
       <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
-      <Hash>LE8AZqXvZYb8W6QjVZiN7zB8Tro=</Hash>
-      <Size>2168</Size>
+      <Hash>qD31AlG29UXWwTGYch5P+zuD3xc=</Hash>
+      <Size>2036</Size>
       <Type>text/xml;asdcpKind=CPL</Type>
     </Asset>
     <Asset>
index 3c1ca16c5a6268cb8721137b24262d136bcb2c9b..71fa54ac57b88e0251a1addaa2357cb5b5afa986 100644 (file)
@@ -26,7 +26,7 @@
           <Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
           <VolumeIndex>1</VolumeIndex>
           <Offset>0</Offset>
-          <Length>9314</Length>
+          <Length>9226</Length>
         </Chunk>
       </ChunkList>
     </Asset>
index 598444b48a59ac70a5a5a2b85dcf74296f89bef1..2866df6d44a04ab12542d58dc70f5cd1b1da9ef4 100644 (file)
@@ -18,7 +18,6 @@
       <AssetList>
         <MainPicture>
           <Id>urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
@@ -30,7 +29,6 @@
         </MainPicture>
         <MainSound>
           <Id>urn:uuid:11471a77-7cd8-4de6-8c11-beaa198c015f</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
           <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
-        <dsig:DigestValue>G/4l/FrHjANRjHMvx1wwtojaqXY=</dsig:DigestValue>
+        <dsig:DigestValue>4/8QgoO0blTh31eQ8ubu1zkECYc=</dsig:DigestValue>
       </dsig:Reference>
     </dsig:SignedInfo>
-    <dsig:SignatureValue>tLWdo5wkG1aseboTfSONMMYLEnd89Wqcjw0Gwhw71wX/lEKEGYiCluUchInurc6J
-+Lq7rgNz+SPg7XIgh1N58EHqEarwH6oFTf2ZFMtoEzmX1nXcjKR7MRYomMtCBb/V
-g+LOpPuOY+36bQ/8XBYiH8t1w6ayNSLI0LGTuAfJDz+/L6wAGRSLosQgVThjz3bE
-nnl9V96ufU3vMPcrq2YpT99Rb61gX3ItBKW60FiTX+NB5vBwQ1lq4vJ6qno4aviE
-HEebN6byReZtqm+X6/olVvVHJBAyOG1ZKOb9Oj6I2Iw4hx0OYB70Tg7Qkx+f8zsl
-HHXyc9gA+KzKStrrm390oA==</dsig:SignatureValue>
+    <dsig:SignatureValue>jHGd0G9X7iT26LNertFIPsKGIVUxUNEZWSDmjzYH4QwP2SAYOMh/tGXAaUQyy2vA
++qCj+OQavpBS8q1HMekyUrShRo18XY6mpS3lSADdZBY7TLExCdkLtSq7yoPVfzx+
++iRypVIKBl6xbv9wf/ssCzpxXMbsuaL5BGbOdRlgH7FFdQN5GKbAWVYoCmPHcl+q
+S2BLqXN1S9LjB4zQ606bVq2C4S7mUYqAFZ0a9w/MK1RU5kFRJfq7W2ZktvhIWrFI
+K6iF4XGhwoCURfPKP9piAwrpR+5sI7LuknMLa/JHPYzkBCH63oZoNW8vHyzCBNpR
+ADgG10jZGAXp+GY0BL8v2w==</dsig:SignatureValue>
     <dsig:KeyInfo>
       <dsig:X509Data>
         <dsig:X509IssuerSerial>
index ecacaac5ea5893b045bddad8b426d31a5538bb44..b97d6eaf6f8f90d1ba000277d31b94d30b7cbc52 100644 (file)
@@ -9,8 +9,8 @@
     <Asset>
       <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
       <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
-      <Hash>iBE1dh+gKFCi7R93mx2AoJ1eaek=</Hash>
-      <Size>9314</Size>
+      <Hash>zk4L2kXj9llDdjmxCW2d2X06VQM=</Hash>
+      <Size>9226</Size>
       <Type>text/xml</Type>
     </Asset>
     <Asset>
           <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
-        <dsig:DigestValue>iFEJZ3tiVaiuJMzVY/ju8qx+KV0=</dsig:DigestValue>
+        <dsig:DigestValue>xzO3cFwUX87TL4rL9jq6CLqDN6I=</dsig:DigestValue>
       </dsig:Reference>
     </dsig:SignedInfo>
-    <dsig:SignatureValue>GKFnAkzVuhXi391uAz5kRTmKaJKMKd3iAe1XtYsUoRfhVxtQCv/hha/W8xpVsP2J
-g/duTyASL/T4vdaQsrR8K3JUwP/r/gWlN3UfcFIORHkKeJ9OOBSIdauthODZpAJw
-V+ZfgTu5S8aTh4XqkWWeVDQSsBWJhgHWFM4vrPrsWxae4l3SGj2DpcXUPhLOe55+
-Xh/sVJVH8CpEcNGKNDZnaJShUI6Ige45ElUePZNsYRNLBDWDcYw+nR0DAUovEuCh
-CFqB2H9FKwufxAIWqbEYSca4liHlgFYL7TuHgaDbzdjTlQ8oL3kCPGbtVX5oWiEu
-ZksAYCwT9sDxSxeThmFZOQ==</dsig:SignatureValue>
+    <dsig:SignatureValue>VIZyD5JmV2gnPyzMEMwDaIg+NBOZzpSvBoRtPbWrYUyjxVzQfPvFzAAE+4hz8Wc7
+TIpiTZ3sYXKRQAEmA4Iu5AOJ2uijv8tnioo2FyV6JT9aGr5cNi7eeGFmN7ILU4zc
+rgp99iWgTRms8T8C7zy/NtE8P2q8K4sxQvxnYmK/0kHkQPQnWpZafAd6G/fpoV0h
+5W8UQTtn72OEPhm21uxp4crWRk9YlF2ayGYDBGm8YFP01w663e0r61xq6ROW2O4i
+jR2dQWPM1nzrafHSJKg2TL4S/GtTsDNNuIJihzGpmEjULX2FIt83f6dogyr7K624
+XcjpahE+WHn7WR3VVZsMkw==</dsig:SignatureValue>
     <dsig:KeyInfo>
       <dsig:X509Data>
         <dsig:X509IssuerSerial>
index 58649e8d97aefc24fc598d167ef3a9048c21e99b..1140c07dab3d272498e0fbb9993cb345308c5965 100644 (file)
@@ -18,7 +18,6 @@
       <AssetList>
         <MainPicture>
           <Id>urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
index 01dd52d88be4ad10885711878cf3333231c6b501..d04d25af51fcfd1776612b19bdcc9c823b959c57 100644 (file)
@@ -18,7 +18,6 @@
       <AssetList>
         <MainPicture>
           <Id>urn:uuid:e98d059d-645f-4343-a30f-edc61d58b8e0</Id>
-          <AnnotationText></AnnotationText>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
index 228a7e1c8f8aab3ccd96a2f93ea5b1ee0a24c56d..7c90151373efbcc32ee39f9a6326d546568fa117 100644 (file)
@@ -26,7 +26,7 @@
           <Path>cpl_46c3eb45-15e5-47d6-8684-d8641e4dc516.xml</Path>
           <VolumeIndex>1</VolumeIndex>
           <Offset>0</Offset>
-          <Length>1105</Length>
+          <Length>1061</Length>
         </Chunk>
       </ChunkList>
     </Asset>
index 664ad626dd6aa4b0f91e2c52b46611728ae35bcf..2da8e9106bf01bda254ffba7340be7859976d170 100644 (file)
@@ -9,8 +9,8 @@
     <Asset>
       <Id>urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516</Id>
       <AnnotationText>46c3eb45-15e5-47d6-8684-d8641e4dc516</AnnotationText>
-      <Hash>YkdOdaGok/Vrkq62zAkfCw1l/Y4=</Hash>
-      <Size>1105</Size>
+      <Hash>614bJ4VLsNZ6mLbdXbZXjGuoSsY=</Hash>
+      <Size>1061</Size>
       <Type>text/xml;asdcpKind=CPL</Type>
     </Asset>
     <Asset>
index dab85a239b2d0460e172fb3583c96ecc19676b20..b2e98981c9cec82d01f029fd6d4990cdf3fc77dd 100644 (file)
@@ -115,6 +115,9 @@ prepare_directory (path path)
 }
 
 
+/** Copy dcp_test{reference_number} to build/test/verify_test{verify_test_suffix}
+ *  to make a new sacrifical test DCP.
+ */
 static path
 setup (int reference_number, string verify_test_suffix)
 {
@@ -255,6 +258,10 @@ check_verify_result (vector<path> dir, vector<dcp::VerificationNote> test_notes)
 }
 
 
+/* Copy dcp_test1 to build/test/verify_test{suffix} then edit a file found by the functor 'file',
+ * replacing from with to.  Verify the resulting DCP and check that the results match the given
+ * list of codes.
+ */
 static
 void
 check_verify_result_after_replace (string suffix, boost::function<path (string)> file, string from, string to, vector<dcp::VerificationNote::Code> codes)
@@ -379,9 +386,9 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_picture_sound_hashes)
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, dcp_test1_cpl_id, canonical(dir / dcp_test1_cpl) },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_PICTURE_HASHES, canonical(dir / "video.mxf") },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_SOUND_HASHES, canonical(dir / "audio.mxf") },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'x6pkiSEIBuZW7KEY73GrNNw8UjDE=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 12 },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xLq7ot/GobgrqUYdlbR8FCD5APqs=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 26 },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xgVKhC9IkWyzQbgzpFcJ1bpqbtwk=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 19 },
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xc1DRq6GaSzV2brF0YnSNed46nqk=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 12 }
                });
 }
 
@@ -510,7 +517,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_pkl_id)
 BOOST_AUTO_TEST_CASE (verify_invalid_xml_asset_map_id)
 {
        check_verify_result_after_replace (
-               "invalix_xml_asset_map_id", &asset_map,
+               "invalid_xml_asset_map_id", &asset_map,
                "<Id>urn:uuid:" + dcp_test1_asset_map_id.substr(0, 3),
                "<Id>urn:uuid:x" + dcp_test1_asset_map_id.substr(1, 2),
                { dcp::VerificationNote::Code::INVALID_XML }
@@ -936,8 +943,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_cpl_metadata_bad_tag)
        check_verify_result (
                { dir },
                {
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:MainSoundXConfiguration'"), canonical(cpl->file().get()), 54 },
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:MainSoundXSampleRate'"), canonical(cpl->file().get()), 55 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:MainSoundXConfiguration'"), canonical(cpl->file().get()), 52 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:MainSoundXSampleRate'"), canonical(cpl->file().get()), 53 },
                        {
                                dcp::VerificationNote::Type::ERROR,
                                dcp::VerificationNote::Code::INVALID_XML,
@@ -948,7 +955,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_cpl_metadata_bad_tag)
                                       "MainSoundSampleRate,MainPictureStoredArea,MainPictureActiveArea,MainSubtitleLanguageList?,"
                                       "ExtensionMetadataList?,)'"),
                                canonical(cpl->file().get()),
-                               75
+                               73
                        },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->id(), canonical(cpl->file().get()) },
                });
@@ -2727,8 +2734,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata3)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:NameX'"), cpl->file().get(), 75 },
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'meta:NameX' is not allowed for content model '(Name,PropertyList?,)'"), cpl->file().get(), 82 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:NameX'"), cpl->file().get(), 72 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'meta:NameX' is not allowed for content model '(Name,PropertyList?,)'"), cpl->file().get(), 79 },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->id(), cpl->file().get() },
                });
 }
@@ -2810,8 +2817,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata6)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:ValueX'"), cpl->file().get(), 79 },
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'meta:ValueX' is not allowed for content model '(Name,Value)'"), cpl->file().get(), 80 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:ValueX'"), cpl->file().get(), 76 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'meta:ValueX' is not allowed for content model '(Name,Value)'"), cpl->file().get(), 77 },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->id(), cpl->file().get() },
                });
 }
@@ -2866,8 +2873,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata8)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:PropertyX'"), cpl->file().get(), 77 },
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'meta:PropertyX' is not allowed for content model '(Property+)'"), cpl->file().get(), 81 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:PropertyX'"), cpl->file().get(), 74 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'meta:PropertyX' is not allowed for content model '(Property+)'"), cpl->file().get(), 78 },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->id(), cpl->file().get() },
                });
 }
@@ -2895,8 +2902,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata9)
        check_verify_result (
                {dir},
                {
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:PropertyListX'"), cpl->file().get(), 76 },
-                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'meta:PropertyListX' is not allowed for content model '(Name,PropertyList?,)'"), cpl->file().get(), 82 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:PropertyListX'"), cpl->file().get(), 73 },
+                       { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'meta:PropertyListX' is not allowed for content model '(Name,PropertyList?,)'"), cpl->file().get(), 79 },
                        { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->id(), cpl->file().get() },
                });
 }