Add option to analyse audio automatically when content is added (#673).
[dcpomatic.git] / src / lib / config.h
index 40b65534211439c5a29b19a22a2d417292e57856..2f68ea31cb7b91cc5e085f78fee121400ae87ef8 100644 (file)
 #define DCPOMATIC_CONFIG_H
 
 #include "isdcf_metadata.h"
-#include "video_content.h"
-#include <dcp/metadata.h>
-#include <dcp/certificate.h>
+#include "types.h"
 #include <dcp/certificate_chain.h>
 #include <boost/shared_ptr.hpp>
 #include <boost/signals2.hpp>
 #include <boost/filesystem.hpp>
 #include <vector>
 
-class ServerDescription;
-class Scaler;
-class Filter;
 class CinemaSoundProcessor;
 class DCPContentType;
 class Ratio;
@@ -90,6 +85,10 @@ public:
                return _servers;
        }
 
+       bool only_servers_encode () const {
+               return _only_servers_encode;
+       }
+
        Protocol tms_protocol () const {
                return _tms_protocol;
        }
@@ -227,6 +226,10 @@ public:
                return _log_types;
        }
 
+       bool automatic_audio_analysis () const {
+               return _automatic_audio_analysis;
+       }
+
 #ifdef DCPOMATIC_WINDOWS
        bool win32_console () const {
                return _win32_console;
@@ -251,6 +254,10 @@ public:
                maybe_set (_server_port_base, p);
        }
 
+       void set_only_servers_encode (bool o) {
+               maybe_set (_only_servers_encode, o);
+       }
+
        void set_tms_protocol (Protocol p) {
                maybe_set (_tms_protocol, p);
        }
@@ -404,6 +411,10 @@ public:
                maybe_set (_log_types, t);
        }
 
+       void set_automatic_audio_analysis (bool a) {
+               maybe_set (_automatic_audio_analysis, a);
+       }
+
 #ifdef DCPOMATIC_WINDOWS
        void set_win32_console (bool c) {
                maybe_set (_win32_console, c);
@@ -429,7 +440,7 @@ public:
 
 private:
        Config ();
-       static boost::filesystem::path file ();
+       static boost::filesystem::path file (bool create_directories = true);
        void read ();
        void set_defaults ();
        void set_kdm_email_to_default ();
@@ -455,6 +466,7 @@ private:
        bool _use_any_servers;
        /** J2K encoding servers that should definitely be used */
        std::vector<std::string> _servers;
+       bool _only_servers_encode;
        Protocol _tms_protocol;
        /** The IP address of a TMS that we can copy DCPs to */
        std::string _tms_ip;
@@ -501,6 +513,7 @@ private:
        /** maximum allowed J2K bandwidth in bits per second */
        int _maximum_j2k_bandwidth;
        int _log_types;
+       bool _automatic_audio_analysis;
 #ifdef DCPOMATIC_WINDOWS
        bool _win32_console;
 #endif