summaryrefslogtreecommitdiffhomepage
path: root/compat/camera-names.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@tehran.lain.pl>2020-01-13 15:02:44 +0100
committerGitHub <noreply@github.com>2020-01-13 15:02:44 +0100
commit50f23dc21fce9d382893ad77dc29fd343ee2134c (patch)
tree663c0c38fc91b3d021ad8d38ba8ea5b7c0e5b647 /compat/camera-names.cpp
parentfb994308266093382fffecb8a3fd2645ab811117 (diff)
parent2d709bb4755305342b79a1574c90b2be348b4c4d (diff)
Merge pull request #1006 from rvt/osx-build-fix
OSX Build fixes
Diffstat (limited to 'compat/camera-names.cpp')
-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;
}