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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
733 return false; | 733 return false; |
734 packet_to_send = packet_rtx.get(); | 734 packet_to_send = packet_rtx.get(); |
735 } | 735 } |
736 | 736 |
737 int64_t now_ms = clock_->TimeInMilliseconds(); | 737 int64_t now_ms = clock_->TimeInMilliseconds(); |
738 int64_t diff_ms = now_ms - capture_time_ms; | 738 int64_t diff_ms = now_ms - capture_time_ms; |
739 packet_to_send->SetExtension<TransmissionOffset>(kTimestampTicksPerMs * | 739 packet_to_send->SetExtension<TransmissionOffset>(kTimestampTicksPerMs * |
740 diff_ms); | 740 diff_ms); |
741 packet_to_send->SetExtension<AbsoluteSendTime>(now_ms); | 741 packet_to_send->SetExtension<AbsoluteSendTime>(now_ms); |
742 | 742 |
743 if (packet->HasExtension<VideoTimingExtension>()) | |
åsapersson
2017/06/12 14:33:42
packet_to_send?
ilnik
2017/06/13 08:43:13
Done. Thank's for catching that.
| |
744 packet->set_pacer_exit_time_ms(clock_->TimeInMilliseconds()); | |
åsapersson
2017/06/12 14:33:42
maybe use now_ms
ilnik
2017/06/13 08:43:13
Done.
| |
745 | |
åsapersson
2017/06/12 14:33:42
Maybe add a unit test, e.g. in rtp_sender_unittest
ilnik
2017/06/13 08:43:13
Done. Please check rtp_sender_unittest.cc
| |
743 PacketOptions options; | 746 PacketOptions options; |
744 if (UpdateTransportSequenceNumber(packet_to_send, &options.packet_id)) { | 747 if (UpdateTransportSequenceNumber(packet_to_send, &options.packet_id)) { |
745 AddPacketToTransportFeedback(options.packet_id, *packet_to_send, | 748 AddPacketToTransportFeedback(options.packet_id, *packet_to_send, |
746 pacing_info); | 749 pacing_info); |
747 } | 750 } |
748 | 751 |
749 if (!is_retransmit && !send_over_rtx) { | 752 if (!is_retransmit && !send_over_rtx) { |
750 UpdateDelayStatistics(packet->capture_time_ms(), now_ms); | 753 UpdateDelayStatistics(packet->capture_time_ms(), now_ms); |
751 UpdateOnSendPacket(options.packet_id, packet->capture_time_ms(), | 754 UpdateOnSendPacket(options.packet_id, packet->capture_time_ms(), |
752 packet->Ssrc()); | 755 packet->Ssrc()); |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1267 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { | 1270 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { |
1268 return; | 1271 return; |
1269 } | 1272 } |
1270 rtp_overhead_bytes_per_packet_ = packet.headers_size(); | 1273 rtp_overhead_bytes_per_packet_ = packet.headers_size(); |
1271 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; | 1274 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; |
1272 } | 1275 } |
1273 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); | 1276 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); |
1274 } | 1277 } |
1275 | 1278 |
1276 } // namespace webrtc | 1279 } // namespace webrtc |
OLD | NEW |