| Index: webrtc/modules/congestion_controller/probe_bitrate_estimator.cc
|
| diff --git a/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc b/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc
|
| index 8fa22e7dcd6edfc9f379d5df0c0c225537eac1b5..d5ead51826053954d15c9f77f308d1f75374c7b8 100644
|
| --- a/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc
|
| +++ b/webrtc/modules/congestion_controller/probe_bitrate_estimator.cc
|
| @@ -12,9 +12,12 @@
|
|
|
| #include <algorithm>
|
|
|
| +#include "webrtc/logging/rtc_event_log/events/rtc_event_probe_result_failure.h"
|
| +#include "webrtc/logging/rtc_event_log/events/rtc_event_probe_result_success.h"
|
| #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
|
| #include "webrtc/rtc_base/checks.h"
|
| #include "webrtc/rtc_base/logging.h"
|
| +#include "webrtc/rtc_base/ptr_util.h"
|
|
|
| namespace {
|
| // The minumum number of probes we need to receive feedback about in percent
|
| @@ -103,8 +106,8 @@ int ProbeBitrateEstimator::HandleProbeAndEstimateBitrate(
|
| << "] [send interval: " << send_interval_ms << " ms]"
|
| << " [receive interval: " << receive_interval_ms << " ms]";
|
| if (event_log_) {
|
| - event_log_->LogProbeResultFailure(cluster_id,
|
| - kInvalidSendReceiveInterval);
|
| + event_log_->Log(rtc::MakeUnique<RtcEventProbeResultFailure>(
|
| + cluster_id, kInvalidSendReceiveInterval));
|
| }
|
| return -1;
|
| }
|
| @@ -134,8 +137,10 @@ int ProbeBitrateEstimator::HandleProbeAndEstimateBitrate(
|
| << " [ratio: " << receive_bps / 1000 << " / "
|
| << send_bps / 1000 << " = " << ratio << " > kMaxValidRatio ("
|
| << kMaxValidRatio << ")]";
|
| - if (event_log_)
|
| - event_log_->LogProbeResultFailure(cluster_id, kInvalidSendReceiveRatio);
|
| + if (event_log_) {
|
| + event_log_->Log(rtc::MakeUnique<RtcEventProbeResultFailure>(
|
| + cluster_id, kInvalidSendReceiveRatio));
|
| + }
|
| return -1;
|
| }
|
| LOG(LS_INFO) << "Probing successful"
|
| @@ -154,8 +159,10 @@ int ProbeBitrateEstimator::HandleProbeAndEstimateBitrate(
|
| RTC_DCHECK_GT(send_bps, receive_bps);
|
| res = kTargetUtilizationFraction * receive_bps;
|
| }
|
| - if (event_log_)
|
| - event_log_->LogProbeResultSuccess(cluster_id, res);
|
| + if (event_log_) {
|
| + event_log_->Log(
|
| + rtc::MakeUnique<RtcEventProbeResultSuccess>(cluster_id, res));
|
| + }
|
| estimated_bitrate_bps_ = rtc::Optional<int>(res);
|
| return *estimated_bitrate_bps_;
|
| }
|
|
|