diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-18 22:49:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-19 01:29:04 +0100 |
| commit | 9a27d60ea7888d300a5a2414a477091428589b82 (patch) | |
| tree | 42db6de6bf6d420a760e79f93d0ce3ea47423d57 /src/lib/player.h | |
| parent | 0bd80b641875632b9b2b17530d00e4546bba8088 (diff) | |
Suspend butler on player may-change as otherwise there's a window
between Player::_suspended being set to false and the the butler
requesting a seek, during which the butler may call pass().
Diffstat (limited to 'src/lib/player.h')
| -rw-r--r-- | src/lib/player.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/player.h b/src/lib/player.h index c43cfd40e..f7ab1000d 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -88,16 +88,21 @@ public: boost::optional<DCPTime> content_time_to_dcp (boost::shared_ptr<Content> content, ContentTime t); + /* The player's internal state may be about to change such so + that its emissions from Video and Audio will suddenly be + from an undefined position. Listeners should prepare + themselves for this possibility. + */ boost::signals2::signal<void ()> MayChange; - /** Emitted when something has changed such that if we went back and emitted - * the last frame again it would look different. This is not emitted after - * a seek. + /** The player's internal state has now changed. * * The first parameter is what changed. * The second parameter is true if these signals are currently likely to be frequent. */ boost::signals2::signal<void (int, bool)> Changed; + + /** The change suggested by a MayChange did not happen */ boost::signals2::signal<void ()> NotChanged; /** Emitted when a video frame is ready. These emissions happen in the correct order. */ @@ -156,8 +161,8 @@ private: boost::shared_ptr<const Film> _film; boost::shared_ptr<const Playlist> _playlist; - /** We can pass() and seek() */ - bool _can_run; + /** true if we are suspended (i.e. pass() and seek() do nothing */ + bool _suspended; std::list<boost::shared_ptr<Piece> > _pieces; /** Size of the image in the DCP (e.g. 1990x1080 for flat) */ |
