summaryrefslogtreecommitdiff
path: root/src/lib/player.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-06-12 00:27:33 +0200
committerCarl Hetherington <cth@carlh.net>2025-06-14 23:43:13 +0200
commita12a943c99ba4aba122f91c93b078d2e87146b32 (patch)
tree93e149bc2d6f9c2ff98aa05c5d51e096dd0c6598 /src/lib/player.h
parent6d2d4973ccd5d4c78414d28988a74dfa7287f001 (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/lib/player.h')
-rw-r--r--src/lib/player.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/player.h b/src/lib/player.h
index 9076ac242..bd8fc1c52 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -39,6 +39,7 @@
#include "player_text.h"
#include "position_image.h"
#include "shuffler.h"
+#include "signal.h"
#include <boost/atomic.hpp>
#include <list>
@@ -119,7 +120,7 @@ public:
* Second parameter is the property.
* Third parameter is true if these signals are currently likely to be frequent.
*/
- boost::signals2::signal<void (ChangeType, int, bool)> Change;
+ UISignal<void (ChangeType, int, bool)> Change;
/** Emitted when a video frame is ready. These emissions happen in the correct order. */
boost::signals2::signal<void (std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime)> Video;