- vector<ServerDescription*> servers = Config::instance()->servers ();
-
- for (vector<ServerDescription*>::iterator i = servers.begin(); i != servers.end(); ++i) {
- for (int j = 0; j < (*i)->threads (); ++j) {
- _threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, *i)));
- }
+void
+Encoder::process_begin ()
+{
+ for (int i = 0; i < Config::instance()->num_local_encoding_threads (); ++i) {
+ _threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, optional<ServerDescription> ())));