Fix problems with FFmpeg files that have all-zero stream IDs.
[dcpomatic.git] / src / lib / config.h
index 3e8a975d6fcb4330c90edafda325168f8648717e..1fa54f669bd83130fa8502faf3c9789e9a5a8285 100644 (file)
@@ -59,13 +59,26 @@ public:
 
        boost::filesystem::path default_directory_or (boost::filesystem::path a) const;
 
-       /** @return port to use for J2K encoding servers */
-       int server_port () const {
-               return _server_port;
+       /** @return base port number to use for J2K encoding servers */
+       int server_port_base () const {
+               return _server_port_base;
        }
 
-       /** @return J2K encoding servers to use */
-       std::vector<ServerDescription> servers () const {
+       void set_use_any_servers (bool u) {
+               _use_any_servers = u;
+       }
+
+       bool use_any_servers () const {
+               return _use_any_servers;
+       }
+
+       /** @param s New list of servers */
+       void set_servers (std::vector<std::string> s) {
+               _servers = s;
+       }
+
+       /** @return Host names / IP addresses of J2K encoding servers that should definitely be used */
+       std::vector<std::string> servers () const {
                return _servers;
        }
 
@@ -73,7 +86,7 @@ public:
        std::string tms_ip () const {
                return _tms_ip;
        }
-
+       
        /** @return The path on a TMS that we should write DCPs to */
        std::string tms_path () const {
                return _tms_path;
@@ -134,6 +147,18 @@ public:
                return _colour_conversions;
        }
 
+       std::string mail_server () const {
+               return _mail_server;
+       }
+
+       std::string kdm_from () const {
+               return _kdm_from;
+       }
+
+       std::string kdm_email () const {
+               return _kdm_email;
+       }
+
        /** @param n New number of local encoding threads */
        void set_num_local_encoding_threads (int n) {
                _num_local_encoding_threads = n;
@@ -144,13 +169,8 @@ public:
        }
 
        /** @param p New server port */
-       void set_server_port (int p) {
-               _server_port = p;
-       }
-
-       /** @param s New list of servers */
-       void set_servers (std::vector<ServerDescription> s) {
-               _servers = s;
+       void set_server_port_base (int p) {
+               _server_port_base = p;
        }
 
        void set_reference_scaler (Scaler const * s) {
@@ -228,6 +248,18 @@ public:
        void set_colour_conversions (std::vector<PresetColourConversion> const & c) {
                _colour_conversions = c;
        }
+
+       void set_mail_server (std::string s) {
+               _mail_server = s;
+       }
+
+       void set_kdm_from (std::string f) {
+               _kdm_from = f;
+       }
+
+       void set_kdm_email (std::string e) {
+               _kdm_email = e;
+       }
        
        void write () const;
 
@@ -246,11 +278,14 @@ private:
        int _num_local_encoding_threads;
        /** default directory to put new films in */
        boost::filesystem::path _default_directory;
-       /** port to use for J2K encoding servers */
-       int _server_port;
-
-       /** J2K encoding servers to use */
-       std::vector<ServerDescription> _servers;
+       /** base port number to use for J2K encoding servers;
+        *  this port and the one above it will be used.
+        */
+       int _server_port_base;
+       /** true to broadcast on the `any' address to look for servers */
+       bool _use_any_servers;
+       /** J2K encoding servers that should definitely be used */
+       std::vector<std::string> _servers;
        /** Scaler to use for the "A" part of A/B comparisons */
        Scaler const * _reference_scaler;
        /** Filters to use for the "A" part of A/B comparisons */
@@ -276,6 +311,9 @@ private:
        int _default_j2k_bandwidth;
        std::vector<PresetColourConversion> _colour_conversions;
        std::list<boost::shared_ptr<Cinema> > _cinemas;
+       std::string _mail_server;
+       std::string _kdm_from;
+       std::string _kdm_email;
 
        /** Singleton instance, or 0 */
        static Config* _instance;