diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-06-12 00:27:33 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-06-14 23:43:13 +0200 |
| commit | a12a943c99ba4aba122f91c93b078d2e87146b32 (patch) | |
| tree | 93e149bc2d6f9c2ff98aa05c5d51e096dd0c6598 /src/wx/film_viewer.h | |
| parent | 6d2d4973ccd5d4c78414d28988a74dfa7287f001 (diff) | |
Use a new UISignal which checks thread safety slightly.3052-hang
This adds a wrapper around signals2::signal which checks that emission
happens from the GUI thread, for signals whose handlers must be called
in the UI thread. I'm not sure how helpful it really is but maybe it
catches some bad situations.
Diffstat (limited to 'src/wx/film_viewer.h')
| -rw-r--r-- | src/wx/film_viewer.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index 2a6239d7d..ad9b810db 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -25,6 +25,7 @@ #include "optimisation.h" +#include "signal.h" #include "video_view.h" #include "lib/change_signaller.h" #include "lib/config.h" @@ -156,16 +157,17 @@ public: Frame average_latency() const; /** The image we are viewing changed: call last_image() to get the image */ - boost::signals2::signal<void ()> ImageChanged; + UISignal<void ()> ImageChanged; std::shared_ptr<const PlayerVideo> last_image() const; - boost::signals2::signal<void ()> Started; - boost::signals2::signal<void ()> Stopped; + UISignal<void ()> Started; + UISignal<void ()> Stopped; /** While playing back we reached the end of the film (emitted from GUI thread) */ - boost::signals2::signal<void ()> Finished; + UISignal<void ()> Finished; /** Emitted from the GUI thread when a lot of frames are being dropped */ - boost::signals2::signal<void()> TooManyDropped; + UISignal<void()> TooManyDropped; + /* XXX: could be UISignal but this needs a return type and that is tricky in C++11 AFAICS */ boost::signals2::signal<bool ()> PlaybackPermitted; private: |
