OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/media/video_capture_manager.h" | 5 #include "content/browser/renderer_host/media/video_capture_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 } | 971 } |
972 devices_info_cache_ = new_devices_info_cache; | 972 devices_info_cache_ = new_devices_info_cache; |
973 | 973 |
974 // Walk the |devices_info_cache_| and transform from | 974 // Walk the |devices_info_cache_| and transform from |
975 // VideoCaptureDeviceDescriptor to StreamDeviceInfo for return purposes. | 975 // VideoCaptureDeviceDescriptor to StreamDeviceInfo for return purposes. |
976 StreamDeviceInfoArray devices; | 976 StreamDeviceInfoArray devices; |
977 std::vector<std::tuple<media::VideoCaptureDeviceDescriptor, | 977 std::vector<std::tuple<media::VideoCaptureDeviceDescriptor, |
978 media::VideoCaptureFormats>> | 978 media::VideoCaptureFormats>> |
979 descriptors_and_formats; | 979 descriptors_and_formats; |
980 for (const auto& it : devices_info_cache_) { | 980 for (const auto& it : devices_info_cache_) { |
| 981 // TODO(guidou): Implement group IDs for video capture devices. |
| 982 // http://crbug.com/627793 |
981 devices.emplace_back(stream_type, it.descriptor.GetNameAndModel(), | 983 devices.emplace_back(stream_type, it.descriptor.GetNameAndModel(), |
982 it.descriptor.device_id); | 984 it.descriptor.device_id); |
983 descriptors_and_formats.emplace_back(it.descriptor, it.supported_formats); | 985 descriptors_and_formats.emplace_back(it.descriptor, it.supported_formats); |
984 MediaInternals::GetInstance()->UpdateVideoCaptureDeviceCapabilities( | 986 MediaInternals::GetInstance()->UpdateVideoCaptureDeviceCapabilities( |
985 descriptors_and_formats); | 987 descriptors_and_formats); |
986 } | 988 } |
987 listener_->DevicesEnumerated(stream_type, devices); | 989 listener_->DevicesEnumerated(stream_type, devices); |
988 } | 990 } |
989 | 991 |
990 bool VideoCaptureManager::IsOnDeviceThread() const { | 992 bool VideoCaptureManager::IsOnDeviceThread() const { |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 if (!device_in_queue) { | 1262 if (!device_in_queue) { |
1261 // Session ID is only valid for Screen capture. So we can fake it to | 1263 // Session ID is only valid for Screen capture. So we can fake it to |
1262 // resume video capture devices here. | 1264 // resume video capture devices here. |
1263 QueueStartDevice(kFakeSessionId, entry.get(), entry->parameters); | 1265 QueueStartDevice(kFakeSessionId, entry.get(), entry->parameters); |
1264 } | 1266 } |
1265 } | 1267 } |
1266 } | 1268 } |
1267 #endif // defined(OS_ANDROID) | 1269 #endif // defined(OS_ANDROID) |
1268 | 1270 |
1269 } // namespace content | 1271 } // namespace content |
OLD | NEW |