| OLD | NEW |
| 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 Loading... |
| 471 SetErrorState("Failed to Stop the Capture device"); | 471 SetErrorState("Failed to Stop the Capture device"); |
| 472 return; | 472 return; |
| 473 } | 473 } |
| 474 client_.reset(); | 474 client_.reset(); |
| 475 state_ = kIdle; | 475 state_ = kIdle; |
| 476 } | 476 } |
| 477 | 477 |
| 478 // Implements SinkFilterObserver::SinkFilterObserver. | 478 // Implements SinkFilterObserver::SinkFilterObserver. |
| 479 void VideoCaptureDeviceWin::FrameReceived(const uint8* buffer, | 479 void VideoCaptureDeviceWin::FrameReceived(const uint8* buffer, |
| 480 int length) { | 480 int length) { |
| 481 client_->OnIncomingCapturedFrame(buffer, length, base::Time::Now(), | 481 client_->OnIncomingCapturedFrame( |
| 482 0, false, false, current_setting_); | 482 buffer, length, base::Time::Now(), 0, false, false, current_setting_); |
| 483 } | 483 } |
| 484 | 484 |
| 485 bool VideoCaptureDeviceWin::CreateCapabilityMap() { | 485 bool VideoCaptureDeviceWin::CreateCapabilityMap() { |
| 486 DCHECK(CalledOnValidThread()); | 486 DCHECK(CalledOnValidThread()); |
| 487 ScopedComPtr<IAMStreamConfig> stream_config; | 487 ScopedComPtr<IAMStreamConfig> stream_config; |
| 488 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive()); | 488 HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive()); |
| 489 if (FAILED(hr)) { | 489 if (FAILED(hr)) { |
| 490 DVLOG(2) << "Failed to get IAMStreamConfig interface from " | 490 DVLOG(2) << "Failed to get IAMStreamConfig interface from " |
| 491 "capture device"; | 491 "capture device"; |
| 492 return false; | 492 return false; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 return !capabilities_.empty(); | 588 return !capabilities_.empty(); |
| 589 } | 589 } |
| 590 | 590 |
| 591 void VideoCaptureDeviceWin::SetErrorState(const char* reason) { | 591 void VideoCaptureDeviceWin::SetErrorState(const char* reason) { |
| 592 DCHECK(CalledOnValidThread()); | 592 DCHECK(CalledOnValidThread()); |
| 593 DVLOG(1) << reason; | 593 DVLOG(1) << reason; |
| 594 state_ = kError; | 594 state_ = kError; |
| 595 client_->OnError(); | 595 client_->OnError(); |
| 596 } | 596 } |
| 597 } // namespace media | 597 } // namespace media |
| OLD | NEW |