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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 base::Time::kMillisecondsPerSecond / requested_format_.frame_rate; | 256 base::Time::kMillisecondsPerSecond / requested_format_.frame_rate; |
257 | 257 |
258 // Support dynamic changes in resolution only if requester also does. | 258 // Support dynamic changes in resolution only if requester also does. |
259 if (requested_format_.frame_size_type == | 259 if (requested_format_.frame_size_type == |
260 media::VariableResolutionVideoCaptureDevice) { | 260 media::VariableResolutionVideoCaptureDevice) { |
261 capture_format_.frame_size_type = | 261 capture_format_.frame_size_type = |
262 media::VariableResolutionVideoCaptureDevice; | 262 media::VariableResolutionVideoCaptureDevice; |
263 } | 263 } |
264 | 264 |
265 // This capturer always outputs ARGB, non-interlaced. | 265 // This capturer always outputs ARGB, non-interlaced. |
266 capture_format_.color = media::VideoCaptureCapability::kARGB; | 266 capture_format_.color = media::PIXEL_FORMAT_ARGB; |
267 capture_format_.interlaced = false; | 267 capture_format_.interlaced = false; |
268 | 268 |
269 desktop_capturer_->Start(this); | 269 desktop_capturer_->Start(this); |
270 | 270 |
271 // Capture first frame, so that we can call OnFrameInfo() callback. | 271 // Capture first frame, so that we can call OnFrameInfo() callback. |
272 DoCapture(); | 272 DoCapture(); |
273 } | 273 } |
274 | 274 |
275 void DesktopCaptureDevice::Core::DoStart() { | 275 void DesktopCaptureDevice::Core::DoStart() { |
276 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 276 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 | 453 |
454 void DesktopCaptureDevice::DeAllocate() { | 454 void DesktopCaptureDevice::DeAllocate() { |
455 core_->DeAllocate(); | 455 core_->DeAllocate(); |
456 } | 456 } |
457 | 457 |
458 const media::VideoCaptureDevice::Name& DesktopCaptureDevice::device_name() { | 458 const media::VideoCaptureDevice::Name& DesktopCaptureDevice::device_name() { |
459 return name_; | 459 return name_; |
460 } | 460 } |
461 | 461 |
462 } // namespace content | 462 } // namespace content |
OLD | NEW |