diff options
author | R. van twisk <ries.van.twisk@ing.com> | 2019-11-30 22:51:33 +0100 |
---|---|---|
committer | R. van twisk <ries.van.twisk@ing.com> | 2019-11-30 22:51:33 +0100 |
commit | 9f3a745ba10235fa7aeda3b93703fdcf810e6948 (patch) | |
tree | 7dfbb9705dc988cf4c9b4231777e28c7fd597204 /compat/camera-names.cpp | |
parent | 377dc1af24d5803aac11fa70e369eae9c40e8b7f (diff) |
Added camera list support for OSX
Diffstat (limited to 'compat/camera-names.cpp')
-rw-r--r-- | compat/camera-names.cpp | 11 |
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; } |