_main_subtitle.reset (new ReelSubtitleAsset (main_subtitle));
}
- shared_ptr<cxml::Node> atmos = asset_list->optional_node_child ("axd:AuxData");
+ shared_ptr<cxml::Node> atmos = asset_list->optional_node_child ("AuxData");
if (atmos) {
_atmos.reset (new ReelAtmosAsset (atmos));
}
void
ReelAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
- pair<string, string> const attr = cpl_node_attribute (standard);
xmlpp::Element* a = node->add_child (cpl_node_name ());
+ 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 ();
+ 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));
return make_pair ("", "");
}
+pair<string, string>
+ReelAsset::cpl_node_namespace () const
+{
+ return make_pair ("", "");
+}
+
bool
ReelAsset::equals (shared_ptr<const ReelAsset> other, EqualityOptions opt, NoteHandler note) const
{
*/
virtual std::string cpl_node_name () const = 0;
- /** @return Any attribute that should be used on the asset's node in the
- * CPL.
- */
+ /** @return Any attribute that should be used on the asset's node in the CPL */
virtual std::pair<std::string, std::string> cpl_node_attribute (Standard) const;
+ /** @return Any namespace that should be used on the asset's node in the CPL */
+ virtual std::pair<std::string, std::string> cpl_node_namespace () const;
+
/** Reference to the asset (MXF or XML file) that this reel entry
* applies to.
*/
#include <libxml++/libxml++.h>
using std::string;
+using std::pair;
+using std::make_pair;
using boost::shared_ptr;
using namespace dcp;
ReelAtmosAsset::ReelAtmosAsset (boost::shared_ptr<const cxml::Node> node)
: ReelAsset (node)
{
+ node->ignore_child ("DataType");
node->done ();
}
return "axd:AuxData";
}
+pair<string, string>
+ReelAtmosAsset::cpl_node_namespace () const
+{
+ return make_pair ("http://www.dolby.com/schemas/2012/AD", "axd");
+}
+
string
ReelAtmosAsset::key_type () const
{
private:
std::string key_type () const;
std::string cpl_node_name () const;
+ std::pair<std::string, std::string> cpl_node_namespace () const;
};
}
/* build/test/DCP/dcp_test5 is checked against test/ref/DCP/dcp_test5 by run/tests */
}
+
+/** Basic tests of reading a 2D DCP with an Atmos track */
+BOOST_AUTO_TEST_CASE (dcp_test6)
+{
+ dcp::DCP dcp ("test/ref/DCP/dcp_test5");
+ dcp.read ();
+
+ BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1);
+ BOOST_REQUIRE_EQUAL (dcp.cpls().front()->reels().size(), 1);
+ BOOST_CHECK (dcp.cpls().front()->reels().front()->main_picture());
+ BOOST_CHECK (dcp.cpls().front()->reels().front()->main_sound());
+ BOOST_CHECK (!dcp.cpls().front()->reels().front()->main_subtitle());
+ BOOST_CHECK (dcp.cpls().front()->reels().front()->atmos());
+}
<?xml version="1.0" encoding="UTF-8"?>
-<AssetMap xmlns="http://www.smpte-ra.org/schemas/429-9/2007/AM"><Id>urn:uuid:7c247206-50b3-487d-96ed-29b19512a4bb</Id><AnnotationText>Created by OpenDCP 0.0.25</AnnotationText><Creator>OpenDCP 0.0.25</Creator><VolumeCount>1</VolumeCount><IssueDate>2012-07-17T04:45:18+00:00</IssueDate><Issuer>OpenDCP 0.0.25</Issuer><AssetList><Asset><Id>urn:uuid:a0488650-63ea-4b53-92a3-00a2c4e516fe</Id><PackingList>true</PackingList><ChunkList><Chunk><Path>pkl_a0488650-63ea-4b53-92a3-00a2c4e516fe.xml</Path><VolumeIndex>1</VolumeIndex><Offset>0</Offset><Length>1022</Length></Chunk></ChunkList></Asset><Asset><Id>urn:uuid:330161f5-434e-424a-a701-3d3f26700c52</Id><ChunkList><Chunk><Path>cpl_330161f5-434e-424a-a701-3d3f26700c52.xml</Path><VolumeIndex>1</VolumeIndex><Offset>0</Offset><Length>1768</Length></Chunk></ChunkList></Asset><Asset><Id>urn:uuid:402c5a88-2512-4465-9c0b-cfa687dbc5d0</Id><ChunkList><Chunk><Path>video.mxf</Path><VolumeIndex>1</VolumeIndex><Offset>0</Offset><Length>26080</Length></Chunk></ChunkList></Asset><Asset><Id>urn:uuid:78f4f085-0901-4a0f-96f9-e21987072a51</Id><ChunkList><Chunk><Path>audio.mxf</Path><VolumeIndex>1</VolumeIndex><Offset>0</Offset><Length>161326</Length></Chunk></ChunkList></Asset></AssetList></AssetMap>
+<AssetMap xmlns="http://www.smpte-ra.org/schemas/429-9/2007/AM"><Id>urn:uuid:7c247206-50b3-487d-96ed-29b19512a4bb</Id><AnnotationText>Created by OpenDCP 0.0.25</AnnotationText><Creator>OpenDCP 0.0.25</Creator><VolumeCount>1</VolumeCount><IssueDate>2012-07-17T04:45:18+00:00</IssueDate><Issuer>OpenDCP 0.0.25</Issuer><AssetList><Asset><Id>urn:uuid:a0488650-63ea-4b53-92a3-00a2c4e516fe</Id><PackingList>true</PackingList><ChunkList><Chunk><Path>pkl_a0488650-63ea-4b53-92a3-00a2c4e516fe.xml</Path><VolumeIndex>1</VolumeIndex><Offset>0</Offset><Length>1022</Length></Chunk></ChunkList></Asset><Asset><Id>urn:uuid:330161f5-434e-424a-a701-3d3f26700c52</Id><ChunkList><Chunk><Path>cpl_330161f5-434e-424a-a701-3d3f26700c52.xml</Path><VolumeIndex>1</VolumeIndex><Offset>0</Offset><Length>1817</Length></Chunk></ChunkList></Asset><Asset><Id>urn:uuid:402c5a88-2512-4465-9c0b-cfa687dbc5d0</Id><ChunkList><Chunk><Path>video.mxf</Path><VolumeIndex>1</VolumeIndex><Offset>0</Offset><Length>26080</Length></Chunk></ChunkList></Asset><Asset><Id>urn:uuid:78f4f085-0901-4a0f-96f9-e21987072a51</Id><ChunkList><Chunk><Path>audio.mxf</Path><VolumeIndex>1</VolumeIndex><Offset>0</Offset><Length>161326</Length></Chunk></ChunkList></Asset></AssetList></AssetMap>
<?xml version="1.0" encoding="UTF-8"?>
-<CompositionPlaylist xmlns="http://www.smpte-ra.org/schemas/429-7/2006/CPL"><Id>urn:uuid:330161f5-434e-424a-a701-3d3f26700c52</Id><AnnotationText>A Test DCP</AnnotationText><IssueDate>2012-07-17T04:45:18+00:00</IssueDate><Issuer>OpenDCP 0.0.25</Issuer><Creator>OpenDCP 0.0.25</Creator><ContentTitleText>A Test DCP</ContentTitleText><ContentKind>feature</ContentKind><ContentVersion><Id>urn:uri:81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00</Id><LabelText>81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00</LabelText></ContentVersion><RatingList/><ReelList><Reel><Id>urn:uuid:4be406ed-9b7d-4746-bf35-e73598ef1e64</Id><AssetList><MainPicture><Id>urn:uuid:402c5a88-2512-4465-9c0b-cfa687dbc5d0</Id><AnnotationText>video.mxf</AnnotationText><EditRate>24 1</EditRate><IntrinsicDuration>24</IntrinsicDuration><EntryPoint>0</EntryPoint><Duration>24</Duration><Hash>eiqr9sUevuwoy7pprmgU6r0zBD8=</Hash><FrameRate>24 1</FrameRate><ScreenAspectRatio>32 32</ScreenAspectRatio></MainPicture><MainSound><Id>urn:uuid:78f4f085-0901-4a0f-96f9-e21987072a51</Id><AnnotationText>audio.mxf</AnnotationText><EditRate>24 1</EditRate><IntrinsicDuration>24</IntrinsicDuration><EntryPoint>0</EntryPoint><Duration>24</Duration><Hash>iTTXhr9BviLgys5ldPFRzPXP2GM=</Hash></MainSound><axd:AuxData><Id>urn:uuid:73f2a92b-f963-47cc-a3d7-c7ca2fd10a64</Id><AnnotationText>20160218_NameOfFilm_FTR_OV_EN_A_dcs_r01.mxf</AnnotationText><EditRate>24 1</EditRate><IntrinsicDuration>1489</IntrinsicDuration><EntryPoint>0</EntryPoint><Duration>1489</Duration><Hash>jo8pQSebhScPN4EVvvpIUWRrDeM=</Hash><axd:DataType>urn:smpte:ul:060e2b34.04010105.0e090604.00000000</axd:DataType></axd:AuxData></AssetList></Reel></ReelList></CompositionPlaylist>
+<CompositionPlaylist xmlns="http://www.smpte-ra.org/schemas/429-7/2006/CPL"><Id>urn:uuid:330161f5-434e-424a-a701-3d3f26700c52</Id><AnnotationText>A Test DCP</AnnotationText><IssueDate>2012-07-17T04:45:18+00:00</IssueDate><Issuer>OpenDCP 0.0.25</Issuer><Creator>OpenDCP 0.0.25</Creator><ContentTitleText>A Test DCP</ContentTitleText><ContentKind>feature</ContentKind><ContentVersion><Id>urn:uri:81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00</Id><LabelText>81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00</LabelText></ContentVersion><RatingList/><ReelList><Reel><Id>urn:uuid:4be406ed-9b7d-4746-bf35-e73598ef1e64</Id><AssetList><MainPicture><Id>urn:uuid:402c5a88-2512-4465-9c0b-cfa687dbc5d0</Id><AnnotationText>video.mxf</AnnotationText><EditRate>24 1</EditRate><IntrinsicDuration>24</IntrinsicDuration><EntryPoint>0</EntryPoint><Duration>24</Duration><Hash>eiqr9sUevuwoy7pprmgU6r0zBD8=</Hash><FrameRate>24 1</FrameRate><ScreenAspectRatio>32 32</ScreenAspectRatio></MainPicture><MainSound><Id>urn:uuid:78f4f085-0901-4a0f-96f9-e21987072a51</Id><AnnotationText>audio.mxf</AnnotationText><EditRate>24 1</EditRate><IntrinsicDuration>24</IntrinsicDuration><EntryPoint>0</EntryPoint><Duration>24</Duration><Hash>iTTXhr9BviLgys5ldPFRzPXP2GM=</Hash></MainSound><axd:AuxData xmlns:axd="http://www.dolby.com/schemas/2012/AD"><Id>urn:uuid:73f2a92b-f963-47cc-a3d7-c7ca2fd10a64</Id><AnnotationText>20160218_NameOfFilm_FTR_OV_EN_A_dcs_r01.mxf</AnnotationText><EditRate>24 1</EditRate><IntrinsicDuration>1489</IntrinsicDuration><EntryPoint>0</EntryPoint><Duration>1489</Duration><Hash>jo8pQSebhScPN4EVvvpIUWRrDeM=</Hash><axd:DataType>urn:smpte:ul:060e2b34.04010105.0e090604.00000000</axd:DataType></axd:AuxData></AssetList></Reel></ReelList></CompositionPlaylist>
<?xml version="1.0" encoding="UTF-8"?>
-<PackingList xmlns="http://www.smpte-ra.org/schemas/429-8/2007/PKL"><Id>urn:uuid:a0488650-63ea-4b53-92a3-00a2c4e516fe</Id><AnnotationText>A Test DCP</AnnotationText><IssueDate>2012-07-17T04:45:18+00:00</IssueDate><Issuer>OpenDCP 0.0.25</Issuer><Creator>OpenDCP 0.0.25</Creator><AssetList><Asset><Id>urn:uuid:330161f5-434e-424a-a701-3d3f26700c52</Id><AnnotationText>330161f5-434e-424a-a701-3d3f26700c52</AnnotationText><Hash>xLrvmvHjV78RTv9EMZlcR6LMusY=</Hash><Size>1768</Size><Type>text/xml</Type></Asset><Asset><Id>urn:uuid:402c5a88-2512-4465-9c0b-cfa687dbc5d0</Id><AnnotationText>402c5a88-2512-4465-9c0b-cfa687dbc5d0</AnnotationText><Hash>eiqr9sUevuwoy7pprmgU6r0zBD8=</Hash><Size>26080</Size><Type>application/mxf</Type></Asset><Asset><Id>urn:uuid:78f4f085-0901-4a0f-96f9-e21987072a51</Id><AnnotationText>78f4f085-0901-4a0f-96f9-e21987072a51</AnnotationText><Hash>iTTXhr9BviLgys5ldPFRzPXP2GM=</Hash><Size>161326</Size><Type>application/mxf</Type></Asset></AssetList></PackingList>
+<PackingList xmlns="http://www.smpte-ra.org/schemas/429-8/2007/PKL"><Id>urn:uuid:a0488650-63ea-4b53-92a3-00a2c4e516fe</Id><AnnotationText>A Test DCP</AnnotationText><IssueDate>2012-07-17T04:45:18+00:00</IssueDate><Issuer>OpenDCP 0.0.25</Issuer><Creator>OpenDCP 0.0.25</Creator><AssetList><Asset><Id>urn:uuid:330161f5-434e-424a-a701-3d3f26700c52</Id><AnnotationText>330161f5-434e-424a-a701-3d3f26700c52</AnnotationText><Hash>1k7O7TxEnXk811VbcQz/cVYF0lI=</Hash><Size>1817</Size><Type>text/xml</Type></Asset><Asset><Id>urn:uuid:402c5a88-2512-4465-9c0b-cfa687dbc5d0</Id><AnnotationText>402c5a88-2512-4465-9c0b-cfa687dbc5d0</AnnotationText><Hash>eiqr9sUevuwoy7pprmgU6r0zBD8=</Hash><Size>26080</Size><Type>application/mxf</Type></Asset><Asset><Id>urn:uuid:78f4f085-0901-4a0f-96f9-e21987072a51</Id><AnnotationText>78f4f085-0901-4a0f-96f9-e21987072a51</AnnotationText><Hash>iTTXhr9BviLgys5ldPFRzPXP2GM=</Hash><Size>161326</Size><Type>application/mxf</Type></Asset></AssetList></PackingList>