diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-19 16:50:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-19 16:50:41 +0200 |
commit | 4da0c0619cbf052eb87a618aba4c8de79f0d4325 (patch) | |
tree | e075b2a2601d6d2f26a8a70fb83cb682cdfb23df /opentrack/opencv-camera-dialog.hpp | |
parent | f9b5b72cbcf9f121e0184f9a907bbffd7e1e16a9 (diff) | |
parent | a8165591d993a23ae71ea4e5bb7df7596688ef7b (diff) |
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'opentrack/opencv-camera-dialog.hpp')
-rw-r--r-- | opentrack/opencv-camera-dialog.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/opentrack/opencv-camera-dialog.hpp b/opentrack/opencv-camera-dialog.hpp index 6218f125..cd3d38e7 100644 --- a/opentrack/opencv-camera-dialog.hpp +++ b/opentrack/opencv-camera-dialog.hpp @@ -6,9 +6,21 @@ #include <opencv2/videoio.hpp> #include "opentrack/camera-names.hpp" +#ifdef __linux +#include <QProcess> +#endif + template<typename tracker> class camera_dialog { +#ifdef __linux +public: + void open_camera_settings(cv::VideoCapture *, const QString &camera_name, QMutex *) + { + int idx = camera_name_to_index(camera_name); + QProcess::startDetached("qv4l2", QStringList() << "-d" << ("/dev/video" + QString::number(idx))); + } +#else cv::VideoCapture fake_capture; QTimer t; @@ -47,5 +59,6 @@ public: // HACK: we're not notified when it's safe to close the capture t.start(); } +#endif }; |