summaryrefslogtreecommitdiffhomepage
path: root/cv/camera-dialog.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-31 13:48:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-31 13:48:09 +0200
commitfa528a7ebafc9b5751deda05c02aec43a9a45ead (patch)
treee23a0e74592670b23c5df3c6b58895255aaad581 /cv/camera-dialog.hpp
parentccafc5f054733e883bb0ef8b0c698b4c9c86fff9 (diff)
tracker/{aruco, pt}, compat, api: move opencv camera class to cv module
Diffstat (limited to 'cv/camera-dialog.hpp')
-rw-r--r--cv/camera-dialog.hpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/cv/camera-dialog.hpp b/cv/camera-dialog.hpp
new file mode 100644
index 00000000..e99b5f6e
--- /dev/null
+++ b/cv/camera-dialog.hpp
@@ -0,0 +1,44 @@
+/* Copyright (c) 2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
+#pragma once
+
+#include "export.hpp"
+#include "opentrack-compat/camera-names.hpp"
+#include "opentrack-compat/sleep.hpp"
+
+#ifdef __linux
+# include <QProcess>
+#endif
+
+#ifdef _WIN32
+# include <objbase.h>
+# include <winerror.h>
+# include <windows.h>
+# include <opencv2/videoio.hpp>
+# include <QTimer>
+#endif
+
+#include <QMutex>
+
+class OPENTRACK_CV_EXPORT camera_dialog
+{
+ static void maybe_grab_frame(cv::VideoCapture& cap);
+#ifdef _WIN32
+ static void init_com_threading();
+#endif
+
+public:
+ virtual ~camera_dialog();
+ void open_camera_settings(cv::VideoCapture*, const QString&, QMutex*);
+#if defined(_WIN32)
+ cv::VideoCapture fake_capture;
+ QTimer t;
+ void delete_capture();
+#endif
+};