diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-13 17:37:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-14 00:05:06 +0100 |
| commit | 1fe6bd7f8ba059322b8357b2210f0fd590567ce2 (patch) | |
| tree | 2c76fbf24b9b520f94f741040f11dc920d3bab91 /src/lib/playlist.h | |
| parent | f30ad4dec0a3fa5f1770fba93106a3e8910d66ba (diff) | |
More fixes for errors / crashes / misbehaviour with content changes
and the butler.
Here we signal both before and after a change in content. Before,
the player disables itself so that any pass()/seek() will be no-ops.
After, the player rebuilds its pieces and the butler re-seeks to
get back to where it was before the change.
Diffstat (limited to 'src/lib/playlist.h')
| -rw-r--r-- | src/lib/playlist.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/playlist.h b/src/lib/playlist.h index 4ee120198..649887f72 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -77,14 +77,19 @@ public: /** Emitted when content has been added to or removed from the playlist; implies OrderChanged */ mutable boost::signals2::signal<void ()> Changed; mutable boost::signals2::signal<void ()> OrderChanged; + + mutable boost::signals2::signal<void ()> ContentMayChange; /** Emitted when something about a piece of our content has changed; * these emissions include when the position of the content changes. * Third parameter is true if signals are currently being emitted frequently. */ mutable boost::signals2::signal<void (boost::weak_ptr<Content>, int, bool)> ContentChanged; + mutable boost::signals2::signal<void ()> ContentNotChanged; private: + void content_may_change (); void content_changed (boost::weak_ptr<Content>, int, bool); + void content_not_changed (); void reconnect (); /** List of content. Kept sorted in position order. */ |
