diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-24 19:01:59 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-24 19:32:10 +0100 |
commit | b03a3b22f60bcd5223321ba8f2a4a65e5aeec69b (patch) | |
tree | 7a251d154e1c8b42b08c81ef32fafdf261040c9b /tracker-pt/ftnoir_tracker_pt.cpp | |
parent | 55907f6ce27520a5e596395b73a307b6ec2aeddc (diff) |
tracker/pt: don't hang the app on camera start
Move camera open to worker thread.
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.cpp')
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index 0d99ccd0..cafc973a 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -49,11 +49,7 @@ Tracker_PT::~Tracker_PT() void Tracker_PT::run() { -#ifdef PT_PERF_LOG - QFile log_file(OPENTRACK_BASE_PATH + "/PointTrackerPerformance.txt"); - if (!log_file.open(QIODevice::WriteOnly | QIODevice::Text)) return; - QTextStream log_stream(&log_file); -#endif + maybe_reopen_camera(); while(!isInterruptionRequested()) { @@ -120,7 +116,6 @@ void Tracker_PT::run() center_flag.clear(); } } - qDebug() << "pt: thread stopped"; } bool Tracker_PT::maybe_reopen_camera() @@ -149,9 +144,6 @@ module_status Tracker_PT::start_tracker(QFrame* video_frame) //video_widget->resize(video_frame->width(), video_frame->height()); video_frame->show(); - if (!maybe_reopen_camera()) - return { tr("Can't open camera") }; - start(QThread::HighPriority); return {}; |