| 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 e47d4917e9fd66e46cf765b12aff157e16e8b571..a1b78a257c6620fae93bbfd9dc1a7f53fceda5e4 100644
|
| --- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
|
| +++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
|
| @@ -44,7 +44,7 @@
|
|
|
| } // namespace
|
|
|
| -SendSideBandwidthEstimation::SendSideBandwidthEstimation(RtcEventLog* event_log)
|
| +SendSideBandwidthEstimation::SendSideBandwidthEstimation()
|
| : lost_packets_since_last_loss_update_Q8_(0),
|
| expected_packets_since_last_loss_update_(0),
|
| bitrate_(0),
|
| @@ -63,9 +63,7 @@
|
| bitrate_at_2_seconds_kbps_(0),
|
| uma_update_state_(kNoUpdate),
|
| rampup_uma_stats_updated_(kNumUmaRampupMetrics, false),
|
| - event_log_(event_log) {
|
| - RTC_DCHECK(event_log);
|
| -}
|
| + event_log_(nullptr) {}
|
|
|
| SendSideBandwidthEstimation::~SendSideBandwidthEstimation() {}
|
|
|
| @@ -229,9 +227,11 @@
|
| // rates).
|
| bitrate_ += 1000;
|
|
|
| - event_log_->LogBwePacketLossEvent(
|
| - bitrate_, last_fraction_loss_,
|
| - expected_packets_since_last_loss_update_);
|
| + if (event_log_) {
|
| + event_log_->LogBwePacketLossEvent(
|
| + bitrate_, last_fraction_loss_,
|
| + expected_packets_since_last_loss_update_);
|
| + }
|
| } else if (last_fraction_loss_ <= 26) {
|
| // Loss between 2% - 10%: Do nothing.
|
| } else {
|
| @@ -250,9 +250,11 @@
|
| 512.0);
|
| has_decreased_since_last_fraction_loss_ = true;
|
| }
|
| - event_log_->LogBwePacketLossEvent(
|
| - bitrate_, last_fraction_loss_,
|
| - expected_packets_since_last_loss_update_);
|
| + if (event_log_) {
|
| + event_log_->LogBwePacketLossEvent(
|
| + bitrate_, last_fraction_loss_,
|
| + expected_packets_since_last_loss_update_);
|
| + }
|
| }
|
| }
|
| bitrate_ = CapBitrateToThresholds(now_ms, bitrate_);
|
| @@ -306,4 +308,9 @@
|
| }
|
| return bitrate;
|
| }
|
| +
|
| +void SendSideBandwidthEstimation::SetEventLog(RtcEventLog* event_log) {
|
| + event_log_ = event_log;
|
| +}
|
| +
|
| } // namespace webrtc
|
|
|