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

Side by Side Diff: webrtc/voice_engine/channel.cc

Issue 3009403002: Drop return value from RtpRtcp::IncomingRtcpPacket. (Closed)
Patch Set: Delete VoENetworkTest.ReceivedRTCPPacketWithJunkDataShouldFail. Created 3 years, 3 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
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 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 return !in_order && statistician->IsRetransmitOfOldPacket(header, min_rtt); 1777 return !in_order && statistician->IsRetransmitOfOldPacket(header, min_rtt);
1778 } 1778 }
1779 1779
1780 int32_t Channel::ReceivedRTCPPacket(const uint8_t* data, size_t length) { 1780 int32_t Channel::ReceivedRTCPPacket(const uint8_t* data, size_t length) {
1781 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId), 1781 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId),
1782 "Channel::ReceivedRTCPPacket()"); 1782 "Channel::ReceivedRTCPPacket()");
1783 // Store playout timestamp for the received RTCP packet 1783 // Store playout timestamp for the received RTCP packet
1784 UpdatePlayoutTimestamp(true); 1784 UpdatePlayoutTimestamp(true);
1785 1785
1786 // Deliver RTCP packet to RTP/RTCP module for parsing 1786 // Deliver RTCP packet to RTP/RTCP module for parsing
1787 if (_rtpRtcpModule->IncomingRtcpPacket(data, length) == -1) { 1787 _rtpRtcpModule->IncomingRtcpPacket(data, length);
1788 _engineStatisticsPtr->SetLastError(
1789 VE_SOCKET_TRANSPORT_MODULE_ERROR, kTraceWarning,
1790 "Channel::IncomingRTPPacket() RTCP packet is invalid");
1791 }
1792 1788
1793 int64_t rtt = GetRTT(true); 1789 int64_t rtt = GetRTT(true);
1794 if (rtt == 0) { 1790 if (rtt == 0) {
1795 // Waiting for valid RTT. 1791 // Waiting for valid RTT.
1796 return 0; 1792 return 0;
1797 } 1793 }
1798 1794
1799 int64_t nack_window_ms = rtt; 1795 int64_t nack_window_ms = rtt;
1800 if (nack_window_ms < kMinRetransmissionWindowMs) { 1796 if (nack_window_ms < kMinRetransmissionWindowMs) {
1801 nack_window_ms = kMinRetransmissionWindowMs; 1797 nack_window_ms = kMinRetransmissionWindowMs;
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 int64_t min_rtt = 0; 3128 int64_t min_rtt = 0;
3133 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3129 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3134 0) { 3130 0) {
3135 return 0; 3131 return 0;
3136 } 3132 }
3137 return rtt; 3133 return rtt;
3138 } 3134 }
3139 3135
3140 } // namespace voe 3136 } // namespace voe
3141 } // namespace webrtc 3137 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698