X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_server_cli.cc;h=237673179a87074e35d3697e2a8dabcdb639f010;hb=ab778ced048cad27b7c10808acfa93861ea91fce;hp=f35797954ae907ff237146c2480ecc3289574bff;hpb=0b6c6de07f9a3aa28c2e8ca8ef30340e3fa1bfc6;p=dcpomatic.git diff --git a/src/tools/dcpomatic_server_cli.cc b/src/tools/dcpomatic_server_cli.cc index f35797954..237673179 100644 --- a/src/tools/dcpomatic_server_cli.cc +++ b/src/tools/dcpomatic_server_cli.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,11 +32,10 @@ #include #include #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" @@ -60,6 +59,9 @@ help (string n) int main (int argc, char* argv[]) { + dcpomatic_setup_path_encoding (); + dcpomatic_setup (); + int num_threads = Config::instance()->num_local_encoding_threads (); bool verbose = false; bool write_log = false; @@ -100,19 +102,18 @@ main (int argc, char* argv[]) } } - Scaler::setup_scalers (); shared_ptr log; if (write_log) { log.reset (new FileLog ("dcpomatic_server_cli.log")); } else { log.reset (new NullLog); } - + Server server (log, verbose); - + 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);