summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-03-18 00:29:47 +0000
committerCarl Hetherington <cth@carlh.net>2019-03-18 00:29:47 +0000
commit099cb53c7a1079b3d3b2bf0c1cf635673a0192fd (patch)
treee56297d012812c24d63f512b71367420b228ee17
parente5ce888e953340ca94d506d710f90fec93540cd2 (diff)
Accept that <Duration> and <EntryPoint> are optional, and account for this in tests.
Also fix tests to reflect <AnnotationText> no longer being filled in with a default value.
-rw-r--r--src/reel.cc12
-rw-r--r--src/reel_asset.cc49
-rw-r--r--src/reel_asset.h16
-rw-r--r--test/ref/DCP/dcp_test1/ASSETMAP.xml2
-rw-r--r--test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml4
-rw-r--r--test/ref/DCP/dcp_test1/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml4
-rw-r--r--test/ref/DCP/dcp_test2/ASSETMAP.xml2
-rw-r--r--test/ref/DCP/dcp_test2/cpl_48db27c3-4964-46a2-8b02-3e5570efb42d.xml4
-rw-r--r--test/ref/DCP/dcp_test2/pkl_9f19589a-01e5-4093-b23b-a32e143e5956.xml4
-rw-r--r--test/ref/DCP/dcp_test5/ASSETMAP.xml2
-rw-r--r--test/ref/DCP/dcp_test5/cpl_3a8a01d1-0e1c-4ff0-977d-63d32995a1fd.xml6
-rw-r--r--test/ref/DCP/dcp_test5/pkl_7574c611-f8de-4d20-98c4-2eb7dc87080a.xml4
-rw-r--r--test/ref/DCP/dcp_test7/ASSETMAP2
-rw-r--r--test/ref/DCP/dcp_test7/cpl_1d513f84-5856-4f91-a88a-4d452cc6a28a.xml4
-rw-r--r--test/ref/DCP/dcp_test7/pkl_a800aea0-904b-4bd0-9250-374fdb46528b.xml4
-rw-r--r--test/ref/DCP/encryption_test/ASSETMAP.xml2
-rw-r--r--test/ref/DCP/encryption_test/cpl_b3eba4a0-f542-4937-b972-1cc4667ed01a.xml18
-rw-r--r--test/ref/DCP/encryption_test/pkl_59730183-23bc-491e-906b-1dd453ff9d11.xml18
-rw-r--r--test/ref/write_interop_subtitle_test3/ASSETMAP2
-rw-r--r--test/ref/write_interop_subtitle_test3/cpl_f28b567b-3b9a-417a-aee4-6fc1a2c6a3af.xml2
-rw-r--r--test/ref/write_interop_subtitle_test3/pkl_f5aab304-8145-44e3-a265-aa8d8812d8a2.xml4
-rw-r--r--tools/dcpinfo.cc31
22 files changed, 113 insertions, 83 deletions
diff --git a/src/reel.cc b/src/reel.cc
index bda83531..0a9a4b63 100644
--- a/src/reel.cc
+++ b/src/reel.cc
@@ -328,22 +328,22 @@ Reel::duration () const
int64_t d = 0;
if (_main_picture) {
- d = max (d, _main_picture->duration ());
+ d = max (d, _main_picture->actual_duration());
}
if (_main_sound) {
- d = max (d, _main_sound->duration ());
+ d = max (d, _main_sound->actual_duration());
}
if (_main_subtitle) {
- d = max (d, _main_subtitle->duration ());
+ d = max (d, _main_subtitle->actual_duration());
}
if (_main_markers) {
- d = max (d, _main_markers->duration ());
+ d = max (d, _main_markers->actual_duration());
}
BOOST_FOREACH (shared_ptr<ReelClosedCaptionAsset> i, _closed_captions) {
- d = max (d, i->duration());
+ d = max (d, i->actual_duration());
}
if (_atmos) {
- d = max (d, _atmos->duration ());
+ d = max (d, _atmos->actual_duration());
}
return d;
diff --git a/src/reel_asset.cc b/src/reel_asset.cc
index caaf3eee..2457c079 100644
--- a/src/reel_asset.cc
+++ b/src/reel_asset.cc
@@ -68,10 +68,10 @@ ReelAsset::ReelAsset (string id, Fraction edit_rate, int64_t intrinsic_duration,
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->number_child<int64_t> ("Duration"))
+ , _duration (node->optional_number_child<int64_t>("Duration"))
, _annotation_text (node->optional_string_child ("AnnotationText").get_value_or (""))
, _edit_rate (Fraction (node->string_child ("EditRate")))
- , _entry_point (node->number_child<int64_t> ("EntryPoint"))
+ , _entry_point (node->optional_number_child<int64_t>("EntryPoint"))
{
}
@@ -79,21 +79,25 @@ ReelAsset::ReelAsset (shared_ptr<const cxml::Node> node)
xmlpp::Node*
ReelAsset::write_to_cpl_base (xmlpp::Node* node, Standard standard, optional<string> hash) const
{
- xmlpp::Element* a = node->add_child (cpl_node_name (standard));
- pair<string, string> const attr = cpl_node_attribute (standard);
- if (!attr.first.empty ()) {
- a->set_attribute (attr.first, attr.second);
- }
- pair<string, string> const ns = cpl_node_namespace (standard);
- if (!ns.first.empty ()) {
- 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);
- a->add_child("EditRate")->add_child_text (String::compose ("%1 %2", _edit_rate.numerator, _edit_rate.denominator));
- a->add_child("IntrinsicDuration")->add_child_text (raw_convert<string> (_intrinsic_duration));
- a->add_child("EntryPoint")->add_child_text (raw_convert<string> (_entry_point));
- a->add_child("Duration")->add_child_text (raw_convert<string> (_duration));
+ xmlpp::Element* a = node->add_child (cpl_node_name (standard));
+ pair<string, string> const attr = cpl_node_attribute (standard);
+ if (!attr.first.empty ()) {
+ a->set_attribute (attr.first, attr.second);
+ }
+ pair<string, string> const ns = cpl_node_namespace (standard);
+ if (!ns.first.empty ()) {
+ 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);
+ a->add_child("EditRate")->add_child_text (String::compose ("%1 %2", _edit_rate.numerator, _edit_rate.denominator));
+ a->add_child("IntrinsicDuration")->add_child_text (raw_convert<string> (_intrinsic_duration));
+ if (_entry_point) {
+ a->add_child("EntryPoint")->add_child_text(raw_convert<string>(*_entry_point));
+ }
+ if (_duration) {
+ a->add_child("Duration")->add_child_text(raw_convert<string>(*_duration));
+ }
if (hash) {
a->add_child("Hash")->add_child_text (hash.get());
}
@@ -147,3 +151,14 @@ ReelAsset::asset_equals (shared_ptr<const ReelAsset> other, EqualityOptions opt,
return true;
}
+
+/** @return <Duration>, or <IntrinsicDuration> - <EntryPoint> if <Duration> is not present */
+int64_t
+ReelAsset::actual_duration () const
+{
+ if (_duration) {
+ return *_duration;
+ }
+
+ return _intrinsic_duration - _entry_point.get_value_or(0);
+}
diff --git a/src/reel_asset.h b/src/reel_asset.h
index 4092a97a..072d55fd 100644
--- a/src/reel_asset.h
+++ b/src/reel_asset.h
@@ -82,7 +82,7 @@ public:
_entry_point = e;
}
- int64_t entry_point () const {
+ boost::optional<int64_t> entry_point () const {
return _entry_point;
}
@@ -90,10 +90,12 @@ public:
_duration = d;
}
- int64_t duration () const {
+ boost::optional<int64_t> duration () const {
return _duration;
}
+ int64_t actual_duration () const;
+
std::string annotation_text () const {
return _annotation_text;
}
@@ -119,13 +121,13 @@ protected:
xmlpp::Node* write_to_cpl_base (xmlpp::Node* node, Standard standard, boost::optional<std::string> hash) const;
- int64_t _intrinsic_duration; ///< The &lt;IntrinsicDuration&gt; from the reel's entry for this asset
- int64_t _duration; ///< The &lt;Duration&gt; from the reel's entry for this asset
+ int64_t _intrinsic_duration; ///< The &lt;IntrinsicDuration&gt; from the reel's entry for this asset
+ 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
- Fraction _edit_rate; ///< The &lt;EditRate&gt; from the reel's entry for this asset
- int64_t _entry_point; ///< The &lt;EntryPoint&gt; from the reel's entry for this asset
+ 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
};
}
diff --git a/test/ref/DCP/dcp_test1/ASSETMAP.xml b/test/ref/DCP/dcp_test1/ASSETMAP.xml
index 136ce423..bd4ffaa3 100644
--- a/test/ref/DCP/dcp_test1/ASSETMAP.xml
+++ b/test/ref/DCP/dcp_test1/ASSETMAP.xml
@@ -26,7 +26,7 @@
<Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>1664</Length>
+ <Length>1646</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml b/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
index 7ab84024..ccfc1edf 100644
--- a/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
+++ b/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
@@ -18,7 +18,7 @@
<AssetList>
<MainPicture>
<Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
- <AnnotationText>video.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
@@ -29,7 +29,7 @@
</MainPicture>
<MainSound>
<Id>urn:uuid:9482e87d-292d-4e0e-a98d-c61822b60fe9</Id>
- <AnnotationText>audio.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
diff --git a/test/ref/DCP/dcp_test1/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml b/test/ref/DCP/dcp_test1/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml
index 48a6cb9c..bc6b2035 100644
--- a/test/ref/DCP/dcp_test1/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml
+++ b/test/ref/DCP/dcp_test1/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml
@@ -9,8 +9,8 @@
<Asset>
<Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
<AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
- <Hash>Ak8hEl96TMfLaOWB6IAtoE3tK/g=</Hash>
- <Size>1664</Size>
+ <Hash>ZtuszZE/7gxhCt7DVmzbsZB5SnI=</Hash>
+ <Size>1646</Size>
<Type>text/xml</Type>
</Asset>
<Asset>
diff --git a/test/ref/DCP/dcp_test2/ASSETMAP.xml b/test/ref/DCP/dcp_test2/ASSETMAP.xml
index 093c7b92..446b84bc 100644
--- a/test/ref/DCP/dcp_test2/ASSETMAP.xml
+++ b/test/ref/DCP/dcp_test2/ASSETMAP.xml
@@ -26,7 +26,7 @@
<Path>cpl_48db27c3-4964-46a2-8b02-3e5570efb42d.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>1788</Length>
+ <Length>1770</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/dcp_test2/cpl_48db27c3-4964-46a2-8b02-3e5570efb42d.xml b/test/ref/DCP/dcp_test2/cpl_48db27c3-4964-46a2-8b02-3e5570efb42d.xml
index ed1134ca..f68a8a30 100644
--- a/test/ref/DCP/dcp_test2/cpl_48db27c3-4964-46a2-8b02-3e5570efb42d.xml
+++ b/test/ref/DCP/dcp_test2/cpl_48db27c3-4964-46a2-8b02-3e5570efb42d.xml
@@ -18,7 +18,7 @@
<AssetList>
<MainSound>
<Id>urn:uuid:e5c3091b-f61e-459c-9faf-210bd4d3c7bf</Id>
- <AnnotationText>audio.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
@@ -27,7 +27,7 @@
</MainSound>
<msp-cpl:MainStereoscopicPicture xmlns:msp-cpl="http://www.smpte-ra.org/schemas/429-10/2008/Main-Stereo-Picture-CPL">
<Id>urn:uuid:63c3aece-c581-4603-b612-75e43f0c0430</Id>
- <AnnotationText>video.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
diff --git a/test/ref/DCP/dcp_test2/pkl_9f19589a-01e5-4093-b23b-a32e143e5956.xml b/test/ref/DCP/dcp_test2/pkl_9f19589a-01e5-4093-b23b-a32e143e5956.xml
index 900f71b0..44fc9cd3 100644
--- a/test/ref/DCP/dcp_test2/pkl_9f19589a-01e5-4093-b23b-a32e143e5956.xml
+++ b/test/ref/DCP/dcp_test2/pkl_9f19589a-01e5-4093-b23b-a32e143e5956.xml
@@ -9,8 +9,8 @@
<Asset>
<Id>urn:uuid:48db27c3-4964-46a2-8b02-3e5570efb42d</Id>
<AnnotationText>48db27c3-4964-46a2-8b02-3e5570efb42d</AnnotationText>
- <Hash>9paU+xC4xaYBvPJQPCyDIhzQIEY=</Hash>
- <Size>1788</Size>
+ <Hash>SvHyFHgdvrcbyej6IQwUWX3kOfI=</Hash>
+ <Size>1770</Size>
<Type>text/xml</Type>
</Asset>
<Asset>
diff --git a/test/ref/DCP/dcp_test5/ASSETMAP.xml b/test/ref/DCP/dcp_test5/ASSETMAP.xml
index 0362b345..03550fe5 100644
--- a/test/ref/DCP/dcp_test5/ASSETMAP.xml
+++ b/test/ref/DCP/dcp_test5/ASSETMAP.xml
@@ -26,7 +26,7 @@
<Path>cpl_3a8a01d1-0e1c-4ff0-977d-63d32995a1fd.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>2213</Length>
+ <Length>2152</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/dcp_test5/cpl_3a8a01d1-0e1c-4ff0-977d-63d32995a1fd.xml b/test/ref/DCP/dcp_test5/cpl_3a8a01d1-0e1c-4ff0-977d-63d32995a1fd.xml
index be617be3..30b7a5aa 100644
--- a/test/ref/DCP/dcp_test5/cpl_3a8a01d1-0e1c-4ff0-977d-63d32995a1fd.xml
+++ b/test/ref/DCP/dcp_test5/cpl_3a8a01d1-0e1c-4ff0-977d-63d32995a1fd.xml
@@ -18,7 +18,7 @@
<AssetList>
<MainPicture>
<Id>urn:uuid:2527dbe5-41f7-4a22-a2d2-bd7cfeffbce1</Id>
- <AnnotationText>video.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
@@ -29,7 +29,7 @@
</MainPicture>
<MainSound>
<Id>urn:uuid:69827080-f731-4e4c-9c8a-ec568acdfacc</Id>
- <AnnotationText>audio.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
@@ -38,7 +38,7 @@
</MainSound>
<axd:AuxData xmlns:axd="http://www.dolby.com/schemas/2012/AD">
<Id>urn:uuid:f1f7e0bc-ee61-412a-ac0e-e0b165a364a8</Id>
- <AnnotationText>20160218_NameOfFilm_FTR_OV_EN_A_dcs_r01.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>1489</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
diff --git a/test/ref/DCP/dcp_test5/pkl_7574c611-f8de-4d20-98c4-2eb7dc87080a.xml b/test/ref/DCP/dcp_test5/pkl_7574c611-f8de-4d20-98c4-2eb7dc87080a.xml
index 9f805894..a262ddbc 100644
--- a/test/ref/DCP/dcp_test5/pkl_7574c611-f8de-4d20-98c4-2eb7dc87080a.xml
+++ b/test/ref/DCP/dcp_test5/pkl_7574c611-f8de-4d20-98c4-2eb7dc87080a.xml
@@ -9,8 +9,8 @@
<Asset>
<Id>urn:uuid:3a8a01d1-0e1c-4ff0-977d-63d32995a1fd</Id>
<AnnotationText>3a8a01d1-0e1c-4ff0-977d-63d32995a1fd</AnnotationText>
- <Hash>vjqb+OKDts+tVrOdl5VK1/7kDlU=</Hash>
- <Size>2213</Size>
+ <Hash>rjSbPKZl3yv5tKe/QJJIwl2siG8=</Hash>
+ <Size>2152</Size>
<Type>text/xml</Type>
</Asset>
<Asset>
diff --git a/test/ref/DCP/dcp_test7/ASSETMAP b/test/ref/DCP/dcp_test7/ASSETMAP
index b148f667..920e95c5 100644
--- a/test/ref/DCP/dcp_test7/ASSETMAP
+++ b/test/ref/DCP/dcp_test7/ASSETMAP
@@ -26,7 +26,7 @@
<Path>cpl_1d513f84-5856-4f91-a88a-4d452cc6a28a.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>1666</Length>
+ <Length>1648</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/dcp_test7/cpl_1d513f84-5856-4f91-a88a-4d452cc6a28a.xml b/test/ref/DCP/dcp_test7/cpl_1d513f84-5856-4f91-a88a-4d452cc6a28a.xml
index 251846aa..c751f116 100644
--- a/test/ref/DCP/dcp_test7/cpl_1d513f84-5856-4f91-a88a-4d452cc6a28a.xml
+++ b/test/ref/DCP/dcp_test7/cpl_1d513f84-5856-4f91-a88a-4d452cc6a28a.xml
@@ -18,7 +18,7 @@
<AssetList>
<MainPicture>
<Id>urn:uuid:cb2b7aa9-a378-4392-86f8-df013863fdd0</Id>
- <AnnotationText>video.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
@@ -29,7 +29,7 @@
</MainPicture>
<MainSound>
<Id>urn:uuid:e63718c9-fa72-4dd9-a144-8736591b08b6</Id>
- <AnnotationText>audio.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
diff --git a/test/ref/DCP/dcp_test7/pkl_a800aea0-904b-4bd0-9250-374fdb46528b.xml b/test/ref/DCP/dcp_test7/pkl_a800aea0-904b-4bd0-9250-374fdb46528b.xml
index 6294ecd4..8a7600c0 100644
--- a/test/ref/DCP/dcp_test7/pkl_a800aea0-904b-4bd0-9250-374fdb46528b.xml
+++ b/test/ref/DCP/dcp_test7/pkl_a800aea0-904b-4bd0-9250-374fdb46528b.xml
@@ -9,8 +9,8 @@
<Asset>
<Id>urn:uuid:1d513f84-5856-4f91-a88a-4d452cc6a28a</Id>
<AnnotationText>1d513f84-5856-4f91-a88a-4d452cc6a28a</AnnotationText>
- <Hash>XNG8TzgVUkfGewkKVXqlTV7yODQ=</Hash>
- <Size>1666</Size>
+ <Hash>Vh8NXTKfAV32QoJkxkO7KsCfzVo=</Hash>
+ <Size>1648</Size>
<Type>text/xml;asdcpKind=CPL</Type>
</Asset>
<Asset>
diff --git a/test/ref/DCP/encryption_test/ASSETMAP.xml b/test/ref/DCP/encryption_test/ASSETMAP.xml
index ba355b98..c2f7cca1 100644
--- a/test/ref/DCP/encryption_test/ASSETMAP.xml
+++ b/test/ref/DCP/encryption_test/ASSETMAP.xml
@@ -26,7 +26,7 @@
<Path>cpl_b3eba4a0-f542-4937-b972-1cc4667ed01a.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>9376</Length>
+ <Length>9358</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/encryption_test/cpl_b3eba4a0-f542-4937-b972-1cc4667ed01a.xml b/test/ref/DCP/encryption_test/cpl_b3eba4a0-f542-4937-b972-1cc4667ed01a.xml
index d79d98c0..0b704cff 100644
--- a/test/ref/DCP/encryption_test/cpl_b3eba4a0-f542-4937-b972-1cc4667ed01a.xml
+++ b/test/ref/DCP/encryption_test/cpl_b3eba4a0-f542-4937-b972-1cc4667ed01a.xml
@@ -18,7 +18,7 @@
<AssetList>
<MainPicture>
<Id>urn:uuid:2d4e8308-7197-41b8-8a0a-07a939d74971</Id>
- <AnnotationText>video.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
@@ -30,7 +30,7 @@
</MainPicture>
<MainSound>
<Id>urn:uuid:99c2c0d0-7491-4ad0-86d5-4f0af19d71f6</Id>
- <AnnotationText>audio.mxf</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
@@ -59,15 +59,15 @@
<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>lcdyVT8inONqxC5htOKbHp4CBo4=</dsig:DigestValue>
+ <dsig:DigestValue>fri32ijQJVVonuur70FbpJC9oP0=</dsig:DigestValue>
</dsig:Reference>
</dsig:SignedInfo>
- <dsig:SignatureValue>Z37dh5UV8iRaCV9c6QWxjER1j6UQPeUSL+m7+vqrm13aVjwhk2eURcppFhvM/RZi
-ukY0mOPQkQ+lrTNYRfQEvCRV+waMW4k22ivXafkNGXZ1axFLhj/bAoGVhYmBIGr9
-dvXcYmdI0exBcDugmioN8ZghhaaslS9+V1ylduZrATCsr5GBdtLQw4nqappam5jM
-BaRq9DZBj29Oc/guMpTCgHJEqBJggTxc8Zp4YAm+BF4xwYOzG6cU/s/jjoSPWmnH
-bgHfIsUnTCV4nFdG5bUjc1FmGAcOIJ1wDRXKdAWZflAGsDYsCQU2jlv7nMzc7sUD
-KNjYGw449Tso4F8bkfJ+ug==</dsig:SignatureValue>
+ <dsig:SignatureValue>QKXtm+xrKQT6RVCZGvDchIWcJtxGHN2yBppDcJYo1jSvHSzJwEvPlm94P5r26979
+Kf9tReSd7LdYKtQr9YWdYmQYSvgUdX2UvXmzdmEmzAPCnm2+YAjSZ1FPIZF+P1Vj
+0eQrpkpNESkIHD+ZbTGA9M8b+2Ua/vNKfUOCOvU2z0u1VjsAS0h42NDCyh1NpNR3
+nmbkr4TszxdS/6wgJ9yLRKfsPUk1KE6mI1lIJdYrwMjxVI1PY7vS7X+KbXCQK9V1
+BGdoBSWi9Wdj+IZ0Su0KIE+w2Af/cOjfThes2pG6NmB13XABadD2UMRhR6DxvXdl
+VuY+EHlJyJU8xPG+WLztPw==</dsig:SignatureValue>
<dsig:KeyInfo>
<dsig:X509Data>
<dsig:X509IssuerSerial>
diff --git a/test/ref/DCP/encryption_test/pkl_59730183-23bc-491e-906b-1dd453ff9d11.xml b/test/ref/DCP/encryption_test/pkl_59730183-23bc-491e-906b-1dd453ff9d11.xml
index b0d78982..49713b6e 100644
--- a/test/ref/DCP/encryption_test/pkl_59730183-23bc-491e-906b-1dd453ff9d11.xml
+++ b/test/ref/DCP/encryption_test/pkl_59730183-23bc-491e-906b-1dd453ff9d11.xml
@@ -9,8 +9,8 @@
<Asset>
<Id>urn:uuid:b3eba4a0-f542-4937-b972-1cc4667ed01a</Id>
<AnnotationText>b3eba4a0-f542-4937-b972-1cc4667ed01a</AnnotationText>
- <Hash>CP1vGWWg0jTELvnvLkVmj/PSFxI=</Hash>
- <Size>9376</Size>
+ <Hash>3PjhZ80RuwV7hRG6Cv1tkN1wPlo=</Hash>
+ <Size>9358</Size>
<Type>text/xml</Type>
</Asset>
<Asset>
@@ -46,15 +46,15 @@
<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>VDVmBjODM/VDWbPZNjmhJf9jF3s=</dsig:DigestValue>
+ <dsig:DigestValue>YV0vdwu/454wBquhHjbfIb4DwJ8=</dsig:DigestValue>
</dsig:Reference>
</dsig:SignedInfo>
- <dsig:SignatureValue>iYSJZxCK+OAlAoWjjzFQMO83VBQEdaIYWwdJsxwuBBVd0PRwJuDmR8ks5tq0K761
-M26zXD8O6xT2BOmTSEF1nBlElQoP23/wCnbFA44wYcSEpfZG0GuR+HzTNWlqigiq
-xNyNdOKfBBuYZ3s+u+EkxCZsYa/eo9jaPhqQxIJ2anspR5jmvoOY53IqcLuljS5F
-qmrV+JwlniSn/7MfGFsOCqD3kK8ssa7UM9K+hDtHQYQVAItYyfy/jbJDRUL3gV1B
-lsBHH3YSu2L7shdJFKROYJQYYQYtp/Dfk5VjbgUmJsTX+Kbw/FbweEzD3vxp8coy
-qLh+hVCRexNuXthspMtZtw==</dsig:SignatureValue>
+ <dsig:SignatureValue>PXv1x8H55W0zlKoD/R9UjUxKGG/i5/kUnCN/tcydAdhdLHdsNpnpgFCYKIyJ1KYW
+42NRZrU4aUpFShnqRTX1oQDdhghRS2NhnufWOc+BNck6mXHHqWvZxC+AWPfAKG1O
+gYPwov88bUsS/WhWFpFHhYq8KcCCY0NtbeooZ/2FWSLP/s2gngcRdDUudb5SDofR
+bUC2f17gPxDJnScAA1h9o3KQqPKtw/AYAofMi5Ogpq7hq4toV2owouR/gsV+DUgx
+Zl/tBfkCHRglWvy+RBPIZvdL+UFJwTuv6X+MVLpf6SGEl7KzjssBXpplWXdA6wHB
+vanmniT9ivHP9jTM52tMSA==</dsig:SignatureValue>
<dsig:KeyInfo>
<dsig:X509Data>
<dsig:X509IssuerSerial>
diff --git a/test/ref/write_interop_subtitle_test3/ASSETMAP b/test/ref/write_interop_subtitle_test3/ASSETMAP
index c39080cb..5d0e85da 100644
--- a/test/ref/write_interop_subtitle_test3/ASSETMAP
+++ b/test/ref/write_interop_subtitle_test3/ASSETMAP
@@ -26,7 +26,7 @@
<Path>cpl_f28b567b-3b9a-417a-aee4-6fc1a2c6a3af.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>1113</Length>
+ <Length>1105</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/write_interop_subtitle_test3/cpl_f28b567b-3b9a-417a-aee4-6fc1a2c6a3af.xml b/test/ref/write_interop_subtitle_test3/cpl_f28b567b-3b9a-417a-aee4-6fc1a2c6a3af.xml
index 6ed9860f..0f2e8d70 100644
--- a/test/ref/write_interop_subtitle_test3/cpl_f28b567b-3b9a-417a-aee4-6fc1a2c6a3af.xml
+++ b/test/ref/write_interop_subtitle_test3/cpl_f28b567b-3b9a-417a-aee4-6fc1a2c6a3af.xml
@@ -18,7 +18,7 @@
<AssetList>
<MainSubtitle>
<Id>urn:uuid:a6c58cff-3e1e-4b38-acec-a42224475ef6</Id>
- <AnnotationText>subs.xml</AnnotationText>
+ <AnnotationText></AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>6046</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
diff --git a/test/ref/write_interop_subtitle_test3/pkl_f5aab304-8145-44e3-a265-aa8d8812d8a2.xml b/test/ref/write_interop_subtitle_test3/pkl_f5aab304-8145-44e3-a265-aa8d8812d8a2.xml
index 54e598d4..b8107a1a 100644
--- a/test/ref/write_interop_subtitle_test3/pkl_f5aab304-8145-44e3-a265-aa8d8812d8a2.xml
+++ b/test/ref/write_interop_subtitle_test3/pkl_f5aab304-8145-44e3-a265-aa8d8812d8a2.xml
@@ -9,8 +9,8 @@
<Asset>
<Id>urn:uuid:f28b567b-3b9a-417a-aee4-6fc1a2c6a3af</Id>
<AnnotationText>f28b567b-3b9a-417a-aee4-6fc1a2c6a3af</AnnotationText>
- <Hash>Dt8xUBnEmiwA5+0BIIC7VfuEGJA=</Hash>
- <Size>1113</Size>
+ <Hash>st3oqERkPDwHSRDC+WPEkgaRKwM=</Hash>
+ <Size>1105</Size>
<Type>text/xml;asdcpKind=CPL</Type>
</Asset>
<Asset>
diff --git a/tools/dcpinfo.cc b/tools/dcpinfo.cc
index d0edbd3b..d06d2068 100644
--- a/tools/dcpinfo.cc
+++ b/tools/dcpinfo.cc
@@ -95,11 +95,17 @@ main_picture (shared_ptr<Reel> reel, bool analyse, bool decompress)
return;
}
- cout << " Picture ID: " << reel->main_picture()->id()
- << " entry " << reel->main_picture()->entry_point()
- << " duration " << reel->main_picture()->duration()
- << " (" << dcp::Time(reel->main_picture()->duration(), reel->main_picture()->frame_rate().as_float(), reel->main_picture()->frame_rate().as_float()).as_string(dcp::SMPTE) << ")"
- << " intrinsic " << reel->main_picture()->intrinsic_duration();
+ cout << " Picture ID: " << reel->main_picture()->id();
+ if (reel->main_picture()->entry_point()) {
+ cout << " entry " << *reel->main_picture()->entry_point();
+ }
+ if (reel->main_picture()->duration()) {
+ cout << " duration " << *reel->main_picture()->duration()
+ << " (" << dcp::Time(*reel->main_picture()->duration(), reel->main_picture()->frame_rate().as_float(), reel->main_picture()->frame_rate().as_float()).as_string(dcp::SMPTE) << ")"
+ << " intrinsic " << reel->main_picture()->intrinsic_duration();
+ } else {
+ cout << " intrinsic duration " << reel->main_picture()->intrinsic_duration();
+ }
if (reel->main_picture()->asset_ref().resolved()) {
if (reel->main_picture()->asset()) {
@@ -146,10 +152,17 @@ static void
main_sound (shared_ptr<Reel> reel)
{
if (reel->main_sound()) {
- cout << " Sound ID: " << reel->main_sound()->id()
- << " entry " << reel->main_picture()->entry_point()
- << " duration " << reel->main_picture()->duration()
- << " intrinsic " << reel->main_picture()->intrinsic_duration();
+ cout << " Sound ID: " << reel->main_sound()->id();
+ if (reel->main_sound()->entry_point()) {
+ cout << " entry " << *reel->main_sound()->entry_point();
+ }
+ if (reel->main_sound()->duration()) {
+ cout << " duration " << *reel->main_sound()->duration()
+ << " intrinsic " << reel->main_sound()->intrinsic_duration();
+ } else {
+ cout << " intrinsic duration " << reel->main_sound()->intrinsic_duration();
+ }
+
if (reel->main_sound()->asset_ref().resolved()) {
if (reel->main_sound()->asset()) {
cout << "\n Sound: "