summaryrefslogtreecommitdiff
path: root/src/lib/encoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-08-17 21:47:08 +0100
committerCarl Hetherington <cth@carlh.net>2013-08-17 21:47:08 +0100
commit2499c41097f8410cb3016e095a85d68979485a7b (patch)
tree331a23489d3be42ede2861311a797792ba663805 /src/lib/encoder.cc
parent89af81886eeee57861bc23984a0583bec76d536d (diff)
Various bits mostly related to colour conversions.
Diffstat (limited to 'src/lib/encoder.cc')
-rw-r--r--src/lib/encoder.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index a1c024799..29fe64e26 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -71,13 +71,13 @@ 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, shared_ptr<ServerDescription> ())));
+ _threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, optional<ServerDescription> ())));
}
- vector<shared_ptr<ServerDescription> > servers = Config::instance()->servers ();
+ vector<ServerDescription> servers = Config::instance()->servers ();
- for (vector<shared_ptr<ServerDescription> >::iterator i = servers.begin(); i != servers.end(); ++i) {
- for (int j = 0; j < (*i)->threads (); ++j) {
+ 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)));
}
}
@@ -244,7 +244,7 @@ Encoder::terminate_threads ()
}
void
-Encoder::encoder_thread (shared_ptr<ServerDescription> server)
+Encoder::encoder_thread (optional<ServerDescription> server)
{
/* Number of seconds that we currently wait between attempts
to connect to the server; not relevant for localhost
@@ -275,7 +275,7 @@ Encoder::encoder_thread (shared_ptr<ServerDescription> server)
if (server) {
try {
- encoded = vf->encode_remotely (server);
+ encoded = vf->encode_remotely (server.get ());
if (remote_backoff > 0) {
_film->log()->log (String::compose (N_("%1 was lost, but now she is found; removing backoff"), server->host_name ()));