| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 Packets generated = GeneratePackets(packets_to_send); | 395 Packets generated = GeneratePackets(packets_to_send); |
| 396 for (Packet* packet : generated) | 396 for (Packet* packet : generated) |
| 397 in_flight_.insert(InFlight(*static_cast<MediaPacket*>(packet))); | 397 in_flight_.insert(InFlight(*static_cast<MediaPacket*>(packet))); |
| 398 | 398 |
| 399 in_out->merge(generated, DereferencingComparator<Packet>); | 399 in_out->merge(generated, DereferencingComparator<Packet>); |
| 400 } | 400 } |
| 401 } | 401 } |
| 402 | 402 |
| 403 void TcpSender::UpdateCongestionControl(const FeedbackPacket* fb) { | 403 void TcpSender::UpdateCongestionControl(const FeedbackPacket* fb) { |
| 404 const TcpFeedback* tcp_fb = static_cast<const TcpFeedback*>(fb); | 404 const TcpFeedback* tcp_fb = static_cast<const TcpFeedback*>(fb); |
| 405 DCHECK(!tcp_fb->acked_packets().empty()); | 405 RTC_DCHECK(!tcp_fb->acked_packets().empty()); |
| 406 ack_received_ = true; | 406 ack_received_ = true; |
| 407 | 407 |
| 408 uint16_t expected = tcp_fb->acked_packets().back() - last_acked_seq_num_; | 408 uint16_t expected = tcp_fb->acked_packets().back() - last_acked_seq_num_; |
| 409 uint16_t missing = | 409 uint16_t missing = |
| 410 expected - static_cast<uint16_t>(tcp_fb->acked_packets().size()); | 410 expected - static_cast<uint16_t>(tcp_fb->acked_packets().size()); |
| 411 | 411 |
| 412 for (uint16_t ack_seq_num : tcp_fb->acked_packets()) | 412 for (uint16_t ack_seq_num : tcp_fb->acked_packets()) |
| 413 in_flight_.erase(InFlight(ack_seq_num, clock_.TimeInMilliseconds())); | 413 in_flight_.erase(InFlight(ack_seq_num, clock_.TimeInMilliseconds())); |
| 414 | 414 |
| 415 if (missing > 0) { | 415 if (missing > 0) { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 RecordBitrate(); | 485 RecordBitrate(); |
| 486 } | 486 } |
| 487 | 487 |
| 488 uint32_t TcpSender::TargetBitrateKbps() { | 488 uint32_t TcpSender::TargetBitrateKbps() { |
| 489 return bitrate_kbps_; | 489 return bitrate_kbps_; |
| 490 } | 490 } |
| 491 | 491 |
| 492 } // namespace bwe | 492 } // namespace bwe |
| 493 } // namespace testing | 493 } // namespace testing |
| 494 } // namespace webrtc | 494 } // namespace webrtc |
| OLD | NEW |