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

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

Issue 83793004: Implement IPCs and VideoCapture::Client interfaces for texture capture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: e296ac98 Win32 bits. Created 6 years, 9 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 | Annotate | Revision Log
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/media/capture/desktop_capture_device.h" 5 #include "content/browser/media/capture/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
225 output_frame_->stride() * output_rect_.top() + 225 output_frame_->stride() * output_rect_.top() +
226 webrtc::DesktopFrame::kBytesPerPixel * output_rect_.left(); 226 webrtc::DesktopFrame::kBytesPerPixel * output_rect_.left();
227 libyuv::ARGBScale(frame->data(), frame->stride(), 227 libyuv::ARGBScale(frame->data(), frame->stride(),
228 frame->size().width(), frame->size().height(), 228 frame->size().width(), frame->size().height(),
229 output_rect_data, output_frame_->stride(), 229 output_rect_data, output_frame_->stride(),
230 output_rect_.width(), output_rect_.height(), 230 output_rect_.width(), output_rect_.height(),
231 libyuv::kFilterBilinear); 231 libyuv::kFilterBilinear);
232 output_data = output_frame_->data(); 232 output_data = output_frame_->data();
233 } 233 }
234 234
235 client_->OnIncomingCapturedFrame( 235 client_->OnIncomingCapturedData(
236 output_data, output_bytes, base::TimeTicks::Now(), 0, capture_format_); 236 output_data, output_bytes, capture_format_, 0, base::TimeTicks::Now());
237 } 237 }
238 238
239 void DesktopCaptureDevice::Core::DoAllocateAndStart( 239 void DesktopCaptureDevice::Core::DoAllocateAndStart(
240 const media::VideoCaptureParams& params, 240 const media::VideoCaptureParams& params,
241 scoped_ptr<Client> client) { 241 scoped_ptr<Client> client) {
242 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 242 DCHECK(task_runner_->RunsTasksOnCurrentThread());
243 DCHECK(desktop_capturer_); 243 DCHECK(desktop_capturer_);
244 DCHECK(client.get()); 244 DCHECK(client.get());
245 DCHECK(!client_.get()); 245 DCHECK(!client_.get());
246 246
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 const media::VideoCaptureParams& params, 412 const media::VideoCaptureParams& params,
413 scoped_ptr<Client> client) { 413 scoped_ptr<Client> client) {
414 core_->AllocateAndStart(params, client.Pass()); 414 core_->AllocateAndStart(params, client.Pass());
415 } 415 }
416 416
417 void DesktopCaptureDevice::StopAndDeAllocate() { 417 void DesktopCaptureDevice::StopAndDeAllocate() {
418 core_->StopAndDeAllocate(); 418 core_->StopAndDeAllocate();
419 } 419 }
420 420
421 } // namespace content 421 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698