summaryrefslogtreecommitdiff
path: root/src/lib/encoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-11-05 22:43:34 +0000
committerCarl Hetherington <cth@carlh.net>2013-11-05 22:43:34 +0000
commitf660fe3f1be97f373318806a77b3ce3fcd53cb73 (patch)
tree3d862060843ad00aae4c23008912ba7d21a38ca2 /src/lib/encoder.h
parent5698918140d640b3477634504a83da0d8d71a1cf (diff)
Various work on server discovery; works on localhost.
Diffstat (limited to 'src/lib/encoder.h')
-rw-r--r--src/lib/encoder.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/encoder.h b/src/lib/encoder.h
index ab3f40762..e799c8469 100644
--- a/src/lib/encoder.h
+++ b/src/lib/encoder.h
@@ -36,6 +36,7 @@ extern "C" {
#include <libswresample/swresample.h>
}
#include "util.h"
+#include "config.h"
class Image;
class AudioBuffers;
@@ -83,6 +84,9 @@ private:
void encoder_thread (boost::optional<ServerDescription>);
void terminate_threads ();
+ void broadcast_thread ();
+ void listen_thread ();
+ void add_worker_thread (ServerDescription);
/** Film that we are encoding */
boost::shared_ptr<const Film> _film;
@@ -103,11 +107,16 @@ private:
bool _have_a_real_frame[EYES_COUNT];
bool _terminate;
std::list<boost::shared_ptr<DCPVideoFrame> > _queue;
- std::list<boost::thread *> _threads;
+ typedef std::list<std::pair<boost::optional<ServerDescription>, boost::thread *> > ThreadList;
+ ThreadList _threads;
mutable boost::mutex _mutex;
boost::condition _condition;
boost::shared_ptr<Writer> _writer;
+
+ /** A thread to periodically issue broadcasts to find encoding servers */
+ boost::thread* _broadcast_thread;
+ boost::thread* _listen_thread;
};
#endif