Make CPL metadata writing optional.
[dcpomatic.git] / src / lib / film.h
index 5318d6a12aa837229d4e4ea6ff94ffe1a958fdb8..8d0d6187aa92fef705964c83a018a79d3a02fa92 100644 (file)
@@ -210,6 +210,8 @@ public:
                return _tolerant;
        }
 
+       bool last_written_by_earlier_than(int major, int minor, int micro) const;
+
        /** Identifiers for the parts of our state;
            used for signalling changes.
        */
@@ -255,6 +257,7 @@ public:
                RED_BAND,
                TWO_D_VERSION_OF_THREE_D,
                LUMINANCE,
+               WRITE_CPL_METADATA,
        };
 
 
@@ -416,6 +419,10 @@ public:
                return _audio_frame_rate;
        }
 
+       bool write_cpl_metadata() const {
+               return _write_cpl_metadata;
+       }
+
        /* SET */
 
        void set_directory (boost::filesystem::path);
@@ -463,6 +470,7 @@ public:
        void set_luminance (boost::optional<dcp::Luminance> l = boost::none);
        void set_audio_language (boost::optional<dcp::LanguageTag> language);
        void set_audio_frame_rate (int rate);
+       void set_write_cpl_metadata(bool write);
 
        void add_ffoc_lfoc (Markers& markers) const;
 
@@ -516,6 +524,8 @@ private:
         */
        boost::optional<boost::filesystem::path> _directory;
 
+       boost::optional<std::string> _last_written_by;
+
        /** Name for DCP-o-matic */
        std::string _name;
        /** True if a auto-generated ISDCF-compliant name should be used for our DCP */
@@ -574,6 +584,7 @@ private:
        boost::optional<dcp::Luminance> _luminance;
        boost::optional<dcp::LanguageTag> _audio_language;
        int _audio_frame_rate = 48000;
+       bool _write_cpl_metadata = true;
 
        int _state_version;