From f660fe3f1be97f373318806a77b3ce3fcd53cb73 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 5 Nov 2013 22:43:34 +0000 Subject: Various work on server discovery; works on localhost. --- src/lib/encoder.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/lib/encoder.h') 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 } #include "util.h" +#include "config.h" class Image; class AudioBuffers; @@ -83,6 +84,9 @@ private: void encoder_thread (boost::optional); void terminate_threads (); + void broadcast_thread (); + void listen_thread (); + void add_worker_thread (ServerDescription); /** Film that we are encoding */ boost::shared_ptr _film; @@ -103,11 +107,16 @@ private: bool _have_a_real_frame[EYES_COUNT]; bool _terminate; std::list > _queue; - std::list _threads; + typedef std::list, boost::thread *> > ThreadList; + ThreadList _threads; mutable boost::mutex _mutex; boost::condition _condition; boost::shared_ptr _writer; + + /** A thread to periodically issue broadcasts to find encoding servers */ + boost::thread* _broadcast_thread; + boost::thread* _listen_thread; }; #endif -- cgit v1.2.3