/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
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
#include "lib/server.h"
#include <iostream>
#include <stdexcept>
-#include <sstream>
#include <cstring>
#include <vector>
#include <unistd.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"
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;
}
}
- Scaler::setup_scalers ();
shared_ptr<Log> 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);