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

Unified Diff: webrtc/modules/congestion_controller/probe_bitrate_estimator.cc

Issue 3016473002: Remove encoding code from RtcEventLogImpl and use RtcEventLogEncoder instead (Closed)
Patch Set: Created 3 years, 3 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
« no previous file with comments | « webrtc/modules/congestion_controller/delay_based_bwe.cc ('k') | webrtc/modules/pacing/bitrate_prober.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
}
« no previous file with comments | « webrtc/modules/congestion_controller/delay_based_bwe.cc ('k') | webrtc/modules/pacing/bitrate_prober.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698