summaryrefslogtreecommitdiff
path: root/src/cpl.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-09-02 22:43:19 +0200
committerCarl Hetherington <cth@carlh.net>2022-09-02 22:43:19 +0200
commitd9b957d7da123e4b6e5f2449f5d45c12fce225f8 (patch)
tree46fb87683ff357aff3b886a5e6201a9bb390d3a9 /src/cpl.cc
parentfeff11732f33487a5bec6fb568f43f86c1a0ab0b (diff)
Replace ContentKind enum with a class.
Diffstat (limited to 'src/cpl.cc')
-rw-r--r--src/cpl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 1c449f8f..5e0ca2cc 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -122,7 +122,7 @@ CPL::CPL (boost::filesystem::path file)
_creator = f.optional_string_child("Creator").get_value_or("");
_issue_date = f.string_child ("IssueDate");
_content_title_text = f.string_child ("ContentTitleText");
- _content_kind = content_kind_from_string (f.string_child ("ContentKind"));
+ _content_kind = ContentKind::from_name(f.string_child("ContentKind"));
shared_ptr<cxml::Node> content_version = f.optional_node_child ("ContentVersion");
if (content_version) {
/* XXX: SMPTE should insist that Id is present */
@@ -198,7 +198,7 @@ CPL::write_xml (boost::filesystem::path file, shared_ptr<const CertificateChain>
root->add_child("Issuer")->add_child_text (_issuer);
root->add_child("Creator")->add_child_text (_creator);
root->add_child("ContentTitleText")->add_child_text (_content_title_text);
- root->add_child("ContentKind")->add_child_text (content_kind_to_string (_content_kind));
+ root->add_child("ContentKind")->add_child_text(_content_kind.name());
if (_content_versions.empty()) {
ContentVersion cv;
cv.as_xml (root);