std::shared_ptr
[dcpomatic.git] / src / lib / json_server.cc
index 490f9fc5f6b211321c93b2609acbdc8924901c0f..9c1034a68bf6f26e41df3a15e0d040ead6044f4a 100644 (file)
@@ -24,9 +24,9 @@
 #include "util.h"
 #include "film.h"
 #include "transcode_job.h"
-#include "raw_convert.h"
+#include <dcp/raw_convert.h>
 #include <boost/asio.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include <boost/thread.hpp>
 #include <iostream>
 
@@ -35,9 +35,10 @@ using std::cout;
 using std::map;
 using std::list;
 using boost::thread;
-using boost::shared_ptr;
-using boost::dynamic_pointer_cast;
+using std::shared_ptr;
+using std::dynamic_pointer_cast;
 using boost::asio::ip::tcp;
+using dcp::raw_convert;
 
 #define MAX_LENGTH 512
 
@@ -51,7 +52,12 @@ enum State {
 
 JSONServer::JSONServer (int port)
 {
+#ifdef DCPOMATIC_LINUX
+       thread* t = new thread (boost::bind (&JSONServer::run, this, port));
+       pthread_setname_np (t->native_handle(), "json-server");
+#else
        new thread (boost::bind (&JSONServer::run, this, port));
+#endif
 }
 
 void