Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: media/video/capture/win/video_capture_device_mf_win.cc

Issue 489183003: Log error messages in windows video capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed unnecessary newline Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/video/capture/win/video_capture_device_mf_win.cc
diff --git a/media/video/capture/win/video_capture_device_mf_win.cc b/media/video/capture/win/video_capture_device_mf_win.cc
index de1f6eb2dfff6056305637b94937a86eedae0b95..16475d8ce29f3146fdc2d6d1a3604651e667b694 100644
--- a/media/video/capture/win/video_capture_device_mf_win.cc
+++ b/media/video/capture/win/video_capture_device_mf_win.cc
@@ -332,7 +332,12 @@ void VideoCaptureDeviceMFWin::OnIncomingCapturedData(
}
void VideoCaptureDeviceMFWin::OnError(HRESULT hr) {
- std::string log_msg = base::StringPrintf("VideoCaptureDeviceMFWin: %x", hr);
+ const std::string last_err_msg =
+ logging::SystemErrorCodeToString(logging::GetLastSystemErrorCode());
+ const std::string log_msg =
+ base::StringPrintf("VideoCaptureDeviceMFWin: %x, OS message: %s",
+ hr,
+ last_err_msg.c_str());
DLOG(ERROR) << log_msg;
if (client_.get())
client_->OnError(log_msg);

Powered by Google App Engine
This is Rietveld 408576698