Chromium Code Reviews| 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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 // fail with HRESULT_FROM_WINHRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION). | 325 // fail with HRESULT_FROM_WINHRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION). |
| 326 // It's not clear to me why this is, but it is possible that it has | 326 // It's not clear to me why this is, but it is possible that it has |
| 327 // something to do with this bug: | 327 // something to do with this bug: |
| 328 // http://support.microsoft.com/kb/979567 | 328 // http://support.microsoft.com/kb/979567 |
| 329 OnError(hr); | 329 OnError(hr); |
| 330 } | 330 } |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 | 333 |
| 334 void VideoCaptureDeviceMFWin::OnError(HRESULT hr) { | 334 void VideoCaptureDeviceMFWin::OnError(HRESULT hr) { |
| 335 std::string log_msg = base::StringPrintf("VideoCaptureDeviceMFWin: %x", hr); | 335 const std::string log_msg = |
| 336 DLOG(ERROR) << log_msg; | 336 base::StringPrintf("VideoCaptureDeviceMFWin: %x", hr); |
| 337 const std::string last_error_message = | |
| 338 logging::SystemErrorCodeToString(logging::GetLastSystemErrorCode()); | |
| 339 DPLOG(ERROR) << log_msg; | |
|
mcasas
2014/08/26 15:38:18
l.338 will in all probability clear the last error
magjed_chromium
2014/08/26 17:20:28
Done. Btw, I don't think GetLastSystemErrorCode cl
| |
| 337 if (client_.get()) | 340 if (client_.get()) |
| 338 client_->OnError(log_msg); | 341 client_->OnError(log_msg + " : " + last_error_message); |
| 339 } | 342 } |
| 340 | 343 |
| 341 } // namespace media | 344 } // namespace media |
| OLD | NEW |