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

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: 16cf3941 Rebase, comment. Created 6 years, 10 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 SetErrorState("Failed to Stop the Capture device"); 619 SetErrorState("Failed to Stop the Capture device");
620 return; 620 return;
621 } 621 }
622 client_.reset(); 622 client_.reset();
623 state_ = kIdle; 623 state_ = kIdle;
624 } 624 }
625 625
626 // Implements SinkFilterObserver::SinkFilterObserver. 626 // Implements SinkFilterObserver::SinkFilterObserver.
627 void VideoCaptureDeviceWin::FrameReceived(const uint8* buffer, 627 void VideoCaptureDeviceWin::FrameReceived(const uint8* buffer,
628 int length) { 628 int length) {
629 client_->OnIncomingCapturedFrame( 629 client_->OnIncomingCapturedData(
630 buffer, length, base::TimeTicks::Now(), 0, capture_format_); 630 buffer, length, capture_format_, 0, base::TimeTicks::Now());
631 } 631 }
632 632
633 bool VideoCaptureDeviceWin::CreateCapabilityMap() { 633 bool VideoCaptureDeviceWin::CreateCapabilityMap() {
634 DCHECK(CalledOnValidThread()); 634 DCHECK(CalledOnValidThread());
635 ScopedComPtr<IAMStreamConfig> stream_config; 635 ScopedComPtr<IAMStreamConfig> stream_config;
636 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive()); 636 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive());
637 if (FAILED(hr)) { 637 if (FAILED(hr)) {
638 DVLOG(2) << "Failed to get IAMStreamConfig interface from " 638 DVLOG(2) << "Failed to get IAMStreamConfig interface from "
639 "capture device"; 639 "capture device";
640 return false; 640 return false;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 return !capabilities_.empty(); 719 return !capabilities_.empty();
720 } 720 }
721 721
722 void VideoCaptureDeviceWin::SetErrorState(const std::string& reason) { 722 void VideoCaptureDeviceWin::SetErrorState(const std::string& reason) {
723 DCHECK(CalledOnValidThread()); 723 DCHECK(CalledOnValidThread());
724 DVLOG(1) << reason; 724 DVLOG(1) << reason;
725 state_ = kError; 725 state_ = kError;
726 client_->OnError(reason); 726 client_->OnError(reason);
727 } 727 }
728 } // namespace media 728 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698