Merge.
[dcpomatic.git] / src / lib / server.cc
index 8ca4260490aad273794390e76629dcc4de80ffef..28236e3e04804e39ccab9b5167e7d2de7101f193 100644 (file)
@@ -124,17 +124,9 @@ Server::process (shared_ptr<Socket> socket)
                socket->read_definite_and_consume (image->data()[i], image->line_size()[i] * image->lines(i), 30);
        }
        
-#ifdef DEBUG_HASH
-       image->hash ("Image for encoding (as received by server)");
-#endif         
-       
        DCPVideoFrame dcp_video_frame (image, out_size, padding, scaler, frame, frames_per_second, post_process, colour_lut_index, j2k_bandwidth, _log);
        shared_ptr<EncodedData> encoded = dcp_video_frame.encode_locally ();
        encoded->send (socket);
-
-#ifdef DEBUG_HASH
-       encoded->hash ("Encoded image (as made by server and as sent back)");
-#endif         
        
        return frame;
 }
@@ -171,9 +163,7 @@ Server::worker_thread ()
                if (frame >= 0) {
                        struct timeval end;
                        gettimeofday (&end, 0);
-                       stringstream s;
-                       s << "Encoded frame " << frame << " in " << (seconds (end) - seconds (start));
-                       _log->log (s.str ());
+                       _log->log (String::compose ("Encoded frame %1 in %2", frame, seconds (end) - seconds (start)));
                }
                
                _worker_condition.notify_all ();
@@ -183,9 +173,7 @@ Server::worker_thread ()
 void
 Server::run (int num_threads)
 {
-       stringstream s;
-       s << "Server starting with " << num_threads << " threads.";
-       _log->log (s.str ());
+       _log->log (String::compose ("Server starting with %1 threads", num_threads));
        
        for (int i = 0; i < num_threads; ++i) {
                _worker_threads.push_back (new thread (bind (&Server::worker_thread, this)));