summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-05 14:42:28 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-05 14:42:28 +0100
commit943e75e0ac5730714f3823771f127fe78e4cf82b (patch)
tree42e3668973fab1f76c9b0e616335e73cdf39f372 /src
parentb06b12ad345ef9aadc2f53228cec1036e6174f29 (diff)
Fix rebase onto 1.0.
Diffstat (limited to 'src')
-rw-r--r--src/reel_encryptable_asset.cc18
-rw-r--r--src/reel_picture_asset.cc4
-rw-r--r--src/reel_sound_asset.cc5
3 files changed, 5 insertions, 22 deletions
diff --git a/src/reel_encryptable_asset.cc b/src/reel_encryptable_asset.cc
index 957fab28..f3bd7c66 100644
--- a/src/reel_encryptable_asset.cc
+++ b/src/reel_encryptable_asset.cc
@@ -51,21 +51,3 @@ ReelEncryptableAsset::ReelEncryptableAsset (shared_ptr<const cxml::Node> node)
_key_id = _key_id.get().substr (9);
}
}
-
-void
-ReelEncryptableAsset::write_to_cpl (xmlpp::Node* node, Standard s) const
-{
- ReelAsset::write_to_cpl (node, s);
-
- xmlpp::Node::NodeList c = node->get_children ();
- xmlpp::Node::NodeList::iterator i = c.begin();
- while (i != c.end() && (*i)->get_name() != cpl_node_name ()) {
- ++i;
- }
-
- DCP_ASSERT (i != c.end ());
-
- if (_key_id) {
- (*i)->add_child("KeyId")->add_child_text ("urn:uuid:" + _key_id.get ());
- }
-}
diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc
index a989f72b..92a51839 100644
--- a/src/reel_picture_asset.cc
+++ b/src/reel_picture_asset.cc
@@ -87,10 +87,10 @@ ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
);
}
- if (!key_id ().empty ()) {
+ if (key_id ()) {
/* Find <Hash> */
xmlpp::Node* hash = find_child (mp, "Hash");
- mp->add_child_before (hash, "KeyId")->add_child_text ("urn:uuid:" + key_id ());
+ mp->add_child_before (hash, "KeyId")->add_child_text ("urn:uuid:" + key_id().get ());
}
}
diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc
index 131672b8..49049e5f 100644
--- a/src/reel_sound_asset.cc
+++ b/src/reel_sound_asset.cc
@@ -24,6 +24,7 @@
#include "reel_sound_asset.h"
#include "dcp_assert.h"
#include <libcxml/cxml.h>
+#include <libxml++/libxml++.h>
using std::string;
using boost::shared_ptr;
@@ -59,11 +60,11 @@ ReelSoundAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
ReelAsset::write_to_cpl (node, standard);
- if (!key_id ().empty ()) {
+ if (key_id ()) {
/* Find <MainSound> */
xmlpp::Node* ms = find_child (node, cpl_node_name ());
/* Find <Hash> */
xmlpp::Node* hash = find_child (ms, "Hash");
- ms->add_child_before (hash, "KeyId")->add_child_text ("urn:uuid:" + key_id ());
+ ms->add_child_before (hash, "KeyId")->add_child_text ("urn:uuid:" + key_id().get ());
}
}