Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 it != packet_arrival_times_.end() && it->first < seq && | 99 it != packet_arrival_times_.end() && it->first < seq && |
| 100 arrival_time - it->second >= kBackWindowMs;) { | 100 arrival_time - it->second >= kBackWindowMs;) { |
| 101 auto delete_it = it; | 101 auto delete_it = it; |
| 102 ++it; | 102 ++it; |
| 103 packet_arrival_times_.erase(delete_it); | 103 packet_arrival_times_.erase(delete_it); |
| 104 } | 104 } |
| 105 } else if (seq < window_start_seq_) { | 105 } else if (seq < window_start_seq_) { |
| 106 window_start_seq_ = seq; | 106 window_start_seq_ = seq; |
| 107 } | 107 } |
| 108 | 108 |
| 109 RTC_DCHECK(packet_arrival_times_.end() == packet_arrival_times_.find(seq)); | 109 // We are only interested in the first time a packet is received. |
|
sprang_webrtc
2016/02/25 10:40:35
Note that the same sequence can appear again in th
| |
| 110 if (packet_arrival_times_.find(seq) != packet_arrival_times_.end()) | |
| 111 return; | |
| 110 | 112 |
| 111 packet_arrival_times_[seq] = arrival_time; | 113 packet_arrival_times_[seq] = arrival_time; |
| 112 } | 114 } |
| 113 | 115 |
| 114 bool RemoteEstimatorProxy::BuildFeedbackPacket( | 116 bool RemoteEstimatorProxy::BuildFeedbackPacket( |
| 115 rtcp::TransportFeedback* feedback_packet) { | 117 rtcp::TransportFeedback* feedback_packet) { |
| 116 rtc::CritScope cs(&lock_); | 118 rtc::CritScope cs(&lock_); |
| 117 if (window_start_seq_ == -1) | 119 if (window_start_seq_ == -1) |
| 118 return false; | 120 return false; |
| 119 | 121 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 145 // they need to be re-sent after a reordering. Removal will be handled | 147 // they need to be re-sent after a reordering. Removal will be handled |
| 146 // by OnPacketArrival once packets are too old. | 148 // by OnPacketArrival once packets are too old. |
| 147 } | 149 } |
| 148 if (it == packet_arrival_times_.end()) | 150 if (it == packet_arrival_times_.end()) |
| 149 window_start_seq_ = -1; | 151 window_start_seq_ = -1; |
| 150 | 152 |
| 151 return true; | 153 return true; |
| 152 } | 154 } |
| 153 | 155 |
| 154 } // namespace webrtc | 156 } // namespace webrtc |
| OLD | NEW |