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

Side by Side 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: fixed syntax error Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698