diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-05 22:43:34 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-05 22:43:34 +0000 |
| commit | f660fe3f1be97f373318806a77b3ce3fcd53cb73 (patch) | |
| tree | 3d862060843ad00aae4c23008912ba7d21a38ca2 /src/lib/encoder.h | |
| parent | 5698918140d640b3477634504a83da0d8d71a1cf (diff) | |
Various work on server discovery; works on localhost.
Diffstat (limited to 'src/lib/encoder.h')
| -rw-r--r-- | src/lib/encoder.h | 11 |
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 |
