diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-23 20:13:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-23 20:13:04 +0100 |
| commit | 5395f0b529b4127feffff310dbe648ffc0eb5aa3 (patch) | |
| tree | 5b41cc1b60568eb2a4ea64a3e9dbb1211266df6a /src | |
| parent | b711795b7f15b9f69f6ca77cd8d1454a4cff3fe0 (diff) | |
Add some more logging when finishing up an encode.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/j2k_wav_encoder.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/j2k_wav_encoder.cc b/src/lib/j2k_wav_encoder.cc index ef1e8edc1..9ae01c774 100644 --- a/src/lib/j2k_wav_encoder.cc +++ b/src/lib/j2k_wav_encoder.cc @@ -27,6 +27,7 @@ #include <iostream> #include <boost/thread.hpp> #include <boost/filesystem.hpp> +#include <boost/lexical_cast.hpp> #include <sndfile.h> #include <openjpeg.h> #include "j2k_wav_encoder.h" @@ -229,8 +230,11 @@ J2KWAVEncoder::process_end () { boost::mutex::scoped_lock lock (_worker_mutex); + _log->log ("Clearing queue of " + lexical_cast<string> (_queue.size ())); + /* Keep waking workers until the queue is empty */ while (!_queue.empty ()) { + _log->log ("Waking with " + lexical_cast<string> (_queue.size ())); _worker_condition.notify_all (); _worker_condition.wait (lock); } @@ -239,6 +243,8 @@ J2KWAVEncoder::process_end () terminate_worker_threads (); + _log->log ("Mopping up " + lexical_cast<string> (_queue.size())); + /* The following sequence of events can occur in the above code: 1. a remote worker takes the last image off the queue 2. the loop above terminates |
