From 1fe6bd7f8ba059322b8357b2210f0fd590567ce2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 13 Aug 2018 17:37:52 +0100 Subject: 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. --- src/lib/content.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/lib/content.h') diff --git a/src/lib/content.h b/src/lib/content.h index 23afa2243..c9edf6e22 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -178,8 +178,15 @@ public: std::list user_properties () const; + /* May be emitted from any thread */ + boost::signals2::signal MayChange; + + /* Emitted from the GUI thread */ boost::signals2::signal, int, bool)> Changed; + /* May be emitted from any thread */ + boost::signals2::signal NotChanged; + boost::shared_ptr video; boost::shared_ptr audio; std::list > text; @@ -187,8 +194,6 @@ public: boost::shared_ptr only_text () const; boost::shared_ptr text_of_original_type (TextType type) const; - void signal_changed (int); - protected: virtual void add_properties (std::list &) const; @@ -208,6 +213,9 @@ private: friend struct best_dcp_frame_rate_test_single; friend struct best_dcp_frame_rate_test_double; friend struct audio_sampling_rate_test; + friend class ContentChange; + + void signal_changed (int); std::string _digest; DCPTime _position; -- cgit v1.2.3