3cb5a4c2064d4cf4d8cbdca75a84615a6c56fb7c from master; use j2c_uuid and pcm_uuid for...
[dcpomatic.git] / src / tools / dcpomatic_server_cli.cc
index f43dd10bc4e09a2c8689de4c11aa24f6e78c88ec..847c1fa1b4d25ff87caa74f2f9cd739b7743ea53 100644 (file)
@@ -20,7 +20,6 @@
 #include "lib/server.h"
 #include <iostream>
 #include <stdexcept>
-#include <sstream>
 #include <cstring>
 #include <vector>
 #include <unistd.h>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition.hpp>
 #include "lib/config.h"
-#include "lib/dcp_video_frame.h"
+#include "lib/dcp_video.h"
 #include "lib/exceptions.h"
 #include "lib/util.h"
 #include "lib/config.h"
-#include "lib/scaler.h"
 #include "lib/image.h"
 #include "lib/log.h"
 #include "lib/version.h"
@@ -52,7 +50,7 @@ help (string n)
 {
        cerr << "Syntax: " << n << " [OPTION]\n"
             << "  -v, --version      show DCP-o-matic version\n"
-            << "  -h, --help         show this help\n"
+            << "  -h, --help         show this help\n"
             << "  -t, --threads      number of parallel encoding threads to use\n"
             << "  --verbose          be verbose to stdout\n"
             << "  --log              write a log file of activity\n";
@@ -66,7 +64,7 @@ main (int argc, char* argv[])
        bool write_log = false;
 
        int option_index = 0;
-       while (1) {
+       while (true) {
                static struct option long_options[] = {
                        { "version", no_argument, 0, 'v'},
                        { "help", no_argument, 0, 'h'},
@@ -101,7 +99,6 @@ main (int argc, char* argv[])
                }
        }
 
-       Scaler::setup_scalers ();
        shared_ptr<Log> log;
        if (write_log) {
                log.reset (new FileLog ("dcpomatic_server_cli.log"));
@@ -113,7 +110,7 @@ main (int argc, char* argv[])
        
        try {
                server.run (num_threads);
-       } catch (boost::system::system_error e) {
+       } catch (boost::system::system_error& e) {
                if (e.code() == boost::system::errc::address_in_use) {
                        cerr << argv[0] << ": address already in use.  Is another DCP-o-matic server instance already running?\n";
                        exit (EXIT_FAILURE);