Add histogram for FallbackDesktopCapturerWrapper and BlankDetectorDesktopCapturerWrapper
We should record the number of fallbacks and blank frames. Bug: webrtc:8040 Change-Id: I92e7b7d7b4664fee6d6bd636609e80e532aa4bd4 Reviewed-on: https://chromium-review.googlesource.com/587688 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Zijie He <zijiehe@chromium.org> Cr-Commit-Position: refs/heads/master@{#19161}
This commit is contained in:
parent
d21eab3eea
commit
ecf3d53088
@ -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));
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <utility>
|
||||
|
||||
#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<DesktopFrame> 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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user