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

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: 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
« no previous file with comments | « media/video/capture/win/video_capture_device_mf_win.cc ('k') | no next file » | 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) 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 SetErrorState("Failed to Stop the Capture device"); 493 SetErrorState("Failed to Stop the Capture device");
494 return; 494 return;
495 } 495 }
496 client_.reset(); 496 client_.reset();
497 state_ = kIdle; 497 state_ = kIdle;
498 } 498 }
499 499
500 // Implements SinkFilterObserver::SinkFilterObserver. 500 // Implements SinkFilterObserver::SinkFilterObserver.
501 void VideoCaptureDeviceWin::FrameReceived(const uint8* buffer, 501 void VideoCaptureDeviceWin::FrameReceived(const uint8* buffer,
502 int length) { 502 int length) {
503 client_->OnIncomingCapturedFrame( 503 client_->OnIncomingCapturedData(
504 buffer, length, base::TimeTicks::Now(), 0, capture_format_); 504 buffer, length, capture_format_, 0, base::TimeTicks::Now());
505 } 505 }
506 506
507 bool VideoCaptureDeviceWin::CreateCapabilityMap() { 507 bool VideoCaptureDeviceWin::CreateCapabilityMap() {
508 DCHECK(CalledOnValidThread()); 508 DCHECK(CalledOnValidThread());
509 ScopedComPtr<IAMStreamConfig> stream_config; 509 ScopedComPtr<IAMStreamConfig> stream_config;
510 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive()); 510 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive());
511 if (FAILED(hr)) { 511 if (FAILED(hr)) {
512 DVLOG(2) << "Failed to get IAMStreamConfig interface from " 512 DVLOG(2) << "Failed to get IAMStreamConfig interface from "
513 "capture device"; 513 "capture device";
514 return false; 514 return false;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 return !capabilities_.empty(); 613 return !capabilities_.empty();
614 } 614 }
615 615
616 void VideoCaptureDeviceWin::SetErrorState(const std::string& reason) { 616 void VideoCaptureDeviceWin::SetErrorState(const std::string& reason) {
617 DCHECK(CalledOnValidThread()); 617 DCHECK(CalledOnValidThread());
618 DVLOG(1) << reason; 618 DVLOG(1) << reason;
619 state_ = kError; 619 state_ = kError;
620 client_->OnError(reason); 620 client_->OnError(reason);
621 } 621 }
622 } // namespace media 622 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/win/video_capture_device_mf_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698