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

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

Issue 1418263006: Extend VideoCaptureDevice::Client::OnError() to have a tracked_objects::Location param. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/capture/video/win/video_capture_device_mf_win.cc
diff --git a/media/capture/video/win/video_capture_device_mf_win.cc b/media/capture/video/win/video_capture_device_mf_win.cc
index c55cf4aa0be354dcdd2bb7ab332faeac898d9289..95595bd16b2e85c313177732a8b2e8c466b82308 100644
--- a/media/capture/video/win/video_capture_device_mf_win.cc
+++ b/media/capture/video/win/video_capture_device_mf_win.cc
@@ -7,6 +7,7 @@
#include <mfapi.h>
#include <mferror.h>
+#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/strings/stringprintf.h"
#include "base/strings/sys_string_conversions.h"
@@ -260,7 +261,7 @@ void VideoCaptureDeviceMFWin::AllocateAndStart(
}
}
- OnError(hr);
+ OnError(FROM_HERE, hr);
}
void VideoCaptureDeviceMFWin::StopAndDeAllocate() {
@@ -311,14 +312,17 @@ void VideoCaptureDeviceMFWin::OnIncomingCapturedData(
// It's not clear to me why this is, but it is possible that it has
// something to do with this bug:
// http://support.microsoft.com/kb/979567
- OnError(hr);
+ OnError(FROM_HERE, hr);
}
}
}
-void VideoCaptureDeviceMFWin::OnError(HRESULT hr) {
+void VideoCaptureDeviceMFWin::OnError(
+ const tracked_objects::Location& from_here,
+ HRESULT hr) {
if (client_.get()) {
client_->OnError(
+ from_here,
base::StringPrintf("VideoCaptureDeviceMFWin: %s",
logging::SystemErrorCodeToString(hr).c_str()));
}

Powered by Google App Engine
This is Rietveld 408576698