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

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

Issue 2086633002: Revert of Remove audio/video distinction for probe packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 | « webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h ('k') | webrtc/video/rtp_stream_receiver.cc » ('j') | 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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 } 712 }
713 713
714 UpdateAbsoluteSendTime(padding_packet, length, rtp_header, now_ms); 714 UpdateAbsoluteSendTime(padding_packet, length, rtp_header, now_ms);
715 715
716 PacketOptions options; 716 PacketOptions options;
717 if (AllocateTransportSequenceNumber(&options.packet_id)) { 717 if (AllocateTransportSequenceNumber(&options.packet_id)) {
718 if (UpdateTransportSequenceNumber(options.packet_id, padding_packet, 718 if (UpdateTransportSequenceNumber(options.packet_id, padding_packet,
719 length, rtp_header)) { 719 length, rtp_header)) {
720 if (transport_feedback_observer_) 720 if (transport_feedback_observer_)
721 transport_feedback_observer_->AddPacket(options.packet_id, length, 721 transport_feedback_observer_->AddPacket(options.packet_id, length,
722 probe_cluster_id); 722 true, probe_cluster_id);
723 } 723 }
724 } 724 }
725 725
726 if (!SendPacketToNetwork(padding_packet, length, options)) 726 if (!SendPacketToNetwork(padding_packet, length, options))
727 break; 727 break;
728 728
729 bytes_sent += padding_bytes_in_packet; 729 bytes_sent += padding_bytes_in_packet;
730 UpdateRtpStats(padding_packet, length, rtp_header, over_rtx, false); 730 UpdateRtpStats(padding_packet, length, rtp_header, over_rtx, false);
731 } 731 }
732 732
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 int64_t diff_ms = now_ms - capture_time_ms; 973 int64_t diff_ms = now_ms - capture_time_ms;
974 UpdateTransmissionTimeOffset(buffer_to_send_ptr, length, rtp_header, 974 UpdateTransmissionTimeOffset(buffer_to_send_ptr, length, rtp_header,
975 diff_ms); 975 diff_ms);
976 UpdateAbsoluteSendTime(buffer_to_send_ptr, length, rtp_header, now_ms); 976 UpdateAbsoluteSendTime(buffer_to_send_ptr, length, rtp_header, now_ms);
977 977
978 PacketOptions options; 978 PacketOptions options;
979 if (AllocateTransportSequenceNumber(&options.packet_id)) { 979 if (AllocateTransportSequenceNumber(&options.packet_id)) {
980 if (UpdateTransportSequenceNumber(options.packet_id, buffer_to_send_ptr, 980 if (UpdateTransportSequenceNumber(options.packet_id, buffer_to_send_ptr,
981 length, rtp_header)) { 981 length, rtp_header)) {
982 if (transport_feedback_observer_) 982 if (transport_feedback_observer_)
983 transport_feedback_observer_->AddPacket(options.packet_id, length, 983 transport_feedback_observer_->AddPacket(options.packet_id, length, true,
984 probe_cluster_id); 984 probe_cluster_id);
985 } 985 }
986 } 986 }
987 987
988 if (!is_retransmit && !send_over_rtx) { 988 if (!is_retransmit && !send_over_rtx) {
989 UpdateDelayStatistics(capture_time_ms, now_ms); 989 UpdateDelayStatistics(capture_time_ms, now_ms);
990 UpdateOnSendPacket(options.packet_id, capture_time_ms, rtp_header.ssrc); 990 UpdateOnSendPacket(options.packet_id, capture_time_ms, rtp_header.ssrc);
991 } 991 }
992 992
993 bool ret = SendPacketToNetwork(buffer_to_send_ptr, length, options); 993 bool ret = SendPacketToNetwork(buffer_to_send_ptr, length, options);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 "capture_time_ms", corrected_time_ms); 1104 "capture_time_ms", corrected_time_ms);
1105 } 1105 }
1106 return 0; 1106 return 0;
1107 } 1107 }
1108 1108
1109 PacketOptions options; 1109 PacketOptions options;
1110 if (AllocateTransportSequenceNumber(&options.packet_id)) { 1110 if (AllocateTransportSequenceNumber(&options.packet_id)) {
1111 if (UpdateTransportSequenceNumber(options.packet_id, buffer, length, 1111 if (UpdateTransportSequenceNumber(options.packet_id, buffer, length,
1112 rtp_header)) { 1112 rtp_header)) {
1113 if (transport_feedback_observer_) 1113 if (transport_feedback_observer_)
1114 transport_feedback_observer_->AddPacket(options.packet_id, length, 1114 transport_feedback_observer_->AddPacket(options.packet_id, length, true,
1115 PacketInfo::kNotAProbe); 1115 PacketInfo::kNotAProbe);
1116 } 1116 }
1117 } 1117 }
1118 UpdateDelayStatistics(capture_time_ms, now_ms); 1118 UpdateDelayStatistics(capture_time_ms, now_ms);
1119 UpdateOnSendPacket(options.packet_id, capture_time_ms, rtp_header.ssrc); 1119 UpdateOnSendPacket(options.packet_id, capture_time_ms, rtp_header.ssrc);
1120 1120
1121 bool sent = SendPacketToNetwork(buffer, length, options); 1121 bool sent = SendPacketToNetwork(buffer, length, options);
1122 1122
1123 // Mark the packet as sent in the history even if send failed. Dropping a 1123 // Mark the packet as sent in the history even if send failed. Dropping a
1124 // packet here should be treated as any other packet drop so we should be 1124 // packet here should be treated as any other packet drop so we should be
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 rtc::CritScope lock(&send_critsect_); 1996 rtc::CritScope lock(&send_critsect_);
1997 1997
1998 RtpState state; 1998 RtpState state;
1999 state.sequence_number = sequence_number_rtx_; 1999 state.sequence_number = sequence_number_rtx_;
2000 state.start_timestamp = start_timestamp_; 2000 state.start_timestamp = start_timestamp_;
2001 2001
2002 return state; 2002 return state;
2003 } 2003 }
2004 2004
2005 } // namespace webrtc 2005 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h ('k') | webrtc/video/rtp_stream_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698