summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-02-12 23:22:28 +0000
committerCarl Hetherington <cth@carlh.net>2017-02-12 23:22:28 +0000
commit8f964bf49664948312fdfaafd0e9fe20f66c65d6 (patch)
tree7d62dfc8e3e12922c84783077186d1b184a6fc0d /src
parentdb86ed51ba8de94306c949d7b209a7f5f6b75075 (diff)
Get assetmap and PKL AnnotationText from XMLMetadata.
Diffstat (limited to 'src')
-rw-r--r--src/dcp.cc8
-rw-r--r--src/metadata.cc1
-rw-r--r--src/metadata.h1
3 files changed, 4 insertions, 6 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index f99d3433..884e3cb5 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -323,11 +323,7 @@ DCP::write_pkl (string file, Standard standard, string pkl_uuid, XMLMetadata met
}
pkl->add_child("Id")->add_child_text ("urn:uuid:" + pkl_uuid);
-
- /* XXX: this is a bit of a hack */
- DCP_ASSERT (cpls().size() > 0);
- pkl->add_child("AnnotationText")->add_child_text (cpls().front()->annotation_text ());
-
+ pkl->add_child("AnnotationText")->add_child_text (metadata.annotation_text);
pkl->add_child("IssueDate")->add_child_text (metadata.issue_date);
pkl->add_child("Issuer")->add_child_text (metadata.issuer);
pkl->add_child("Creator")->add_child_text (metadata.creator);
@@ -412,7 +408,7 @@ DCP::write_assetmap (Standard standard, string pkl_uuid, boost::filesystem::path
}
root->add_child("Id")->add_child_text ("urn:uuid:" + make_uuid());
- root->add_child("AnnotationText")->add_child_text ("Created by " + metadata.creator);
+ root->add_child("AnnotationText")->add_child_text (metadata.annotation_text);
switch (standard) {
case INTEROP:
diff --git a/src/metadata.cc b/src/metadata.cc
index dbe80919..fc6bb396 100644
--- a/src/metadata.cc
+++ b/src/metadata.cc
@@ -64,6 +64,7 @@ MXFMetadata::read (ASDCP::WriterInfo const & info)
XMLMetadata::XMLMetadata ()
: issuer ("libdcp" LIBDCP_VERSION)
, creator ("libdcp" LIBDCP_VERSION)
+ , annotation_text ("Created by libdcp" LIBDCP_VERSION)
{
set_issue_date_now ();
}
diff --git a/src/metadata.h b/src/metadata.h
index 91a44ec4..a22d0c2b 100644
--- a/src/metadata.h
+++ b/src/metadata.h
@@ -77,6 +77,7 @@ public:
std::string issuer;
std::string creator;
std::string issue_date;
+ std::string annotation_text;
};
}