summaryrefslogtreecommitdiff
path: root/src/lib/film.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/film.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/film.h')
-rw-r--r--src/lib/film.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/film.h b/src/lib/film.h
index c14b0f4fa..9f066e628 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -38,6 +38,7 @@
#include "named_channel.h"
#include "remembered_asset.h"
#include "resolution.h"
+#include "signal.h"
#include "signaller.h"
#include "territory_type.h"
#include "transcode_job.h"
@@ -440,20 +441,20 @@ public:
boost::filesystem::path info_file(dcpomatic::DCPTimePeriod p) const;
/** Emitted when some property has of the Film is about to change or has changed */
- mutable boost::signals2::signal<void (ChangeType, FilmProperty)> Change;
+ mutable UISignal<void (ChangeType, FilmProperty)> Change;
/** Emitted when some property of our content has changed */
- mutable boost::signals2::signal<void (ChangeType, std::weak_ptr<Content>, int, bool)> ContentChange;
+ mutable UISignal<void (ChangeType, std::weak_ptr<Content>, int, bool)> ContentChange;
/** Emitted when the film's length might have changed; this is not like a normal
property as its value is derived from the playlist, so it has its own signal.
*/
- mutable boost::signals2::signal<void ()> LengthChange;
+ mutable UISignal<void ()> LengthChange;
- boost::signals2::signal<void (bool)> DirtyChange;
+ UISignal<void (bool)> DirtyChange;
/** Emitted when we have something important to tell the user */
- boost::signals2::signal<void (std::string)> Message;
+ UISignal<void (std::string)> Message;
/** Current version number of the state file */
static int const current_state_version;