if (frame >= 0) {
struct timeval end;
gettimeofday (&end, 0);
- cout << "Encoded frame " << frame << " in " << (seconds (end) - seconds (start)) << "\n";
+ stringstream s;
+ s << "Encoded frame " << frame << " in " << (seconds (end) - seconds (start));
+ _log->log (s.str ());
}
_worker_condition.notify_all ();
void
Server::run (int num_threads)
{
- cout << "Server starting with " << num_threads << " threads.\n";
+ stringstream s;
+ s << "Server starting with " << num_threads << " threads.";
+ _log->log (s.str ());
for (int i = 0; i < num_threads; ++i) {
_worker_threads.push_back (new thread (bind (&Server::worker_thread, this)));