Missing finalize() in dcpdecryptmxf.
[libdcp.git] / src / cpl.h
index 72818fb14d98418f61a48c07f0865fb46edbef04..9c85dccd502fffafa7a454ef58e0e5b49b3692a1 100644 (file)
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -72,7 +72,7 @@ class DecryptedKDM;
 class CPL : public Asset
 {
 public:
-       CPL (std::string annotation_text, ContentKind content_kind);
+       CPL (std::string annotation_text, ContentKind content_kind, Standard standard);
 
        /** Construct a CPL object from a XML file */
        explicit CPL (boost::filesystem::path file);
@@ -81,7 +81,7 @@ public:
                std::shared_ptr<const Asset> other,
                EqualityOptions options,
                NoteHandler note
-               ) const;
+               ) const override;
 
        /** Add a reel to this CPL
         *  @param reel Reel to add
@@ -112,12 +112,10 @@ public:
        /** Write an CompositonPlaylist XML file
         *
         *  @param file Filename to write
-        *  @param standard INTEROP or SMPTE
         *  @param signer Signer to sign the CPL, or 0 to add no signature
         */
        void write_xml (
                boost::filesystem::path file,
-               Standard standard,
                std::shared_ptr<const CertificateChain>
                ) const;
 
@@ -301,7 +299,7 @@ public:
 
        void set_additional_subtitle_languages (std::vector<dcp::LanguageTag> const& lang);
 
-       boost::optional<Standard> standard () const {
+       Standard standard () const {
                return _standard;
        }
 
@@ -309,7 +307,7 @@ public:
 
 protected:
        /** @return type string for PKLs for this asset */
-       std::string pkl_type (Standard standard) const;
+       std::string pkl_type (Standard standard) const override;
 
 private:
        friend struct ::verify_invalid_language3;
@@ -325,6 +323,10 @@ private:
        ContentKind _content_kind;                  ///< &lt;ContentKind&gt;
        std::vector<ContentVersion> _content_versions;
        std::vector<Rating> _ratings;
+       /** ID for CompositionMetadataAsset tag; either a random one, ready for writing a new tag,
+        *  or the one read in from the existing CPL.
+        */
+       std::string _cpl_metadata_id = make_uuid();
        /** Human-readable name of the composition, without any metadata (i.e. no -FTR-EN-XX- etc.) */
        boost::optional<std::string> _full_content_title_text;
        boost::optional<std::string> _full_content_title_text_language;
@@ -349,7 +351,7 @@ private:
        std::vector<std::shared_ptr<Reel>> _reels;
 
        /** Standard of CPL that was read in */
-       boost::optional<Standard> _standard;
+       Standard _standard;
 };