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