Fix problems with FFmpeg files that have all-zero stream IDs.
[dcpomatic.git] / src / lib / config.h
index 7dd5abd178ec498ee22daf7337e0386bd25dff91..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;
@@ -156,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) {
@@ -270,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 */