| 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/media_stream_manager.h" | 5 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 void MediaStreamManager::FlushVideoCaptureThreadForTesting() { | 1755 void MediaStreamManager::FlushVideoCaptureThreadForTesting() { |
| 1756 video_capture_thread_.FlushForTesting(); | 1756 video_capture_thread_.FlushForTesting(); |
| 1757 } | 1757 } |
| 1758 #endif | 1758 #endif |
| 1759 | 1759 |
| 1760 MediaStreamDevices MediaStreamManager::ConvertToMediaStreamDevices( | 1760 MediaStreamDevices MediaStreamManager::ConvertToMediaStreamDevices( |
| 1761 MediaStreamType stream_type, | 1761 MediaStreamType stream_type, |
| 1762 const MediaDeviceInfoArray& device_infos) { | 1762 const MediaDeviceInfoArray& device_infos) { |
| 1763 MediaStreamDevices devices; | 1763 MediaStreamDevices devices; |
| 1764 for (const auto& info : device_infos) | 1764 for (const auto& info : device_infos) |
| 1765 devices.emplace_back(stream_type, info.device_id, info.label); | 1765 devices.emplace_back(stream_type, info.device_id, info.label, |
| 1766 info.video_facing); |
| 1766 | 1767 |
| 1767 if (stream_type != MEDIA_DEVICE_VIDEO_CAPTURE) | 1768 if (stream_type != MEDIA_DEVICE_VIDEO_CAPTURE) |
| 1768 return devices; | 1769 return devices; |
| 1769 | 1770 |
| 1770 for (auto& device : devices) { | 1771 for (auto& device : devices) { |
| 1771 device.camera_calibration = | 1772 device.camera_calibration = |
| 1772 video_capture_manager()->GetCameraCalibration(device.id); | 1773 video_capture_manager()->GetCameraCalibration(device.id); |
| 1773 } | 1774 } |
| 1774 return devices; | 1775 return devices; |
| 1775 } | 1776 } |
| 1776 | 1777 |
| 1777 } // namespace content | 1778 } // namespace content |
| OLD | NEW |