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

Side by Side Diff: media/video/capture/win/video_capture_device_win.cc

Issue 83793004: Implement IPCs and VideoCapture::Client interfaces for texture capture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 5744a8bbb Nits. Created 6 years, 11 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) 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 "media/video/capture/win/video_capture_device_win.h" 5 #include "media/video/capture/win/video_capture_device_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 return; 471 return;
472 } 472 }
473 client_.reset(); 473 client_.reset();
474 state_ = kIdle; 474 state_ = kIdle;
475 } 475 }
476 476
477 // Implements SinkFilterObserver::SinkFilterObserver. 477 // Implements SinkFilterObserver::SinkFilterObserver.
478 void VideoCaptureDeviceWin::FrameReceived(const uint8* buffer, 478 void VideoCaptureDeviceWin::FrameReceived(const uint8* buffer,
479 int length) { 479 int length) {
480 client_->OnIncomingCapturedFrame( 480 client_->OnIncomingCapturedFrame(
481 buffer, length, base::TimeTicks::Now(), 0, capture_format_); 481 buffer, length, capture_format_, 0, base::TimeTicks::Now());
482 } 482 }
483 483
484 bool VideoCaptureDeviceWin::CreateCapabilityMap() { 484 bool VideoCaptureDeviceWin::CreateCapabilityMap() {
485 DCHECK(CalledOnValidThread()); 485 DCHECK(CalledOnValidThread());
486 ScopedComPtr<IAMStreamConfig> stream_config; 486 ScopedComPtr<IAMStreamConfig> stream_config;
487 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive()); 487 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive());
488 if (FAILED(hr)) { 488 if (FAILED(hr)) {
489 DVLOG(2) << "Failed to get IAMStreamConfig interface from " 489 DVLOG(2) << "Failed to get IAMStreamConfig interface from "
490 "capture device"; 490 "capture device";
491 return false; 491 return false;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 return !capabilities_.empty(); 590 return !capabilities_.empty();
591 } 591 }
592 592
593 void VideoCaptureDeviceWin::SetErrorState(const char* reason) { 593 void VideoCaptureDeviceWin::SetErrorState(const char* reason) {
594 DCHECK(CalledOnValidThread()); 594 DCHECK(CalledOnValidThread());
595 DVLOG(1) << reason; 595 DVLOG(1) << reason;
596 state_ = kError; 596 state_ = kError;
597 client_->OnError(); 597 client_->OnError();
598 } 598 }
599 } // namespace media 599 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698