summaryrefslogtreecommitdiff
path: root/src/asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-02-08 13:30:42 +0000
committerCarl Hetherington <cth@carlh.net>2014-02-08 13:30:42 +0000
commit71de90f74085744d1c5ca35253eec003e41497a2 (patch)
tree637e6c2b6c2fa04da3d64864e0adcef30a0847dd /src/asset.cc
parent054cc86d5ba734c72780b07a772a55e3a7000a4f (diff)
Fix a couple of errors in Interop XML
Reported-by: Ivan Pullman
Diffstat (limited to 'src/asset.cc')
-rw-r--r--src/asset.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/asset.cc b/src/asset.cc
index 91a19e69..f6642d9c 100644
--- a/src/asset.cc
+++ b/src/asset.cc
@@ -31,6 +31,7 @@
#include "asset.h"
#include "util.h"
#include "metadata.h"
+#include "compose.hpp"
using namespace std;
using namespace boost;
@@ -51,14 +52,18 @@ Asset::Asset (boost::filesystem::path directory, boost::filesystem::path file_na
}
void
-Asset::write_to_pkl (xmlpp::Node* node) const
+Asset::write_to_pkl (xmlpp::Node* node, bool interop) const
{
xmlpp::Node* asset = node->add_child ("Asset");
asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
asset->add_child("AnnotationText")->add_child_text (_file_name.string ());
asset->add_child("Hash")->add_child_text (digest ());
asset->add_child("Size")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
- asset->add_child("Type")->add_child_text ("application/mxf");
+ if (interop) {
+ asset->add_child("Type")->add_child (String::compose ("application/x-smpte-mxf;asdcpKind=%1", asdcp_kind ()));
+ } else {
+ asset->add_child("Type")->add_child_text ("application/mxf");
+ }
}
void