summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-28 00:44:36 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-28 00:44:36 +0000
commitd88c2244d4f90d54164fcc856c3ba73809756381 (patch)
tree9e330e066c2318ed1b162df6946affc94ee06a81 /src
parent04b4d9f08ee30eb4dc4e62cddc4b332c69d18ac0 (diff)
Various test fixes.
Diffstat (limited to 'src')
-rw-r--r--src/cpl.cc12
-rw-r--r--src/cpl.h2
-rw-r--r--src/dcp.cc12
-rw-r--r--src/kdm.cc6
-rw-r--r--src/reel_asset.cc2
5 files changed, 17 insertions, 17 deletions
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<shared_ptr<const Content> >
-CPL::assets () const
+CPL::content () const
{
- list<shared_ptr<const Content> > a;
+ list<shared_ptr<const Content> > c;
for (list<shared_ptr<Reel> >::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<boost::shared_ptr<const Content> > assets () const;
+ std::list<boost::shared_ptr<const Content> > 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<const Signer> 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<shared_ptr<CPL> > cpl = cpls ();
for (list<shared_ptr<CPL> >::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<shared_ptr<CPL> >
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<shared_ptr<const Content> > assets = cpl->assets ();
- for (list<shared_ptr<const Content> >::iterator i = assets.begin(); i != assets.end(); ++i) {
+ list<shared_ptr<const Content> > content = cpl->content ();
+ for (list<shared_ptr<const Content> >::iterator i = content.begin(); i != content.end(); ++i) {
/* XXX: non-MXF assets? */
shared_ptr<const MXF> mxf = boost::dynamic_pointer_cast<const MXF> (*i);
if (mxf) {
@@ -144,7 +144,7 @@ KDM::KDM (
/* AuthenticatedPrivate */
- for (list<shared_ptr<const Content> >::iterator i = assets.begin(); i != assets.end(); ++i) {
+ for (list<shared_ptr<const Content> >::iterator i = content.begin(); i != content.end(); ++i) {
/* XXX: non-MXF assets? */
shared_ptr<const MXF> mxf = boost::dynamic_pointer_cast<const MXF> (*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<const cxml::Node> node)
, _intrinsic_duration (node->number_child<int64_t> ("IntrinsicDuration"))
, _entry_point (node->number_child<int64_t> ("EntryPoint"))
, _duration (node->number_child<int64_t> ("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) {