From f60ced07e25eb48a79645a328b275125b8aa2ea9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 13 Jan 2014 21:31:35 +0100 Subject: hopefully work around tracker thread freeze on exit (issue #18) Reported-by: @chsims1 Signed-off-by: Stanislaw Halik --- facetracknoir/tracker.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'facetracknoir/tracker.h') diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h index 7ebece02..a33d8e0d 100644 --- a/facetracknoir/tracker.h +++ b/facetracknoir/tracker.h @@ -51,28 +51,29 @@ public: axis_opts& opts; }; -class Tracker : public QThread { +class Tracker : protected QThread { Q_OBJECT private: FaceTrackNoIR *mainApp; QMutex mtx; main_settings& s; - + volatile bool should_quit; protected: void run(); public: Tracker( FaceTrackNoIR *parent, main_settings& s); + ~Tracker(); void getHeadPose(double *data); void getOutputHeadPose(double *data); - - volatile bool should_quit; volatile bool do_center; volatile bool enabled; T6DOF output_camera; + + void start() { QThread::start(); } }; class HeadPoseData { -- cgit v1.2.3