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

Unified Diff: webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc

Issue 2353033005: Refactoring: move ownership of RtcEventLog from Call to PeerConnection (Closed)
Patch Set: Moved DEPS entry to subdirectory Created 4 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
Index: webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
index f306fb255dc060c386569e343b19199eada30ab8..d1a88355f18b5c0ae7e4eae2690d5685a5ded65f 100644
--- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
+++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
@@ -75,7 +75,6 @@ SendSideBandwidthEstimation::SendSideBandwidthEstimation(RtcEventLog* event_log)
last_rtc_event_log_ms_(-1),
in_timeout_experiment_(webrtc::field_trial::FindFullName(
"WebRTC-SendSideBwe") == "Enabled") {
- RTC_DCHECK(event_log);
}
SendSideBandwidthEstimation::~SendSideBandwidthEstimation() {}
@@ -281,10 +280,10 @@ void SendSideBandwidthEstimation::UpdateEstimate(int64_t now_ms) {
}
}
uint32_t capped_bitrate = CapBitrateToThresholds(now_ms, bitrate_);
- if (capped_bitrate != bitrate_ ||
- last_fraction_loss_ != last_logged_fraction_loss_ ||
- last_rtc_event_log_ms_ == -1 ||
- now_ms - last_rtc_event_log_ms_ > kRtcEventLogPeriodMs) {
+ if (event_log_ && (capped_bitrate != bitrate_ ||
+ last_fraction_loss_ != last_logged_fraction_loss_ ||
+ last_rtc_event_log_ms_ == -1 ||
+ now_ms - last_rtc_event_log_ms_ > kRtcEventLogPeriodMs)) {
event_log_->LogBwePacketLossEvent(capped_bitrate, last_fraction_loss_,
expected_packets_since_last_loss_update_);
last_logged_fraction_loss_ = last_fraction_loss_;

Powered by Google App Engine
This is Rietveld 408576698