| 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_mf_win.h" | 5 #include "media/video/capture/win/video_capture_device_mf_win.h" |
| 6 | 6 |
| 7 #include <mfapi.h> | 7 #include <mfapi.h> |
| 8 #include <mferror.h> | 8 #include <mferror.h> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 base::AutoLock lock(lock_); | 434 base::AutoLock lock(lock_); |
| 435 observer_ = NULL; | 435 observer_ = NULL; |
| 436 } | 436 } |
| 437 | 437 |
| 438 const VideoCaptureDevice::Name& VideoCaptureDeviceMFWin::device_name() { | 438 const VideoCaptureDevice::Name& VideoCaptureDeviceMFWin::device_name() { |
| 439 DCHECK(CalledOnValidThread()); | 439 DCHECK(CalledOnValidThread()); |
| 440 return name_; | 440 return name_; |
| 441 } | 441 } |
| 442 | 442 |
| 443 void VideoCaptureDeviceMFWin::GetDeviceSupportedFormats( |
| 444 const std::string& device_name, |
| 445 VideoCaptureFormats* capture_formats) { |
| 446 NOTIMPLEMENTED(); |
| 447 } |
| 448 |
| 443 void VideoCaptureDeviceMFWin::OnIncomingCapturedFrame( | 449 void VideoCaptureDeviceMFWin::OnIncomingCapturedFrame( |
| 444 const uint8* data, | 450 const uint8* data, |
| 445 int length, | 451 int length, |
| 446 const base::Time& time_stamp, | 452 const base::Time& time_stamp, |
| 447 int rotation, | 453 int rotation, |
| 448 bool flip_vert, | 454 bool flip_vert, |
| 449 bool flip_horiz) { | 455 bool flip_horiz) { |
| 450 base::AutoLock lock(lock_); | 456 base::AutoLock lock(lock_); |
| 451 if (data && observer_) | 457 if (data && observer_) |
| 452 observer_->OnIncomingCapturedFrame(data, length, time_stamp, | 458 observer_->OnIncomingCapturedFrame(data, length, time_stamp, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 466 } | 472 } |
| 467 } | 473 } |
| 468 | 474 |
| 469 void VideoCaptureDeviceMFWin::OnError(HRESULT hr) { | 475 void VideoCaptureDeviceMFWin::OnError(HRESULT hr) { |
| 470 DLOG(ERROR) << "VideoCaptureDeviceMFWin: " << std::hex << hr; | 476 DLOG(ERROR) << "VideoCaptureDeviceMFWin: " << std::hex << hr; |
| 471 if (observer_) | 477 if (observer_) |
| 472 observer_->OnError(); | 478 observer_->OnError(); |
| 473 } | 479 } |
| 474 | 480 |
| 475 } // namespace media | 481 } // namespace media |
| OLD | NEW |