using boost::dynamic_pointer_cast;
using namespace dcp;
+static string const cpl_interop_ns = "http://www.digicine.com/PROTO-ASDCP-CPL-20040511#";
+static string const cpl_smpte_ns = "http://www.smpte-ra.org/schemas/429-7/2006/CPL";
+
CPL::CPL (string annotation_text, ContentKind content_kind)
: _annotation_text (annotation_text)
/* default _content_title_text to _annotation_text */
xmlpp::Document doc;
xmlpp::Element* root;
if (standard == INTEROP) {
- root = doc.create_root_node ("CompositionPlaylist", "http://www.digicine.com/PROTO-ASDCP-CPL-20040511#");
+ root = doc.create_root_node ("CompositionPlaylist", cpl_interop_ns);
} else {
- root = doc.create_root_node ("CompositionPlaylist", "http://www.smpte-ra.org/schemas/429-7/2006/CPL");
+ root = doc.create_root_node ("CompositionPlaylist", cpl_smpte_ns);
}
if (signer) {
using boost::algorithm::starts_with;
using namespace dcp;
+static string const assetmap_interop_ns = "http://www.digicine.com/PROTO-ASDCP-AM-20040311#";
+static string const assetmap_smpte_ns = "http://www.smpte-ra.org/schemas/429-9/2007/AM";
+static string const pkl_interop_ns = "http://www.digicine.com/PROTO-ASDCP-PKL-20040311#";
+static string const pkl_smpte_ns = "http://www.smpte-ra.org/schemas/429-8/2007/PKL";
+static string const volindex_interop_ns = "http://www.digicine.com/PROTO-ASDCP-AM-20040311#";
+static string const volindex_smpte_ns = "http://www.smpte-ra.org/schemas/429-9/2007/AM";
+
DCP::DCP (boost::filesystem::path directory)
: _directory (directory)
{
xmlpp::Document doc;
xmlpp::Element* pkl;
if (standard == INTEROP) {
- pkl = doc.create_root_node("PackingList", "http://www.digicine.com/PROTO-ASDCP-PKL-20040311#");
+ pkl = doc.create_root_node("PackingList", pkl_interop_ns);
} else {
- pkl = doc.create_root_node("PackingList", "http://www.smpte-ra.org/schemas/429-8/2007/PKL");
+ pkl = doc.create_root_node("PackingList", pkl_smpte_ns);
}
if (signer) {
switch (standard) {
case INTEROP:
- root = doc.create_root_node ("VolumeIndex", "http://www.digicine.com/PROTO-ASDCP-AM-20040311#");
+ root = doc.create_root_node ("VolumeIndex", volindex_interop_ns);
break;
case SMPTE:
- root = doc.create_root_node ("VolumeIndex", "http://www.smpte-ra.org/schemas/429-9/2007/AM");
+ root = doc.create_root_node ("VolumeIndex", volindex_smpte_ns);
break;
default:
DCP_ASSERT (false);
switch (standard) {
case INTEROP:
- root = doc.create_root_node ("AssetMap", "http://www.digicine.com/PROTO-ASDCP-AM-20040311#");
+ root = doc.create_root_node ("AssetMap", assetmap_interop_ns);
break;
case SMPTE:
- root = doc.create_root_node ("AssetMap", "http://www.smpte-ra.org/schemas/429-9/2007/AM");
+ root = doc.create_root_node ("AssetMap", assetmap_smpte_ns);
break;
default:
DCP_ASSERT (false);