Merge master; fix destruction of Server; some test cleanups.
[dcpomatic.git] / src / lib / config.h
index ee11dcadbefb071cf606a07e9114275a5974c469..d82f520469c258f64b80b27d640a507f0503a962 100644 (file)
@@ -29,9 +29,8 @@
 #include <boost/signals2.hpp>
 #include <boost/filesystem.hpp>
 #include <dcp/metadata.h>
-#include "dci_metadata.h"
+#include "isdcf_metadata.h"
 #include "colour_conversion.h"
-#include "server.h"
 
 class ServerDescription;
 class Scaler;
@@ -116,9 +115,13 @@ public:
        std::list<int> allowed_dcp_frame_rates () const {
                return _allowed_dcp_frame_rates;
        }
+
+       bool allow_any_dcp_frame_rate () const {
+               return _allow_any_dcp_frame_rate;
+       }
        
-       DCIMetadata default_dci_metadata () const {
-               return _default_dci_metadata;
+       ISDCFMetadata default_isdcf_metadata () const {
+               return _default_isdcf_metadata;
        }
 
        boost::optional<std::string> language () const {
@@ -184,6 +187,10 @@ public:
        int maximum_j2k_bandwidth () const {
                return _maximum_j2k_bandwidth;
        }
+
+       int log_types () const {
+               return _log_types;
+       }
        
        /** @param n New number of local encoding threads */
        void set_num_local_encoding_threads (int n) {
@@ -241,8 +248,13 @@ public:
                changed ();
        }
 
-       void set_default_dci_metadata (DCIMetadata d) {
-               _default_dci_metadata = d;
+       void set_allow_any_dcp_frame_rate (bool a) {
+               _allow_any_dcp_frame_rate = a;
+               changed ();
+       }
+
+       void set_default_isdcf_metadata (ISDCFMetadata d) {
+               _default_isdcf_metadata = d;
                changed ();
        }
 
@@ -330,6 +342,11 @@ public:
                _maximum_j2k_bandwidth = b;
                changed ();
        }
+
+       void set_log_types (int t) {
+               _log_types = t;
+               changed ();
+       }
        
        boost::filesystem::path signer_chain_directory () const;
 
@@ -369,8 +386,10 @@ private:
        /** Our sound processor */
        SoundProcessor const * _sound_processor;
        std::list<int> _allowed_dcp_frame_rates;
-       /** Default DCI metadata for newly-created Films */
-       DCIMetadata _default_dci_metadata;
+       /** Allow any video frame rate for the DCP; if true, overrides _allowed_dcp_frame_rates */
+       bool _allow_any_dcp_frame_rate;
+       /** Default ISDCF metadata for newly-created Films */
+       ISDCFMetadata _default_isdcf_metadata;
        boost::optional<std::string> _language;
        int _default_still_length;
        Ratio const * _default_container;
@@ -390,6 +409,7 @@ private:
        bool _check_for_test_updates;
        /** maximum allowed J2K bandwidth in bits per second */
        int _maximum_j2k_bandwidth;
+       int _log_types;
 
        /** Singleton instance, or 0 */
        static Config* _instance;