From 4f8ccc3c601dadbbaba820e854e3c8d94a43ab5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Terelius?= Date: Thu, 14 Sep 2023 10:07:53 +0200 Subject: [PATCH] Ensure the sequence number is initialized in DelayBasedBweTest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sequence number is generally not used for the estimation, but may be used as a tie-breaker when ordering packet feedbacks. Bug: b/299667054 Change-Id: I52a5145c889c8f6924838667cc267b1cd9565f7b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320240 Commit-Queue: Björn Terelius Reviewed-by: Mirko Bonadei Reviewed-by: Per Kjellander Cr-Commit-Position: refs/heads/main@{#40749} --- .../goog_cc/delay_based_bwe_unittest_helper.cc | 2 ++ .../goog_cc/delay_based_bwe_unittest_helper.h | 1 + 2 files changed, 3 insertions(+) diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc index 073e3f9081..16bd4153a6 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc +++ b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc @@ -166,6 +166,7 @@ DelayBasedBweTest::DelayBasedBweTest() stream_generator_(new test::StreamGenerator(1e6, // Capacity. clock_.TimeInMicroseconds())), arrival_time_offset_ms_(0), + next_sequence_number_(0), first_update_(true) {} DelayBasedBweTest::~DelayBasedBweTest() {} @@ -201,6 +202,7 @@ void DelayBasedBweTest::IncomingFeedback(Timestamp receive_time, packet.sent_packet.send_time = send_time; packet.sent_packet.size = DataSize::Bytes(payload_size); packet.sent_packet.pacing_info = pacing_info; + packet.sent_packet.sequence_number = next_sequence_number_++; if (packet.sent_packet.pacing_info.probe_cluster_id != PacedPacketInfo::kNotAProbe) probe_bitrate_estimator_->HandleProbeAndEstimateBitrate(packet); diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h index 4b06173cdb..89eb1a353f 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h +++ b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h @@ -180,6 +180,7 @@ class DelayBasedBweTest : public ::testing::Test { std::unique_ptr bitrate_estimator_; std::unique_ptr stream_generator_; int64_t arrival_time_offset_ms_; + int64_t next_sequence_number_; bool first_update_; };