summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_pt/camera.cpp')
-rw-r--r--ftnoir_tracker_pt/camera.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/ftnoir_tracker_pt/camera.cpp b/ftnoir_tracker_pt/camera.cpp
index 2e745f2a..2989c1fe 100644
--- a/ftnoir_tracker_pt/camera.cpp
+++ b/ftnoir_tracker_pt/camera.cpp
@@ -8,26 +8,10 @@
#include "camera.h"
#include <string>
#include <QDebug>
+#include "opentrack/sleep.hpp"
using namespace cv;
-#ifdef OPENTRACK_API
-#else
-// ----------------------------------------------------------------------------
-void get_camera_device_names(std::vector<std::string>& device_names)
-{
- videoInput VI;
- VI.listDevices();
- std::string device_name;
- for(int index = 0; ; ++index) {
- device_name = VI.getDeviceName(index);
- if (device_name.empty()) break;
- device_names.push_back(device_name);
- }
-}
-#endif
-
-// ----------------------------------------------------------------------------
void Camera::set_device_index(int index)
{
if (desired_index != index)
@@ -113,6 +97,8 @@ void CVCamera::stop()
cap->release();
delete cap;
cap = nullptr;
+ // give opencv time to exit camera threads, etc.
+ portable::sleep(500);
}
active = false;
}