summaryrefslogtreecommitdiff
path: root/src/reel_asset.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/reel_asset.cc')
-rw-r--r--src/reel_asset.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/reel_asset.cc b/src/reel_asset.cc
index 31422173..f30f4799 100644
--- a/src/reel_asset.cc
+++ b/src/reel_asset.cc
@@ -60,7 +60,7 @@ ReelAsset::ReelAsset (shared_ptr<Content> content, Fraction edit_rate, int64_t i
_annotation_text = content->file().leaf().string ();
}
-ReelAsset::ReelAsset (shared_ptr<const cxml::Node> node)
+ReelAsset::ReelAsset (cxml::ConstNodePtr node)
: Object (node->string_child ("Id"))
, _content (_id)
, _annotation_text (node->optional_string_child ("AnnotationText").get_value_or (""))
@@ -77,20 +77,20 @@ ReelAsset::ReelAsset (shared_ptr<const cxml::Node> node)
}
void
-ReelAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
+ReelAsset::write_to_cpl (cxml::NodePtr node, Standard standard) const
{
pair<string, string> const attr = cpl_node_attribute (standard);
- xmlpp::Element* a = node->add_child (cpl_node_name ());
+ cxml::NodePtr a = node->add_child (cpl_node_name ());
if (!attr.first.empty ()) {
a->set_attribute (attr.first, attr.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));
- a->add_child("Hash")->add_child_text (_content.object()->hash ());
+ a->add_child("Id")->set_content ("urn:uuid:" + _id);
+ a->add_child("AnnotationText")->set_content (_annotation_text);
+ a->add_child("EditRate")->set_content (String::compose ("%1 %2", _edit_rate.numerator, _edit_rate.denominator));
+ a->add_child("IntrinsicDuration")->set_content (raw_convert<string> (_intrinsic_duration));
+ a->add_child("EntryPoint")->set_content (raw_convert<string> (_entry_point));
+ a->add_child("Duration")->set_content (raw_convert<string> (_duration));
+ a->add_child("Hash")->set_content (_content.object()->hash ());
}
pair<string, string>