From d88c2244d4f90d54164fcc856c3ba73809756381 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 28 Jan 2014 00:44:36 +0000 Subject: Various test fixes. --- src/cpl.cc | 12 ++++++------ src/cpl.h | 2 +- src/dcp.cc | 12 ++++++------ src/kdm.cc | 6 +++--- src/reel_asset.cc | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/cpl.cc b/src/cpl.cc index 96afc088..99c14d40 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -140,22 +140,22 @@ CPL::write_xml (boost::filesystem::path file, Standard standard, XMLMetadata met } list > -CPL::assets () const +CPL::content () const { - list > a; + list > c; for (list >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) { if ((*i)->main_picture ()) { - a.push_back ((*i)->main_picture()->mxf ()); + c.push_back ((*i)->main_picture()->mxf ()); } if ((*i)->main_sound ()) { - a.push_back ((*i)->main_sound()->mxf ()); + c.push_back ((*i)->main_sound()->mxf ()); } if ((*i)->main_subtitle ()) { - a.push_back ((*i)->main_subtitle()->subtitle_content ()); + c.push_back ((*i)->main_subtitle()->subtitle_content ()); } } - return a; + return c; } bool diff --git a/src/cpl.h b/src/cpl.h index 4c3f9bfa..2066130e 100644 --- a/src/cpl.h +++ b/src/cpl.h @@ -82,7 +82,7 @@ public: return _reels; } - std::list > assets () const; + std::list > content () const; bool encrypted () const; diff --git a/src/dcp.cc b/src/dcp.cc index 1925ac0b..e4a5678c 100644 --- a/src/dcp.cc +++ b/src/dcp.cc @@ -328,17 +328,17 @@ DCP::write_xml ( shared_ptr signer ) { - string const pkl_uuid = make_uuid (); - boost::filesystem::path const pkl_path = write_pkl (standard, pkl_uuid, metadata, signer); - - write_volindex (standard); - write_assetmap (standard, pkl_uuid, boost::filesystem::file_size (pkl_path), metadata); - list > cpl = cpls (); for (list >::const_iterator i = cpl.begin(); i != cpl.end(); ++i) { string const filename = (*i)->id() + "_cpl.xml"; (*i)->write_xml (_directory / filename, standard, metadata, signer); } + + string const pkl_uuid = make_uuid (); + boost::filesystem::path const pkl_path = write_pkl (standard, pkl_uuid, metadata, signer); + + write_volindex (standard); + write_assetmap (standard, pkl_uuid, boost::filesystem::file_size (pkl_path), metadata); } list > diff --git a/src/kdm.cc b/src/kdm.cc index c99fc21a..fe7fe393 100644 --- a/src/kdm.cc +++ b/src/kdm.cc @@ -130,8 +130,8 @@ KDM::KDM ( */ apu.authorized_device_info.device_list.push_back ("2jmj7l5rSw0yVb/vlWAYkK/YBwk="); - list > assets = cpl->assets (); - for (list >::iterator i = assets.begin(); i != assets.end(); ++i) { + list > content = cpl->content (); + for (list >::iterator i = content.begin(); i != content.end(); ++i) { /* XXX: non-MXF assets? */ shared_ptr mxf = boost::dynamic_pointer_cast (*i); if (mxf) { @@ -144,7 +144,7 @@ KDM::KDM ( /* AuthenticatedPrivate */ - for (list >::iterator i = assets.begin(); i != assets.end(); ++i) { + for (list >::iterator i = content.begin(); i != content.end(); ++i) { /* XXX: non-MXF assets? */ shared_ptr mxf = boost::dynamic_pointer_cast (*i); if (mxf) { diff --git a/src/reel_asset.cc b/src/reel_asset.cc index 5fa59fc2..b25aeb15 100644 --- a/src/reel_asset.cc +++ b/src/reel_asset.cc @@ -60,7 +60,7 @@ ReelAsset::ReelAsset (boost::shared_ptr node) , _intrinsic_duration (node->number_child ("IntrinsicDuration")) , _entry_point (node->number_child ("EntryPoint")) , _duration (node->number_child ("Duration")) - , _hash (node->string_child ("Hash")) + , _hash (node->optional_string_child ("Hash").get_value_or ("")) , _key_id (node->optional_string_child ("KeyId").get_value_or ("")) { if (_id.length() > 9) { -- cgit v1.2.3