diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2020-01-27 15:21:52 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2020-01-27 15:21:52 +0100 |
commit | 631c85c85f2e82bfdf7f6c58c5866f12ad0836a6 (patch) | |
tree | c216067fc5f09cdd79542c81e9a618734a43b994 /video-opencv | |
parent | 63a2c2bc5c592e28de4090be861d8e2c7e0062a0 (diff) |
video/opencv: store camera index
Issue: #1031
Diffstat (limited to 'video-opencv')
-rw-r--r-- | video-opencv/impl-metadata.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/video-opencv/impl-metadata.cpp b/video-opencv/impl-metadata.cpp index 48a2e693..ffc51773 100644 --- a/video-opencv/impl-metadata.cpp +++ b/video-opencv/impl-metadata.cpp @@ -17,7 +17,14 @@ std::unique_ptr<camera> metadata::make_camera(const QString& name) std::vector<QString> metadata::camera_names() const { - return get_camera_names(); + std::vector<std::tuple<QString, int>> names = get_camera_names(); + std::vector<QString> ret; + for (const auto& t : names) + { + const auto& [str, idx] = t; + ret.push_back(str); + } + return ret; } bool metadata::can_show_dialog(const QString& camera_name) |