summaryrefslogtreecommitdiff
path: root/src/lib/dcp_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-29 00:13:49 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-29 00:13:49 +0100
commit92f024ea58c7279b8096e5e9f60f9cb2613e8a91 (patch)
tree02c3b4a91effa6ca53ba511b60d6451c1b1f2009 /src/lib/dcp_content.cc
parentd6825b500b89430cb018d311c090d794ec18faf3 (diff)
swaroop: Disable play/stop/pause and slider during ad content.
Diffstat (limited to 'src/lib/dcp_content.cc')
-rw-r--r--src/lib/dcp_content.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index 3498cc961..7301e5373 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -133,6 +133,11 @@ DCPContent::DCPContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
}
}
_three_d = node->optional_bool_child("ThreeD").get_value_or (false);
+
+ optional<string> ck = node->optional_string_child("ContentKind");
+ if (ck) {
+ _content_kind = dcp::content_kind_from_string (*ck);
+ }
_cpl = node->optional_string_child("CPL");
BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("ReelLength")) {
_reel_lengths.push_back (raw_convert<int64_t> (i->content ()));
@@ -209,6 +214,7 @@ DCPContent::examine (shared_ptr<Job> job)
_kdm_valid = examiner->kdm_valid ();
_standard = examiner->standard ();
_three_d = examiner->three_d ();
+ _content_kind = examiner->content_kind ();
_cpl = examiner->cpl ();
_reel_lengths = examiner->reel_lengths ();
}
@@ -301,6 +307,9 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
}
}
node->add_child("ThreeD")->add_child_text (_three_d ? "1" : "0");
+ if (_content_kind) {
+ node->add_child("ContentKind")->add_child_text(dcp::content_kind_to_string(*_content_kind));
+ }
if (_cpl) {
node->add_child("CPL")->add_child_text (_cpl.get ());
}