Add loop for gpu multithread; add some timing.
[dcpomatic.git] / src / lib / j2k_encoder.cc
index 1e5c206fc932a391b735d2922791f04d85f6e98a..ba512ae252318010ee55225128f0904f2b923d64 100644 (file)
@@ -385,9 +385,11 @@ J2KEncoder::servers_list_changed ()
                }
        }
 
-       shared_ptr<GPUJ2KEncodeWorker> w (new GPUJ2KEncodeWorker());
-       _workers.push_back (w);
-       _threads->create_thread(boost::bind(&J2KEncoder::encoder_thread, this, w));
+       for (int i = 0; i < 1; ++i) {
+               shared_ptr<GPUJ2KEncodeWorker> w (new GPUJ2KEncodeWorker());
+               _workers.push_back (w);
+               _threads->create_thread(boost::bind(&J2KEncoder::encoder_thread, this, w));
+       }
 
        _writer->set_encoder_threads (_threads->size());
 }