X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.h;h=a4fd80c161c565ccd4a47b210ca833b603c6132e;hb=ae4f0d9f55489ddc50b3e5f0d713621ee8f50645;hp=3d774e1d93630cc7a32e56bee752d25dd9d690e9;hpb=3006dde72c92356165ef841910368d0dae27ddbe;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index 3d774e1d9..a4fd80c16 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -73,6 +73,7 @@ public: std::list > get_subtitle_fonts (); std::list get_reel_assets (); dcp::Size video_container_size () const { + boost::mutex::scoped_lock lm (_mutex); return _video_container_size; } @@ -142,6 +143,12 @@ private: void do_emit_video (boost::shared_ptr pv, DCPTime time); void emit_audio (boost::shared_ptr data, DCPTime time); + /** Mutex to protect the whole Player state. When it's used for the preview we have + seek() and pass() called from the Butler thread and lots of other stuff called + from the GUI thread. + */ + mutable boost::mutex _mutex; + boost::shared_ptr _film; boost::shared_ptr _playlist;