Better behaviour if config fails to load.
[dcpomatic.git] / src / lib / config.h
index 6baa434a32fd10f08ea435572cf46dd802fbcb39..61c6bfa69f8fa1eb3d980244d8c63cdab25c3c56 100644 (file)
@@ -152,6 +152,10 @@ public:
                return _default_dcp_content_type;
        }
 
+       int default_dcp_audio_channels () const {
+               return _default_dcp_audio_channels;
+       }
+
        std::string dcp_issuer () const {
                return _dcp_issuer;
        }
@@ -258,6 +262,10 @@ public:
                return _cinemas_file;
        }
 
+       bool show_hints_before_make_dcp () const {
+               return _show_hints_before_make_dcp;
+       }
+
        /** @param n New number of local encoding threads */
        void set_num_local_encoding_threads (int n) {
                maybe_set (_num_local_encoding_threads, n);
@@ -351,6 +359,10 @@ public:
                maybe_set (_default_dcp_content_type, t);
        }
 
+       void set_default_dcp_audio_channels (int c) {
+               maybe_set (_default_dcp_audio_channels, c);
+       }
+
        void set_dcp_issuer (std::string i) {
                maybe_set (_dcp_issuer, i);
        }
@@ -458,6 +470,10 @@ public:
 
        void set_cinemas_file (boost::filesystem::path file);
 
+       void set_show_hints_before_make_dcp (bool s) {
+               maybe_set (_show_hints_before_make_dcp, s);
+       }
+
        void clear_history () {
                _history.clear ();
                changed ();
@@ -467,6 +483,10 @@ public:
 
        void changed (Property p = OTHER);
        boost::signals2::signal<void (Property)> Changed;
+       /** Emitted if ::read() failed on an existing Config file.  There is nothing
+           a listener can do about it: this is just for information.
+       */
+       static boost::signals2::signal<void ()> FailedToLoad;
 
        void write () const;
 
@@ -529,6 +549,7 @@ private:
        int _default_still_length;
        Ratio const * _default_container;
        DCPContentType const * _default_dcp_content_type;
+       int _default_dcp_audio_channels;
        std::string _dcp_issuer;
        std::string _dcp_creator;
        int _default_j2k_bandwidth;
@@ -563,6 +584,7 @@ private:
        std::vector<boost::filesystem::path> _history;
        std::vector<dcp::EncryptedKDM> _dkdms;
        boost::filesystem::path _cinemas_file;
+       bool _show_hints_before_make_dcp;
 
        /** Singleton instance, or 0 */
        static Config* _instance;