From fda9c90a547a88861d167a1c37beb40bd457018c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 18 Oct 2016 18:15:38 +0200 Subject: tracker/pt: don't delay camera stop artificially If the filter crashes on quick stop/start it's not our fault. --- tracker-aruco/ftnoir_tracker_aruco.cpp | 6 ------ tracker-pt/camera.cpp | 4 ---- tracker-pt/ftnoir_tracker_pt.cpp | 2 -- 3 files changed, 12 deletions(-) diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index 24923ede..a36fdd9f 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -8,7 +8,6 @@ #include "ftnoir_tracker_aruco.h" #include "api/plugin-api.hpp" #include "compat/camera-names.hpp" -#include "compat/sleep.hpp" #include "cv/video-property-page.hpp" #include @@ -66,8 +65,6 @@ Tracker::~Tracker() delete videoWidget; if(layout) delete layout; - // fast start/stop causes breakage - portable::sleep(1000); camera.release(); } @@ -390,9 +387,6 @@ fail: if (frame.rows > 0) videoWidget->update_image(frame); } - - // give opencv time to exit camera threads, etc. - portable::sleep(500); } void Tracker::data(double *data) diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp index 94a9d314..f2fdb283 100644 --- a/tracker-pt/camera.cpp +++ b/tracker-pt/camera.cpp @@ -6,7 +6,6 @@ */ #include "camera.h" -#include "compat/sleep.hpp" #include "compat/camera-names.hpp" #include #include @@ -109,9 +108,6 @@ void CVCamera::stop() } delete cap; cap = nullptr; - // give opencv time to exit camera threads, etc. - if (opened) - portable::sleep(500); qDebug() << "pt camera: stopped"; } } diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index ef6058db..231a56cd 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -13,7 +13,6 @@ #include #include #include "compat/camera-names.hpp" -#include "compat/sleep.hpp" #include //#define PT_PERF_LOG //log performance @@ -41,7 +40,6 @@ Tracker_PT::~Tracker_PT() if (video_frame->layout()) delete video_frame->layout(); } // fast start/stop causes breakage - portable::sleep(1000); camera.stop(); } -- cgit v1.2.3