| 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 } | 619 } |
| 620 } | 620 } |
| 621 } | 621 } |
| 622 | 622 |
| 623 int MediaStreamManager::VideoDeviceIdToSessionId( | 623 int MediaStreamManager::VideoDeviceIdToSessionId( |
| 624 const std::string& device_id) const { | 624 const std::string& device_id) const { |
| 625 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 625 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 626 | 626 |
| 627 for (const LabeledDeviceRequest& device_request : requests_) { | 627 for (const LabeledDeviceRequest& device_request : requests_) { |
| 628 for (const StreamDeviceInfo& info : device_request.second->devices) { | 628 for (const StreamDeviceInfo& info : device_request.second->devices) { |
| 629 if (info.device.id == device_id) { | 629 if (info.device.id == device_id && |
| 630 DCHECK_EQ(MEDIA_DEVICE_VIDEO_CAPTURE, info.device.type); | 630 info.device.type == MEDIA_DEVICE_VIDEO_CAPTURE) { |
| 631 return info.session_id; | 631 return info.session_id; |
| 632 } | 632 } |
| 633 } | 633 } |
| 634 } | 634 } |
| 635 return StreamDeviceInfo::kNoId; | 635 return StreamDeviceInfo::kNoId; |
| 636 } | 636 } |
| 637 | 637 |
| 638 void MediaStreamManager::StopDevice(MediaStreamType type, int session_id) { | 638 void MediaStreamManager::StopDevice(MediaStreamType type, int session_id) { |
| 639 DVLOG(1) << "StopDevice" | 639 DVLOG(1) << "StopDevice" |
| 640 << "{type = " << type << "}" | 640 << "{type = " << type << "}" |
| (...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1769 return devices; | 1769 return devices; |
| 1770 | 1770 |
| 1771 for (auto& device : devices) { | 1771 for (auto& device : devices) { |
| 1772 device.camera_calibration = | 1772 device.camera_calibration = |
| 1773 video_capture_manager()->GetCameraCalibration(device.id); | 1773 video_capture_manager()->GetCameraCalibration(device.id); |
| 1774 } | 1774 } |
| 1775 return devices; | 1775 return devices; |
| 1776 } | 1776 } |
| 1777 | 1777 |
| 1778 } // namespace content | 1778 } // namespace content |
| OLD | NEW |