summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-01-08 09:58:56 +0000
committerCarl Hetherington <cth@carlh.net>2019-01-08 09:58:56 +0000
commitc763ce17ea1d2bf621a343c4893f5d0c390ec433 (patch)
treeafedaea84bc2d5ea6257063f58b9624cb05e95b1 /src
parent63bff141f70aa81e50a7cf927e5110a2bb504ae6 (diff)
Fix incorrect XML namespace in MXF header; I was using the prefix
instead of the namespace URI for what asdcplib calls TimedTextDescriptor::NamespaceName. Thanks to clairmeta; see https://github.com/Ymagis/ClairMeta/issues/72
Diffstat (limited to 'src')
-rw-r--r--src/smpte_subtitle_asset.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc
index 94b16d5b..f9406793 100644
--- a/src/smpte_subtitle_asset.cc
+++ b/src/smpte_subtitle_asset.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -64,6 +64,8 @@ using boost::dynamic_pointer_cast;
using boost::optional;
using namespace dcp;
+static string const subtitle_smpte_ns = "http://www.smpte-ra.org/schemas/428-7/2010/DCST";
+
SMPTESubtitleAsset::SMPTESubtitleAsset ()
: MXF (SMPTE)
, _intrinsic_duration (0)
@@ -280,7 +282,7 @@ SMPTESubtitleAsset::xml_as_string () const
{
xmlpp::Document doc;
xmlpp::Element* root = doc.create_root_node ("dcst:SubtitleReel");
- root->set_namespace_declaration ("http://www.smpte-ra.org/schemas/428-7/2010/DCST", "dcst");
+ root->set_namespace_declaration (subtitle_smpte_ns, "dcst");
root->set_namespace_declaration ("http://www.w3.org/2001/XMLSchema", "xs");
root->add_child("Id", "dcst")->add_child_text ("urn:uuid:" + _xml_id);
@@ -356,7 +358,7 @@ SMPTESubtitleAsset::write (boost::filesystem::path p) const
}
}
- descriptor.NamespaceName = "dcst";
+ descriptor.NamespaceName = subtitle_smpte_ns;
unsigned int c;
Kumu::hex2bin (_xml_id.c_str(), descriptor.AssetID, ASDCP::UUIDlen, &c);
DCP_ASSERT (c == Kumu::UUID_Length);