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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 std::vector<PacketInfo> packet_feedback_vector(fb.packet_feedback_vector()); | 54 std::vector<PacketInfo> packet_feedback_vector(fb.packet_feedback_vector()); |
55 for (PacketInfo& packet : packet_feedback_vector) { | 55 for (PacketInfo& packet : packet_feedback_vector) { |
56 if (!send_time_history_.GetSendTime(packet.sequence_number, | 56 if (!send_time_history_.GetSendTime(packet.sequence_number, |
57 &packet.send_time_ms, true)) { | 57 &packet.send_time_ms, true)) { |
58 LOG(LS_WARNING) << "Ack arrived too late."; | 58 LOG(LS_WARNING) << "Ack arrived too late."; |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 int64_t rtt_ms = | 62 int64_t rtt_ms = |
63 clock_->TimeInMilliseconds() - feedback.latest_send_time_ms(); | 63 clock_->TimeInMilliseconds() - feedback.latest_send_time_ms(); |
64 rbe_->OnRttUpdate(rtt_ms); | 64 rbe_->OnRttUpdate(rtt_ms, rtt_ms); |
65 BWE_TEST_LOGGING_PLOT(1, "RTT", clock_->TimeInMilliseconds(), rtt_ms); | 65 BWE_TEST_LOGGING_PLOT(1, "RTT", clock_->TimeInMilliseconds(), rtt_ms); |
66 | 66 |
67 rbe_->IncomingPacketFeedbackVector(packet_feedback_vector); | 67 rbe_->IncomingPacketFeedbackVector(packet_feedback_vector); |
68 if (has_received_ack_) { | 68 if (has_received_ack_) { |
69 int expected_packets = fb.packet_feedback_vector().back().sequence_number - | 69 int expected_packets = fb.packet_feedback_vector().back().sequence_number - |
70 last_acked_seq_num_; | 70 last_acked_seq_num_; |
71 // Assuming no reordering for now. | 71 // Assuming no reordering for now. |
72 if (expected_packets > 0) { | 72 if (expected_packets > 0) { |
73 int lost_packets = expected_packets - | 73 int lost_packets = expected_packets - |
74 static_cast<int>(fb.packet_feedback_vector().size()); | 74 static_cast<int>(fb.packet_feedback_vector().size()); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 packet_feedback_vector_.back().arrival_time_ms; | 143 packet_feedback_vector_.back().arrival_time_ms; |
144 FeedbackPacket* fb = new SendSideBweFeedback( | 144 FeedbackPacket* fb = new SendSideBweFeedback( |
145 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); | 145 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); |
146 packet_feedback_vector_.clear(); | 146 packet_feedback_vector_.clear(); |
147 return fb; | 147 return fb; |
148 } | 148 } |
149 | 149 |
150 } // namespace bwe | 150 } // namespace bwe |
151 } // namespace testing | 151 } // namespace testing |
152 } // namespace webrtc | 152 } // namespace webrtc |
OLD | NEW |