summaryrefslogtreecommitdiff
path: root/src/lib/dcp_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-06-06 21:16:54 +0200
committerCarl Hetherington <cth@carlh.net>2024-06-06 21:16:54 +0200
commitcfa0a559a8feec79d1e8acd20d4b11ef8cd01513 (patch)
treeee0b1bd5b6621046693cc530c94a87844b43fee7 /src/lib/dcp_content.cc
parentc3fc0d69e0563099d40e0a4ab787c0d3264f865b (diff)
Store the video encoding of a DCP in the metadata (J2K/MPEG2).
Diffstat (limited to 'src/lib/dcp_content.cc')
-rw-r--r--src/lib/dcp_content.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index 465eff706..5fb532d03 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -139,6 +139,11 @@ DCPContent::DCPContent (cxml::ConstNodePtr node, int version)
DCPOMATIC_ASSERT (false);
}
}
+
+ if (auto encoding = node->optional_string_child("VideoEncoding")) {
+ _video_encoding = video_encoding_from_string(*encoding);
+ }
+
_three_d = node->optional_bool_child("ThreeD").get_value_or (false);
auto ck = node->optional_string_child("ContentKind");
@@ -306,6 +311,7 @@ DCPContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
_needs_assets = examiner->needs_assets ();
_kdm_valid = examiner->kdm_valid ();
_standard = examiner->standard ();
+ _video_encoding = examiner->video_encoding();
_three_d = examiner->three_d ();
_content_kind = examiner->content_kind ();
_cpl = examiner->cpl ();
@@ -407,6 +413,7 @@ DCPContent::as_xml(xmlpp::Element* element, bool with_paths) const
DCPOMATIC_ASSERT (false);
}
}
+ cxml::add_text_child(element, "VideoEncoding", video_encoding_to_string(_video_encoding));
cxml::add_text_child(element, "ThreeD", _three_d ? "1" : "0");
if (_content_kind) {
cxml::add_text_child(element, "ContentKind", _content_kind->name());