| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/strings/stringprintf.h" |
| 12 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
| 13 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
| 14 #include "base/win/scoped_co_mem.h" | 15 #include "base/win/scoped_co_mem.h" |
| 15 #include "base/win/windows_version.h" | 16 #include "base/win/windows_version.h" |
| 16 #include "media/video/capture/win/capability_list_win.h" | 17 #include "media/video/capture/win/capability_list_win.h" |
| 17 | 18 |
| 18 using base::win::ScopedCoMem; | 19 using base::win::ScopedCoMem; |
| 19 using base::win::ScopedComPtr; | 20 using base::win::ScopedComPtr; |
| 20 | 21 |
| 21 namespace media { | 22 namespace media { |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 // fail with HRESULT_FROM_WINHRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION). | 426 // fail with HRESULT_FROM_WINHRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION). |
| 426 // It's not clear to me why this is, but it is possible that it has | 427 // It's not clear to me why this is, but it is possible that it has |
| 427 // something to do with this bug: | 428 // something to do with this bug: |
| 428 // http://support.microsoft.com/kb/979567 | 429 // http://support.microsoft.com/kb/979567 |
| 429 OnError(hr); | 430 OnError(hr); |
| 430 } | 431 } |
| 431 } | 432 } |
| 432 } | 433 } |
| 433 | 434 |
| 434 void VideoCaptureDeviceMFWin::OnError(HRESULT hr) { | 435 void VideoCaptureDeviceMFWin::OnError(HRESULT hr) { |
| 435 DLOG(ERROR) << "VideoCaptureDeviceMFWin: " << std::hex << hr; | 436 std::string log_msg = base::StringPrintf("VideoCaptureDeviceMFWin: %x", hr); |
| 437 DLOG(ERROR) << log_msg; |
| 436 if (client_.get()) | 438 if (client_.get()) |
| 437 client_->OnError(); | 439 client_->OnError(log_msg); |
| 438 } | 440 } |
| 439 | 441 |
| 440 } // namespace media | 442 } // namespace media |
| OLD | NEW |