Rename j2k_bandwidth -> video_bit_rate.
[dcpomatic.git] / src / lib / config.h
index dce4aafefdaf8aa849f85e63a562c335a6d006df..05421c20a7688ddf6b3fc8c4ea7667d16b151931 100644 (file)
@@ -79,6 +79,8 @@ public:
        boost::filesystem::path default_directory_or (boost::filesystem::path a) const;
        boost::filesystem::path default_kdm_directory_or (boost::filesystem::path a) const;
 
+       void load_from_zip(boost::filesystem::path zip_file);
+
        enum Property {
                USE_ANY_SERVERS,
                SERVERS,
@@ -95,6 +97,9 @@ public:
                AUTO_CROP_THRESHOLD,
                ALLOW_SMPTE_BV20,
                ISDCF_NAME_PART_LENGTH,
+#ifdef DCPOMATIC_GROK
+               GROK,
+#endif
                OTHER
        };
 
@@ -227,8 +232,8 @@ public:
                return _dcp_j2k_comment;
        }
 
-       int default_j2k_bandwidth () const {
-               return _default_j2k_bandwidth;
+       int64_t default_video_bit_rate() const {
+               return _default_video_bit_rate;
        }
 
        int default_audio_delay () const {
@@ -343,8 +348,8 @@ public:
                return _check_for_test_updates;
        }
 
-       int maximum_j2k_bandwidth () const {
-               return _maximum_j2k_bandwidth;
+       int64_t maximum_video_bit_rate() const {
+               return _maximum_video_bit_rate;
        }
 
        int log_types () const {
@@ -529,6 +534,14 @@ public:
                return _player_mode;
        }
 
+       bool player_restricted_menus() const {
+               return _player_restricted_menus;
+       }
+
+       bool playlist_editor_restricted_menus() const {
+               return _playlist_editor_restricted_menus;
+       }
+
        int image_display () const {
                return _image_display;
        }
@@ -619,6 +632,28 @@ public:
                return _allow_smpte_bv20;
        }
 
+#ifdef DCPOMATIC_GROK
+       class Grok
+       {
+       public:
+               Grok() = default;
+               Grok(cxml::ConstNodePtr node);
+
+               void as_xml(xmlpp::Element* node) const;
+
+               bool enable = false;
+               boost::filesystem::path binary_location;
+               int selected = 0;
+               std::string licence_server;
+               int licence_port = 5000;
+               std::string licence;
+       };
+
+       boost::optional<Grok> grok() const {
+               return _grok;
+       }
+#endif
+
        int isdcf_name_part_length() const {
                return _isdcf_name_part_length;
        }
@@ -775,8 +810,8 @@ public:
                maybe_set (_dcp_j2k_comment, c);
        }
 
-       void set_default_j2k_bandwidth (int b) {
-               maybe_set (_default_j2k_bandwidth, b);
+       void set_default_video_bit_rate(int64_t b) {
+               maybe_set(_default_video_bit_rate, b);
        }
 
        void set_default_audio_delay (int d) {
@@ -898,8 +933,8 @@ public:
                maybe_set (_check_for_test_updates, c);
        }
 
-       void set_maximum_j2k_bandwidth (int b) {
-               maybe_set (_maximum_j2k_bandwidth, b);
+       void set_maximum_video_bit_rate(int64_t b) {
+               maybe_set(_maximum_video_bit_rate, b);
        }
 
        void set_log_types (int t) {
@@ -1200,10 +1235,15 @@ public:
                maybe_set(_allow_smpte_bv20, allow, ALLOW_SMPTE_BV20);
        }
 
+#ifdef DCPOMATIC_GROK
+       void set_grok(Grok const& grok);
+#endif
+
        void set_isdcf_name_part_length(int length) {
                maybe_set(_isdcf_name_part_length, length, ISDCF_NAME_PART_LENGTH);
        }
 
+
        void changed (Property p = OTHER);
        boost::signals2::signal<void (Property)> Changed;
        /** Emitted if read() failed on an existing Config file.  There is nothing
@@ -1340,7 +1380,7 @@ private:
        std::string _dcp_product_name;
        std::string _dcp_product_version;
        std::string _dcp_j2k_comment;
-       int _default_j2k_bandwidth;
+       int64_t _default_video_bit_rate;
        int _default_audio_delay;
        bool _default_interop;
        boost::optional<dcp::LanguageTag> _default_audio_language;
@@ -1377,8 +1417,8 @@ private:
        /** true to check for updates on startup */
        bool _check_for_updates;
        bool _check_for_test_updates;
-       /** maximum allowed J2K bandwidth in bits per second */
-       int _maximum_j2k_bandwidth;
+       /** maximum allowed video bit rate in bits per second */
+       int64_t _maximum_video_bit_rate;
        int _log_types;
        bool _analyse_ebur128;
        bool _automatic_audio_analysis;
@@ -1417,6 +1457,8 @@ private:
        boost::optional<std::string> _gdc_username;
        boost::optional<std::string> _gdc_password;
        PlayerMode _player_mode;
+       bool _player_restricted_menus = false;
+       bool _playlist_editor_restricted_menus = false;
        int _image_display;
        VideoViewType _video_view_type;
        bool _respect_kdm_validity_periods;
@@ -1445,6 +1487,10 @@ private:
        bool _allow_smpte_bv20;
        int _isdcf_name_part_length;
 
+#ifdef DCPOMATIC_GROK
+       boost::optional<Grok> _grok;
+#endif
+
        ExportConfig _export;
 
        static int const _current_version;