OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 { | 875 { |
876 rtc::CritScope lock(&send_critsect_); | 876 rtc::CritScope lock(&send_critsect_); |
877 media_has_been_sent_ = true; | 877 media_has_been_sent_ = true; |
878 } | 878 } |
879 UpdateRtpStats(*packet, false, false); | 879 UpdateRtpStats(*packet, false, false); |
880 } | 880 } |
881 | 881 |
882 // To support retransmissions, we store the media packet as sent in the | 882 // To support retransmissions, we store the media packet as sent in the |
883 // packet history (even if send failed). | 883 // packet history (even if send failed). |
884 if (storage == kAllowRetransmission) { | 884 if (storage == kAllowRetransmission) { |
885 RTC_DCHECK_EQ(ssrc, SSRC()); | 885 // TODO(brandtr): Uncomment the DCHECK line below when |ssrc_| cannot |
| 886 // change after the first packet has been sent. For more details, see |
| 887 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6887. |
| 888 // RTC_DCHECK_EQ(ssrc, SSRC()); |
886 packet_history_.PutRtpPacket(std::move(packet), storage, true); | 889 packet_history_.PutRtpPacket(std::move(packet), storage, true); |
887 } | 890 } |
888 | 891 |
889 return sent; | 892 return sent; |
890 } | 893 } |
891 | 894 |
892 void RTPSender::UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms) { | 895 void RTPSender::UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms) { |
893 if (!send_side_delay_observer_ || capture_time_ms <= 0) | 896 if (!send_side_delay_observer_ || capture_time_ms <= 0) |
894 return; | 897 return; |
895 | 898 |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 return; | 1296 return; |
1294 } | 1297 } |
1295 rtp_overhead_bytes_per_packet_ = packet.headers_size(); | 1298 rtp_overhead_bytes_per_packet_ = packet.headers_size(); |
1296 overhead_bytes_per_packet = | 1299 overhead_bytes_per_packet = |
1297 rtp_overhead_bytes_per_packet_ + transport_overhead_bytes_per_packet_; | 1300 rtp_overhead_bytes_per_packet_ + transport_overhead_bytes_per_packet_; |
1298 } | 1301 } |
1299 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); | 1302 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); |
1300 } | 1303 } |
1301 | 1304 |
1302 } // namespace webrtc | 1305 } // namespace webrtc |
OLD | NEW |