summaryrefslogtreecommitdiff
path: root/src/tools/dcpomatic_server_cli.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/dcpomatic_server_cli.cc')
-rw-r--r--src/tools/dcpomatic_server_cli.cc29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/tools/dcpomatic_server_cli.cc b/src/tools/dcpomatic_server_cli.cc
index 023099034..ea78d41a5 100644
--- a/src/tools/dcpomatic_server_cli.cc
+++ b/src/tools/dcpomatic_server_cli.cc
@@ -19,22 +19,26 @@
*/
#include "lib/config.h"
+#include "lib/config.h"
#include "lib/dcp_video.h"
+#include "lib/dcpomatic_log.h"
+#include "lib/encode_server.h"
#include "lib/exceptions.h"
-#include "lib/util.h"
-#include "lib/config.h"
-#include "lib/image.h"
#include "lib/file_log.h"
+#ifdef DCPOMATIC_GROK
+#include "lib/grok/context.h"
+#endif
+#include "lib/image.h"
#include "lib/null_log.h"
+#include "lib/util.h"
+#include "lib/variant.h"
#include "lib/version.h"
-#include "lib/encode_server.h"
-#include "lib/dcpomatic_log.h"
+#include <boost/algorithm/string.hpp>
#include <boost/array.hpp>
#include <boost/asio.hpp>
-#include <boost/algorithm/string.hpp>
#include <boost/thread.hpp>
-#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
+#include <boost/thread/mutex.hpp>
#include <unistd.h>
#include <errno.h>
#include <getopt.h>
@@ -44,15 +48,15 @@
#include <vector>
using std::cerr;
-using std::string;
using std::cout;
using std::shared_ptr;
+using std::string;
static void
help (string n)
{
cerr << "Syntax: " << n << " [OPTION]\n"
- << " -v, --version show DCP-o-matic version\n"
+ << variant::insert_dcpomatic(" -v, --version show %1 version\n")
<< " -h, --help show this help\n"
<< " -t, --threads number of parallel encoding threads to use\n"
<< " --verbose be verbose to stdout\n"
@@ -112,13 +116,18 @@ main (int argc, char* argv[])
dcpomatic_log.reset (new FileLog("dcpomatic_server_cli.log"));
}
+#ifdef DCPOMATIC_GROK
+ setMessengerLogger(new grk_plugin::GrokLogger("[GROK] "));
+ setup_grok_library_path();
+#endif
+
EncodeServer server (verbose, num_threads);
try {
server.run ();
} catch (boost::system::system_error& e) {
if (e.code() == boost::system::errc::address_in_use) {
- cerr << program_name << ": address already in use. Is another DCP-o-matic server instance already running?\n";
+ cerr << program_name << variant::insert_dcpomatic(": address already in use. Is another %1 server instance already running?\n");
exit (EXIT_FAILURE);
}
cerr << program_name << ": " << e.what() << "\n";