Index: media/video/capture/win/video_capture_device_win.cc |
diff --git a/media/video/capture/win/video_capture_device_win.cc b/media/video/capture/win/video_capture_device_win.cc |
index a7d1f104cdc2bbaf16f2ec9849809dc77bf6cb4d..abf9796bb5aa0bc12e3d9a9da14afdc735808484 100644 |
--- a/media/video/capture/win/video_capture_device_win.cc |
+++ b/media/video/capture/win/video_capture_device_win.cc |
@@ -68,8 +68,8 @@ HRESULT VideoCaptureDeviceWin::GetDeviceFilter( |
// We have found the requested device |
hr = moniker->BindToObject(0, 0, IID_IBaseFilter, |
capture_filter.ReceiveVoid()); |
- DVPLOG_IF(2, FAILED(hr)) << "Failed to bind camera filter."; |
- break; |
+ DPLOG_IF(ERROR, FAILED(hr)) << "Failed to bind camera filter"; |
+ break; // TODO(magjed): Should we return E_FAIL here instead of break? |
tommi (sloooow) - chröme
2014/08/28 08:48:46
well, we certainly shouldn't return if |hr| indica
magjed_chromium
2014/08/28 14:50:39
Done.
|
} |
} |
moniker.Release(); |
@@ -224,21 +224,21 @@ bool VideoCaptureDeviceWin::Init() { |
DCHECK(CalledOnValidThread()); |
HRESULT hr = GetDeviceFilter(device_name_, capture_filter_.Receive()); |
if (!capture_filter_) { |
- DVLOG(2) << "Failed to create capture filter."; |
+ DPLOG(ERROR) << "Failed to create capture filter"; |
tommi (sloooow) - chröme
2014/08/28 08:48:46
FWIW - all the 'P's in the DPLOG() here are pretty
|
return false; |
} |
output_capture_pin_ = |
GetPin(capture_filter_, PINDIR_OUTPUT, PIN_CATEGORY_CAPTURE); |
if (!output_capture_pin_) { |
- DVLOG(2) << "Failed to get capture output pin"; |
+ DPLOG(ERROR) << "Failed to get capture output pin"; |
return false; |
} |
// Create the sink filter used for receiving Captured frames. |
sink_filter_ = new SinkFilter(this); |
if (sink_filter_ == NULL) { |
- DVLOG(2) << "Failed to create send filter"; |
+ DPLOG(ERROR) << "Failed to create send filter"; |
return false; |
} |
@@ -247,25 +247,25 @@ bool VideoCaptureDeviceWin::Init() { |
hr = graph_builder_.CreateInstance(CLSID_FilterGraph, NULL, |
CLSCTX_INPROC_SERVER); |
if (FAILED(hr)) { |
- DVLOG(2) << "Failed to create graph builder."; |
+ DPLOG(ERROR) << "Failed to create graph builder"; |
return false; |
} |
hr = graph_builder_.QueryInterface(media_control_.Receive()); |
if (FAILED(hr)) { |
- DVLOG(2) << "Failed to create media control builder."; |
+ DPLOG(ERROR) << "Failed to create media control builder"; |
return false; |
} |
hr = graph_builder_->AddFilter(capture_filter_, NULL); |
if (FAILED(hr)) { |
- DVLOG(2) << "Failed to add the capture device to the graph."; |
+ DPLOG(ERROR) << "Failed to add the capture device to the graph"; |
return false; |
} |
hr = graph_builder_->AddFilter(sink_filter_, NULL); |
if (FAILED(hr)) { |
- DVLOG(2)<< "Failed to add the send filter to the graph."; |
+ DPLOG(ERROR)<< "Failed to add the send filter to the graph"; |
return false; |
} |
@@ -438,20 +438,20 @@ bool VideoCaptureDeviceWin::CreateCapabilityMap() { |
ScopedComPtr<IAMStreamConfig> stream_config; |
HRESULT hr = output_capture_pin_.QueryInterface(stream_config.Receive()); |
if (FAILED(hr)) { |
- DVLOG(2) << "Failed to get IAMStreamConfig interface from " |
- "capture device"; |
+ DPLOG(ERROR) << "Failed to get IAMStreamConfig interface from " |
+ "capture device"; |
return false; |
} |
// Get interface used for getting the frame rate. |
ScopedComPtr<IAMVideoControl> video_control; |
hr = capture_filter_.QueryInterface(video_control.Receive()); |
- DVLOG_IF(2, FAILED(hr)) << "IAMVideoControl Interface NOT SUPPORTED"; |
+ DPLOG_IF(WARNING, FAILED(hr)) << "IAMVideoControl Interface NOT SUPPORTED"; |
int count = 0, size = 0; |
hr = stream_config->GetNumberOfCapabilities(&count, &size); |
if (FAILED(hr)) { |
- DVLOG(2) << "Failed to GetNumberOfCapabilities"; |
+ DPLOG(ERROR) << "Failed to GetNumberOfCapabilities"; |
return false; |
} |
@@ -462,7 +462,7 @@ bool VideoCaptureDeviceWin::CreateCapabilityMap() { |
// GetStreamCaps() may return S_FALSE, so don't use FAILED() or SUCCEED() |
// macros here since they'll trigger incorrectly. |
if (hr != S_OK) { |
- DVLOG(2) << "Failed to GetStreamCaps"; |
+ DPLOG(ERROR) << "Failed to GetStreamCaps"; |
return false; |
} |
@@ -544,7 +544,7 @@ void VideoCaptureDeviceWin::SetAntiFlickerInCaptureFilter() { |
hr = ks_propset->Set(PROPSETID_VIDCAP_VIDEOPROCAMP, |
KSPROPERTY_VIDEOPROCAMP_POWERLINE_FREQUENCY, |
&data, sizeof(data), &data, sizeof(data)); |
- DVLOG_IF(ERROR, FAILED(hr)) << "Anti-flicker setting failed."; |
+ DPLOG_IF(ERROR, FAILED(hr)) << "Anti-flicker setting failed"; |
DVLOG_IF(2, SUCCEEDED(hr)) << "Anti-flicker set correctly."; |
} else { |
DVLOG(2) << "Anti-flicker setting not supported."; |
@@ -553,7 +553,6 @@ void VideoCaptureDeviceWin::SetAntiFlickerInCaptureFilter() { |
void VideoCaptureDeviceWin::SetErrorState(const std::string& reason) { |
DCHECK(CalledOnValidThread()); |
- DVLOG(1) << reason; |
state_ = kError; |
client_->OnError(reason); |
} |