Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 2946893002: Hotfix for psnr regresion with fec tests caused by timing frames. (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 packet_to_send = packet_rtx.get(); 736 packet_to_send = packet_rtx.get();
737 } 737 }
738 738
739 int64_t now_ms = clock_->TimeInMilliseconds(); 739 int64_t now_ms = clock_->TimeInMilliseconds();
740 int64_t diff_ms = now_ms - capture_time_ms; 740 int64_t diff_ms = now_ms - capture_time_ms;
741 packet_to_send->SetExtension<TransmissionOffset>(kTimestampTicksPerMs * 741 packet_to_send->SetExtension<TransmissionOffset>(kTimestampTicksPerMs *
742 diff_ms); 742 diff_ms);
743 packet_to_send->SetExtension<AbsoluteSendTime>( 743 packet_to_send->SetExtension<AbsoluteSendTime>(
744 AbsoluteSendTime::MsTo24Bits(now_ms)); 744 AbsoluteSendTime::MsTo24Bits(now_ms));
745 745
746 if (packet_to_send->HasExtension<VideoTimingExtension>()) 746 // TODO(ilnik): (webrtc:7859) For now we can't modify pacer exit timestamp in
747 packet_to_send->set_pacer_exit_time_ms(now_ms); 747 // video timing extension because only some packets have it an it will break
åsapersson 2017/06/20 14:09:48 an->and
ilnik 2017/06/20 14:13:17 Done.
748 // FEC recovered packets, which will lead to corruptions. Ideally, here
749 // |packet->set_pacer_exit_time_ms(now_ms)| should be called if
750 // |VideoTimingExtension| is present. For now
åsapersson 2017/06/20 14:09:48 remove For now
ilnik 2017/06/20 14:13:17 Done.
748 751
749 PacketOptions options; 752 PacketOptions options;
750 if (UpdateTransportSequenceNumber(packet_to_send, &options.packet_id)) { 753 if (UpdateTransportSequenceNumber(packet_to_send, &options.packet_id)) {
751 AddPacketToTransportFeedback(options.packet_id, *packet_to_send, 754 AddPacketToTransportFeedback(options.packet_id, *packet_to_send,
752 pacing_info); 755 pacing_info);
753 } 756 }
754 757
755 if (!is_retransmit && !send_over_rtx) { 758 if (!is_retransmit && !send_over_rtx) {
756 UpdateDelayStatistics(packet->capture_time_ms(), now_ms); 759 UpdateDelayStatistics(packet->capture_time_ms(), now_ms);
757 UpdateOnSendPacket(options.packet_id, packet->capture_time_ms(), 760 UpdateOnSendPacket(options.packet_id, packet->capture_time_ms(),
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 RtpPacketSender::Priority priority) { 829 RtpPacketSender::Priority priority) {
827 RTC_DCHECK(packet); 830 RTC_DCHECK(packet);
828 int64_t now_ms = clock_->TimeInMilliseconds(); 831 int64_t now_ms = clock_->TimeInMilliseconds();
829 832
830 // |capture_time_ms| <= 0 is considered invalid. 833 // |capture_time_ms| <= 0 is considered invalid.
831 // TODO(holmer): This should be changed all over Video Engine so that negative 834 // TODO(holmer): This should be changed all over Video Engine so that negative
832 // time is consider invalid, while 0 is considered a valid time. 835 // time is consider invalid, while 0 is considered a valid time.
833 if (packet->capture_time_ms() > 0) { 836 if (packet->capture_time_ms() > 0) {
834 packet->SetExtension<TransmissionOffset>( 837 packet->SetExtension<TransmissionOffset>(
835 kTimestampTicksPerMs * (now_ms - packet->capture_time_ms())); 838 kTimestampTicksPerMs * (now_ms - packet->capture_time_ms()));
836 if (packet->HasExtension<VideoTimingExtension>()) 839 // TODO(ilnik): (webrtc:7859) For now we can't modify pacer exit timestamp
837 packet->set_pacer_exit_time_ms(now_ms); 840 // in video timing extension because only some packets have it an it will
841 // break FEC recovered packets, which will lead to corruptions. Ideally,
842 // here |packet->set_pacer_exit_time_ms(now_ms)| should be called if
843 // |VideoTimingExtension| is present.
838 } 844 }
839 packet->SetExtension<AbsoluteSendTime>(AbsoluteSendTime::MsTo24Bits(now_ms)); 845 packet->SetExtension<AbsoluteSendTime>(AbsoluteSendTime::MsTo24Bits(now_ms));
840 846
841 if (video_) { 847 if (video_) {
842 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoTotBitrate_kbps", now_ms, 848 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoTotBitrate_kbps", now_ms,
843 ActualSendBitrateKbit(), packet->Ssrc()); 849 ActualSendBitrateKbit(), packet->Ssrc());
844 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoFecBitrate_kbps", now_ms, 850 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoFecBitrate_kbps", now_ms,
845 FecOverheadRate() / 1000, packet->Ssrc()); 851 FecOverheadRate() / 1000, packet->Ssrc());
846 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoNackBitrate_kbps", now_ms, 852 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoNackBitrate_kbps", now_ms,
847 NackOverheadRate() / 1000, packet->Ssrc()); 853 NackOverheadRate() / 1000, packet->Ssrc());
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { 1281 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) {
1276 return; 1282 return;
1277 } 1283 }
1278 rtp_overhead_bytes_per_packet_ = packet.headers_size(); 1284 rtp_overhead_bytes_per_packet_ = packet.headers_size();
1279 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; 1285 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_;
1280 } 1286 }
1281 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); 1287 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet);
1282 } 1288 }
1283 1289
1284 } // namespace webrtc 1290 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698