summaryrefslogtreecommitdiff
path: root/src/reel_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-09-13 10:33:27 +0100
committerCarl Hetherington <cth@carlh.net>2016-09-13 10:33:27 +0100
commitf40c9704ce44234558bba1ad15de42a50475f1e3 (patch)
tree23b9351c4996fe19a3f455ffc0915bcea58b6830 /src/reel_asset.cc
parentf7c73615a49d308040a4a5d40677ecab08c21841 (diff)
Various fixes to incorrect Atmos read/write wrt XML namespaces.
Diffstat (limited to 'src/reel_asset.cc')
-rw-r--r--src/reel_asset.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/reel_asset.cc b/src/reel_asset.cc
index 60c3242c..bed05dfa 100644
--- a/src/reel_asset.cc
+++ b/src/reel_asset.cc
@@ -95,11 +95,15 @@ ReelAsset::ReelAsset (shared_ptr<const cxml::Node> node)
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));
@@ -117,6 +121,12 @@ ReelAsset::cpl_node_attribute (Standard) const
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
{