summaryrefslogtreecommitdiff
path: root/src/lib/butler.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-07-26 15:47:52 +0100
committerCarl Hetherington <cth@carlh.net>2017-07-26 15:47:52 +0100
commit3e230d3785f19bc707fd7ea2b1f55321b93f536f (patch)
tree2773a105d2cf218d9c038418e388ff50f9b46236 /src/lib/butler.h
parentb395478cbb0706de2b6afa9a34fb33e49c61ee67 (diff)
Multi-threaded decode of DCP when previewing.
Diffstat (limited to 'src/lib/butler.h')
-rw-r--r--src/lib/butler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/butler.h b/src/lib/butler.h
index 9949ab79b..1e8947f9d 100644
--- a/src/lib/butler.h
+++ b/src/lib/butler.h
@@ -27,6 +27,7 @@
#include <boost/thread.hpp>
#include <boost/thread/condition.hpp>
#include <boost/signals2.hpp>
+#include <boost/asio.hpp>
class Film;
class Player;
@@ -50,6 +51,7 @@ private:
void audio (boost::shared_ptr<AudioBuffers> audio);
void player_changed ();
bool should_run () const;
+ void prepare (boost::weak_ptr<PlayerVideo> video) const;
boost::weak_ptr<const Film> _film;
boost::shared_ptr<Player> _player;
@@ -58,6 +60,10 @@ private:
VideoRingBuffers _video;
AudioRingBuffers _audio;
+ boost::thread_group _prepare_pool;
+ boost::asio::io_service _prepare_service;
+ boost::shared_ptr<boost::asio::io_service::work> _prepare_work;
+
/** mutex to protect _pending_seek_position, _pending_seek_acurate, _finished, _died, _stop_thread */
boost::mutex _mutex;
boost::condition _summon;