diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-06 14:46:07 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-06 14:46:07 +0000 |
| commit | f8678dcae5f90eb946ad6e51d9a62e0c02bc63e3 (patch) | |
| tree | 186c3938bbccfae5e83f52354b74911d0aa50de4 /src/lib/encoder.h | |
| parent | 8cc0d5e6eceeafaeba2490e941b1ff73230aa4e5 (diff) | |
| parent | 4782e1c0beec98560950a616902669f09a98faae (diff) | |
Merge branch '1.0' of /home/carl/git/dvdomatic into 1.0
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..9fcba560f 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_threads (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 |
