Read scope attribute of ReleaseTerritory.
authorCarl Hetherington <cth@carlh.net>
Sun, 17 Jan 2021 21:06:20 +0000 (22:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 17 Jan 2021 21:06:20 +0000 (22:06 +0100)
src/cpl.cc
src/cpl.h

index caf4be1e89c58b75bd1d13f8644f5dc64954073f..1775183db0d99f5ea08d6af9fe223e199fccdacf 100644 (file)
@@ -233,6 +233,9 @@ CPL::read_composition_metadata_asset (cxml::ConstNodePtr node)
        _full_content_title_text_language = fctt->optional_string_attribute("language");
 
        _release_territory = node->optional_string_child("ReleaseTerritory");
+       if (_release_territory) {
+               _release_territory_scope = node->node_child("ReleaseTerritory")->optional_string_attribute("scope");
+       }
 
        auto vn = node->optional_node_child("VersionNumber");
        if (vn) {
index 3bfffcb53bce348f88a43c60ff053e94935e1c0b..158d100f7ba7cb222da2f9bdc7effd93365972e5 100644 (file)
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -187,6 +187,10 @@ public:
                _release_territory = t.subtag();
        }
 
+       boost::optional<std::string> release_territory_scope () const {
+               return _release_territory_scope;
+       }
+
        boost::optional<int> version_number () const {
                return _version_number;
        }
@@ -302,6 +306,7 @@ private:
         *  but must be set as a dcp::LanguageTag to try to ensure that we create compliant output.
         */
        boost::optional<std::string> _release_territory;
+       boost::optional<std::string> _release_territory_scope;
        boost::optional<int> _version_number;
        boost::optional<Status> _status;
        boost::optional<std::string> _chain;