Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Side by Side Diff: content/browser/renderer_host/media/desktop_capture_device.cc

Issue 22876027: Consolidate duplicated frame / capability structures in video_capture_types.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased: changed media::VideoCaptureCapability::kI420 -> media::PIXEL_FORMAT_I420 etc. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/media/desktop_capture_device_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/desktop_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698