| 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_host.h" | 5 #include "content/browser/renderer_host/media/video_capture_host.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 113 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 114 if (controllers_.find(controller_id) == controllers_.end()) | 114 if (controllers_.find(controller_id) == controllers_.end()) |
| 115 return; | 115 return; |
| 116 | 116 |
| 117 if (base::ContainsKey(device_id_to_observer_map_, controller_id)) { | 117 if (base::ContainsKey(device_id_to_observer_map_, controller_id)) { |
| 118 device_id_to_observer_map_[controller_id]->OnStateChanged( | 118 device_id_to_observer_map_[controller_id]->OnStateChanged( |
| 119 mojom::VideoCaptureState::STARTED); | 119 mojom::VideoCaptureState::STARTED); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 void VideoCaptureHost::OnStartedUsingGpuDecode(VideoCaptureControllerID id) {} |
| 124 |
| 123 void VideoCaptureHost::Start(int32_t device_id, | 125 void VideoCaptureHost::Start(int32_t device_id, |
| 124 int32_t session_id, | 126 int32_t session_id, |
| 125 const media::VideoCaptureParams& params, | 127 const media::VideoCaptureParams& params, |
| 126 mojom::VideoCaptureObserverPtr observer) { | 128 mojom::VideoCaptureObserverPtr observer) { |
| 127 DVLOG(1) << __func__ << " session_id=" << session_id | 129 DVLOG(1) << __func__ << " session_id=" << session_id |
| 128 << ", device_id=" << device_id << ", format=" | 130 << ", device_id=" << device_id << ", format=" |
| 129 << media::VideoCaptureFormat::ToString(params.requested_format); | 131 << media::VideoCaptureFormat::ToString(params.requested_format); |
| 130 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 132 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 131 | 133 |
| 132 DCHECK(!base::ContainsKey(device_id_to_observer_map_, device_id)); | 134 DCHECK(!base::ContainsKey(device_id_to_observer_map_, device_id)); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 const base::WeakPtr<VideoCaptureController> controller = it->second; | 325 const base::WeakPtr<VideoCaptureController> controller = it->second; |
| 324 controllers_.erase(it); | 326 controllers_.erase(it); |
| 325 if (!controller) | 327 if (!controller) |
| 326 return; | 328 return; |
| 327 | 329 |
| 328 media_stream_manager_->video_capture_manager()->StopCaptureForClient( | 330 media_stream_manager_->video_capture_manager()->StopCaptureForClient( |
| 329 controller.get(), controller_id, this, on_error); | 331 controller.get(), controller_id, this, on_error); |
| 330 } | 332 } |
| 331 | 333 |
| 332 } // namespace content | 334 } // namespace content |
| OLD | NEW |