Chromium Code Reviews| 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_to_send->HasExtension<VideoTimingExtension>()) | |
| 744 packet_to_send->set_pacer_exit_time_ms(now_ms); | |
| 745 | |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 820 RtpPacketSender::Priority priority) { | 823 RtpPacketSender::Priority priority) { |
| 821 RTC_DCHECK(packet); | 824 RTC_DCHECK(packet); |
| 822 int64_t now_ms = clock_->TimeInMilliseconds(); | 825 int64_t now_ms = clock_->TimeInMilliseconds(); |
| 823 | 826 |
| 824 // |capture_time_ms| <= 0 is considered invalid. | 827 // |capture_time_ms| <= 0 is considered invalid. |
| 825 // TODO(holmer): This should be changed all over Video Engine so that negative | 828 // TODO(holmer): This should be changed all over Video Engine so that negative |
| 826 // time is consider invalid, while 0 is considered a valid time. | 829 // time is consider invalid, while 0 is considered a valid time. |
| 827 if (packet->capture_time_ms() > 0) { | 830 if (packet->capture_time_ms() > 0) { |
| 828 packet->SetExtension<TransmissionOffset>( | 831 packet->SetExtension<TransmissionOffset>( |
| 829 kTimestampTicksPerMs * (now_ms - packet->capture_time_ms())); | 832 kTimestampTicksPerMs * (now_ms - packet->capture_time_ms())); |
| 833 if (packet->HasExtension<VideoTimingExtension>()) | |
| 834 packet->set_pacer_exit_time_ms(now_ms); | |
|
åsapersson
2017/06/14 08:03:50
check indentation
ilnik
2017/06/14 10:17:10
Done.
| |
| 830 } | 835 } |
| 831 packet->SetExtension<AbsoluteSendTime>(now_ms); | 836 packet->SetExtension<AbsoluteSendTime>(now_ms); |
| 832 | 837 |
| 833 if (video_) { | 838 if (video_) { |
| 834 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoTotBitrate_kbps", now_ms, | 839 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoTotBitrate_kbps", now_ms, |
| 835 ActualSendBitrateKbit(), packet->Ssrc()); | 840 ActualSendBitrateKbit(), packet->Ssrc()); |
| 836 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoFecBitrate_kbps", now_ms, | 841 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoFecBitrate_kbps", now_ms, |
| 837 FecOverheadRate() / 1000, packet->Ssrc()); | 842 FecOverheadRate() / 1000, packet->Ssrc()); |
| 838 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoNackBitrate_kbps", now_ms, | 843 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoNackBitrate_kbps", now_ms, |
| 839 NackOverheadRate() / 1000, packet->Ssrc()); | 844 NackOverheadRate() / 1000, packet->Ssrc()); |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1267 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { | 1272 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { |
| 1268 return; | 1273 return; |
| 1269 } | 1274 } |
| 1270 rtp_overhead_bytes_per_packet_ = packet.headers_size(); | 1275 rtp_overhead_bytes_per_packet_ = packet.headers_size(); |
| 1271 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; | 1276 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; |
| 1272 } | 1277 } |
| 1273 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); | 1278 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); |
| 1274 } | 1279 } |
| 1275 | 1280 |
| 1276 } // namespace webrtc | 1281 } // namespace webrtc |
| OLD | NEW |