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

Unified Diff: webrtc/modules/remote_bitrate_estimator/send_time_history.cc

Issue 2755553003: Ignore packets sent on old network route when receiving feedback. (Closed)
Patch Set: Comments addressed. Created 3 years, 9 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/remote_bitrate_estimator/send_time_history.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/send_time_history.cc b/webrtc/modules/remote_bitrate_estimator/send_time_history.cc
index 1c5ca12f5afadf34be43a9f3ee42eb3ed940208e..de9246c65d43d5aa9af38b30ba0a3ff2001af263 100644
--- a/webrtc/modules/remote_bitrate_estimator/send_time_history.cc
+++ b/webrtc/modules/remote_bitrate_estimator/send_time_history.cc
@@ -22,13 +22,7 @@ SendTimeHistory::SendTimeHistory(const Clock* clock,
SendTimeHistory::~SendTimeHistory() {}
-void SendTimeHistory::Clear() {
- history_.clear();
-}
-
-void SendTimeHistory::AddAndRemoveOld(uint16_t sequence_number,
- size_t payload_size,
- const PacedPacketInfo& pacing_info) {
+void SendTimeHistory::AddAndRemoveOld(const PacketFeedback& packet) {
int64_t now_ms = clock_->TimeInMilliseconds();
// Remove old.
while (!history_.empty() &&
@@ -39,14 +33,8 @@ void SendTimeHistory::AddAndRemoveOld(uint16_t sequence_number,
}
// Add new.
- int64_t unwrapped_seq_num = seq_num_unwrapper_.Unwrap(sequence_number);
- int64_t creation_time_ms = now_ms;
- constexpr int64_t kNoArrivalTimeMs = -1; // Arrival time is ignored.
- constexpr int64_t kNoSendTimeMs = -1; // Send time is set by OnSentPacket.
- history_.insert(std::make_pair(
- unwrapped_seq_num,
- PacketFeedback(creation_time_ms, kNoArrivalTimeMs, kNoSendTimeMs,
- sequence_number, payload_size, pacing_info)));
+ int64_t unwrapped_seq_num = seq_num_unwrapper_.Unwrap(packet.sequence_number);
+ history_.insert(std::make_pair(unwrapped_seq_num, packet));
}
bool SendTimeHistory::OnSentPacket(uint16_t sequence_number,

Powered by Google App Engine
This is Rietveld 408576698