From 631c85c85f2e82bfdf7f6c58c5866f12ad0836a6 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Jan 2020 15:21:52 +0100 Subject: video/opencv: store camera index Issue: #1031 --- video-opencv/impl-metadata.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'video-opencv/impl-metadata.cpp') 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 metadata::make_camera(const QString& name) std::vector metadata::camera_names() const { - return get_camera_names(); + std::vector> names = get_camera_names(); + std::vector 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) -- cgit v1.2.3