summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorR. van twisk <ries.van.twisk@ing.com>2019-11-30 22:51:33 +0100
committerR. van twisk <ries.van.twisk@ing.com>2019-11-30 22:51:33 +0100
commit9f3a745ba10235fa7aeda3b93703fdcf810e6948 (patch)
tree7dfbb9705dc988cf4c9b4231777e28c7fd597204 /compat
parent377dc1af24d5803aac11fa70e369eae9c40e8b7f (diff)
Added camera list support for OSX
Diffstat (limited to 'compat')
-rw-r--r--compat/camera-names.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/compat/camera-names.cpp b/compat/camera-names.cpp
index 69926e5a..40edba49 100644
--- a/compat/camera-names.cpp
+++ b/compat/camera-names.cpp
@@ -11,6 +11,10 @@
# include <unistd.h>
#endif
+#ifdef __APPLE__
+# include <QCameraInfo>
+#endif
+
#ifdef __linux
# include <fcntl.h>
# include <sys/ioctl.h>
@@ -102,5 +106,12 @@ std::vector<QString> get_camera_names()
}
}
#endif
+#ifdef __APPLE__
+ QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
+ foreach (const QCameraInfo &cameraInfo, cameras) {
+ ret.push_back(cameraInfo.description());
+ }
+#endif
+
return ret;
}