| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/desktop_capture_device.h" | 5 #include "content/browser/renderer_host/media/desktop_capture_device.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 webrtc::DesktopFrame::kBytesPerPixel * output_rect_.left(); | 225 webrtc::DesktopFrame::kBytesPerPixel * output_rect_.left(); |
| 226 libyuv::ARGBScale(frame->data(), frame->stride(), | 226 libyuv::ARGBScale(frame->data(), frame->stride(), |
| 227 frame->size().width(), frame->size().height(), | 227 frame->size().width(), frame->size().height(), |
| 228 output_rect_data, output_frame_->stride(), | 228 output_rect_data, output_frame_->stride(), |
| 229 output_rect_.width(), output_rect_.height(), | 229 output_rect_.width(), output_rect_.height(), |
| 230 libyuv::kFilterBilinear); | 230 libyuv::kFilterBilinear); |
| 231 output_data = output_frame_->data(); | 231 output_data = output_frame_->data(); |
| 232 } | 232 } |
| 233 | 233 |
| 234 client_->OnIncomingCapturedFrame( | 234 client_->OnIncomingCapturedFrame( |
| 235 output_data, output_bytes, base::TimeTicks::Now(), 0, capture_format_); | 235 output_data, output_bytes, capture_format_, 0, base::TimeTicks::Now()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void DesktopCaptureDevice::Core::DoAllocateAndStart( | 238 void DesktopCaptureDevice::Core::DoAllocateAndStart( |
| 239 const media::VideoCaptureParams& params, | 239 const media::VideoCaptureParams& params, |
| 240 scoped_ptr<Client> client) { | 240 scoped_ptr<Client> client) { |
| 241 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 241 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
| 242 DCHECK(desktop_capturer_); | 242 DCHECK(desktop_capturer_); |
| 243 DCHECK(client.get()); | 243 DCHECK(client.get()); |
| 244 DCHECK(!client_.get()); | 244 DCHECK(!client_.get()); |
| 245 | 245 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 const media::VideoCaptureParams& params, | 411 const media::VideoCaptureParams& params, |
| 412 scoped_ptr<Client> client) { | 412 scoped_ptr<Client> client) { |
| 413 core_->AllocateAndStart(params, client.Pass()); | 413 core_->AllocateAndStart(params, client.Pass()); |
| 414 } | 414 } |
| 415 | 415 |
| 416 void DesktopCaptureDevice::StopAndDeAllocate() { | 416 void DesktopCaptureDevice::StopAndDeAllocate() { |
| 417 core_->StopAndDeAllocate(); | 417 core_->StopAndDeAllocate(); |
| 418 } | 418 } |
| 419 | 419 |
| 420 } // namespace content | 420 } // namespace content |
| OLD | NEW |