Chromium Code Reviews| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 211 return handled; | 211 return handled; |
| 212 } | 212 } |
| 213 | 213 |
| 214 void VideoCaptureHost::OnStartCapture(int device_id, | 214 void VideoCaptureHost::OnStartCapture(int device_id, |
| 215 media::VideoCaptureSessionId session_id, | 215 media::VideoCaptureSessionId session_id, |
| 216 const media::VideoCaptureParams& params) { | 216 const media::VideoCaptureParams& params) { |
| 217 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 217 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 218 DVLOG(1) << "VideoCaptureHost::OnStartCapture:" | 218 DVLOG(1) << "VideoCaptureHost::OnStartCapture:" |
| 219 << " session_id=" << session_id | 219 << " session_id=" << session_id |
| 220 << ", device_id=" << device_id | 220 << ", device_id=" << device_id |
| 221 << ", format=" << params.requested_format.frame_size.ToString() | 221 << ", format=" << params.requested_format.frame_size.ToString() |
|
mcasas
2014/09/08 09:09:53
Please use params.requested_format.ToString().
Alpha Left Google
2014/09/09 01:04:22
Done.
| |
| 222 << "@" << params.requested_format.frame_rate | 222 << "@" << params.requested_format.frame_rate |
| 223 << " (" << (params.allow_resolution_change ? "variable" : "constant") | 223 << " (" << (params.resolution_change_policy == |
| 224 media::RESOLUTION_POLICY_DYNAMIC_WITHIN_LIMIT ? | |
|
perkj_chrome
2014/09/07 14:07:09
indent 4 more.
Alpha Left Google
2014/09/09 01:04:22
Done.
| |
| 225 "variable" : "constant") | |
| 224 << ")"; | 226 << ")"; |
| 225 VideoCaptureControllerID controller_id(device_id); | 227 VideoCaptureControllerID controller_id(device_id); |
| 226 if (entries_.find(controller_id) != entries_.end()) { | 228 if (entries_.find(controller_id) != entries_.end()) { |
| 227 Send(new VideoCaptureMsg_StateChanged(device_id, | 229 Send(new VideoCaptureMsg_StateChanged(device_id, |
| 228 VIDEO_CAPTURE_STATE_ERROR)); | 230 VIDEO_CAPTURE_STATE_ERROR)); |
| 229 return; | 231 return; |
| 230 } | 232 } |
| 231 | 233 |
| 232 entries_[controller_id] = base::WeakPtr<VideoCaptureController>(); | 234 entries_[controller_id] = base::WeakPtr<VideoCaptureController>(); |
| 233 media_stream_manager_->video_capture_manager()->StartCaptureForClient( | 235 media_stream_manager_->video_capture_manager()->StartCaptureForClient( |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 351 return; | 353 return; |
| 352 | 354 |
| 353 if (it->second) { | 355 if (it->second) { |
| 354 media_stream_manager_->video_capture_manager()->StopCaptureForClient( | 356 media_stream_manager_->video_capture_manager()->StopCaptureForClient( |
| 355 it->second.get(), controller_id, this, on_error); | 357 it->second.get(), controller_id, this, on_error); |
| 356 } | 358 } |
| 357 entries_.erase(it); | 359 entries_.erase(it); |
| 358 } | 360 } |
| 359 | 361 |
| 360 } // namespace content | 362 } // namespace content |
| OLD | NEW |