diff --git a/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc b/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc index 13d50d5032..4f88d94b09 100644 --- a/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc +++ b/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc @@ -15,6 +15,7 @@ #include "webrtc/modules/desktop_capture/desktop_geometry.h" #include "webrtc/rtc_base/checks.h" +#include "webrtc/system_wrappers/include/metrics.h" namespace webrtc { @@ -78,6 +79,8 @@ void BlankDetectorDesktopCapturerWrapper::OnCaptureResult( last_frame_is_blank_ = IsBlankFrame(*frame); is_first_frame_ = false; } + RTC_HISTOGRAM_BOOLEAN("WebRTC.DesktopCapture.BlankFrameDetected", + last_frame_is_blank_); if (!last_frame_is_blank_) { non_blank_frame_received_ = true; callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); diff --git a/webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc b/webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc index 0fd9b8aebf..8051026ffd 100644 --- a/webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc +++ b/webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc @@ -13,6 +13,7 @@ #include #include "webrtc/rtc_base/checks.h" +#include "webrtc/system_wrappers/include/metrics.h" namespace webrtc { @@ -145,6 +146,10 @@ void FallbackDesktopCapturerWrapper::OnCaptureResult( Result result, std::unique_ptr frame) { RTC_DCHECK(callback_); + RTC_HISTOGRAM_BOOLEAN("WebRTC.DesktopCapture.PrimaryCapturerError", + result != Result::SUCCESS); + RTC_HISTOGRAM_BOOLEAN("WebRTC.DesktopCapture.PrimaryCapturerPermanentError", + result == Result::ERROR_PERMANENT); if (result == Result::SUCCESS) { callback_->OnCaptureResult(result, std::move(frame)); return;