Split EncodeServer into that and Server.
[dcpomatic.git] / src / tools / dcpomatic_server.cc
index b45e579410845ced5fb438dc18c0be8062aaa498..5fb8cb3afd4c8b5e60d4cb76ddfe516803c805fa 100644 (file)
@@ -21,7 +21,7 @@
 #include "wx/wx_signal_manager.h"
 #include "lib/util.h"
 #include "lib/encoded_log_entry.h"
-#include "lib/server.h"
+#include "lib/encode_server.h"
 #include "lib/config.h"
 #include "lib/log.h"
 #include "lib/raw_convert.h"
@@ -130,7 +130,7 @@ private:
        float _fps;
 };
 
-static shared_ptr<ServerLog> server_log (new ServerLog);
+static shared_ptr<ServerLog> server_log;
 
 class StatusDialog : public wxDialog
 {
@@ -263,6 +263,8 @@ private:
                        return false;
                }
 
+               server_log.reset (new ServerLog);
+
                dcpomatic_setup_path_encoding ();
                dcpomatic_setup_i18n ();
                dcpomatic_setup ();
@@ -289,8 +291,8 @@ private:
 
        void main_thread ()
        try {
-               Server server (server_log, false);
-               server.run (Config::instance()->num_local_encoding_threads ());
+               EncodeServer server (server_log, false, Config::instance()->num_local_encoding_threads());
+               server.run ();
        } catch (...) {
                store_current ();
        }