diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc index 111521ea2e..2fa60a104c 100644 --- a/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc +++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc @@ -28,7 +28,8 @@ FullBweSender::FullBweSender(int kbps, BitrateObserver* observer, Clock* clock) clock_(clock), send_time_history_(clock_, 10000), has_received_ack_(false), - last_acked_seq_num_(0) { + last_acked_seq_num_(0), + last_log_time_ms_(0) { assert(kbps >= kMinBitrateKbps); assert(kbps <= kMaxBitrateKbps); bitrate_controller_->SetStartBitrate(1000 * kbps); @@ -52,7 +53,11 @@ void FullBweSender::GiveFeedback(const FeedbackPacket& feedback) { std::vector packet_feedback_vector(fb.packet_feedback_vector()); for (PacketInfo& packet_info : packet_feedback_vector) { if (!send_time_history_.GetInfo(&packet_info, true)) { - LOG(LS_WARNING) << "Ack arrived too late."; + int64_t now_ms = clock_->TimeInMilliseconds(); + if (now_ms - last_log_time_ms_ > 5000) { + LOG(LS_WARNING) << "Ack arrived too late."; + last_log_time_ms_ = now_ms; + } } } diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h index 51e29e34c2..ca7f6dbddc 100644 --- a/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h +++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h @@ -45,6 +45,7 @@ class FullBweSender : public BweSender, public RemoteBitrateObserver { SendTimeHistory send_time_history_; bool has_received_ack_; uint16_t last_acked_seq_num_; + int64_t last_log_time_ms_; RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FullBweSender); };