Add option to limit DCP output to the "Bv2.0 profile" (#2470).
[dcpomatic.git] / src / lib / film.h
index b1451c212092b2ec5435ef8cb00c6b46a3093008..b7a9f94ace3a03c62ab69102684672703aae1135 100644 (file)
 #include "dcp_text_track.h"
 #include "dcpomatic_time.h"
 #include "frame_rate_change.h"
+#include "named_channel.h"
+#include "resolution.h"
 #include "signaller.h"
 #include "transcode_job.h"
 #include "types.h"
+#include "util.h"
 #include <dcp/encrypted_kdm.h>
 #include <dcp/file.h>
 #include <dcp/key.h>
@@ -68,6 +71,7 @@ class Ratio;
 class Job;
 class Film;
 struct isdcf_name_test;
+struct isdcf_name_with_atmos;
 struct recover_test_2d_encrypted;
 struct atmos_encrypted_passthrough_test;
 
@@ -163,16 +167,7 @@ public:
        FrameRateChange active_frame_rate_change (dcpomatic::DCPTime) const;
        std::pair<double, double> speed_up_range (int dcp_frame_rate) const;
 
-       dcp::EncryptedKDM make_kdm (
-               dcp::Certificate recipient,
-               std::vector<std::string> trusted_devices,
-               boost::filesystem::path cpl_file,
-               dcp::LocalTime from,
-               dcp::LocalTime until,
-               dcp::Formulation formulation,
-               bool disable_forensic_marking_picture,
-               boost::optional<int> disable_forensic_marking_audio
-               ) const;
+       dcp::DecryptedKDM make_kdm(boost::filesystem::path cpl_file, dcp::LocalTime from, dcp::LocalTime until) const;
 
        int state_version () const {
                return _state_version;
@@ -212,9 +207,7 @@ public:
 
        bool last_written_by_earlier_than(int major, int minor, int micro) const;
 
-       /** Identifiers for the parts of our state;
-           used for signalling changes.
-       */
+       /** Identifiers for the parts of our state; used for signalling changes */
        enum class Property {
                NONE,
                NAME,
@@ -235,6 +228,7 @@ public:
                THREE_D,
                SEQUENCE,
                INTEROP,
+               LIMIT_TO_SMPTE_BV20,
                AUDIO_PROCESSOR,
                REEL_TYPE,
                REEL_LENGTH,
@@ -319,6 +313,10 @@ public:
                return _interop;
        }
 
+       bool limit_to_smpte_bv20() const {
+               return _limit_to_smpte_bv20;
+       }
+
        AudioProcessor const * audio_processor () const {
                return _audio_processor;
        }
@@ -440,6 +438,7 @@ public:
        void set_isdcf_date_today ();
        void set_sequence (bool);
        void set_interop (bool);
+       void set_limit_to_smpte_bv20(bool);
        void set_audio_processor (AudioProcessor const * processor);
        void set_reel_type (ReelType);
        void set_reel_length (int64_t);
@@ -490,6 +489,7 @@ public:
 private:
 
        friend struct ::isdcf_name_test;
+       friend struct ::isdcf_name_with_atmos;
        friend struct ::recover_test_2d_encrypted;
        friend struct ::atmos_encrypted_passthrough_test;
        template <class, class> friend class ChangeSignaller;
@@ -550,6 +550,7 @@ private:
        bool _three_d;
        bool _sequence;
        bool _interop;
+       bool _limit_to_smpte_bv20;
        AudioProcessor const * _audio_processor;
        ReelType _reel_type;
        /** Desired reel length in bytes, if _reel_type == REELTYPE_BY_LENGTH */