Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1589)

Side by Side Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 2703393007: Show meaningful name for cameras (Closed)
Patch Set: fix trybot Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/settings_media_devices_selection_handler.cc ('k') | content/common/media/media_devices.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698