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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/browser/browser_main_loop.h" | 9 #include "content/browser/browser_main_loop.h" |
10 #include "content/browser/renderer_host/media/media_stream_manager.h" | 10 #include "content/browser/renderer_host/media/media_stream_manager.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 void VideoCaptureHost::OnPauseCapture(int device_id) { | 290 void VideoCaptureHost::OnPauseCapture(int device_id) { |
291 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 291 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
292 DVLOG(1) << "VideoCaptureHost::OnPauseCapture, device_id " << device_id; | 292 DVLOG(1) << "VideoCaptureHost::OnPauseCapture, device_id " << device_id; |
293 // Not used. | 293 // Not used. |
294 Send(new VideoCaptureMsg_StateChanged(device_id, VIDEO_CAPTURE_STATE_ERROR)); | 294 Send(new VideoCaptureMsg_StateChanged(device_id, VIDEO_CAPTURE_STATE_ERROR)); |
295 } | 295 } |
296 | 296 |
297 void VideoCaptureHost::OnReceiveEmptyBuffer( | 297 void VideoCaptureHost::OnReceiveEmptyBuffer( |
298 int device_id, | 298 int device_id, |
299 int buffer_id, | 299 int buffer_id, |
300 const std::vector<uint32>& sync_points) { | 300 const std::map<std::string, uint32>& sync_points) { |
301 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 301 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
302 | 302 |
303 VideoCaptureControllerID controller_id(device_id); | 303 VideoCaptureControllerID controller_id(device_id); |
304 EntryMap::iterator it = entries_.find(controller_id); | 304 EntryMap::iterator it = entries_.find(controller_id); |
305 if (it != entries_.end()) { | 305 if (it != entries_.end()) { |
306 const base::WeakPtr<VideoCaptureController>& controller = it->second; | 306 const base::WeakPtr<VideoCaptureController>& controller = it->second; |
307 if (controller) | 307 if (controller) |
308 controller->ReturnBuffer(controller_id, this, buffer_id, sync_points); | 308 controller->ReturnBuffer(controller_id, this, buffer_id, sync_points); |
309 } | 309 } |
310 } | 310 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 return; | 352 return; |
353 | 353 |
354 if (it->second) { | 354 if (it->second) { |
355 media_stream_manager_->video_capture_manager()->StopCaptureForClient( | 355 media_stream_manager_->video_capture_manager()->StopCaptureForClient( |
356 it->second.get(), controller_id, this, on_error); | 356 it->second.get(), controller_id, this, on_error); |
357 } | 357 } |
358 entries_.erase(it); | 358 entries_.erase(it); |
359 } | 359 } |
360 | 360 |
361 } // namespace content | 361 } // namespace content |
OLD | NEW |