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 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1620 // Remove the RTX header and parse the original RTP header. | 1620 // Remove the RTX header and parse the original RTP header. |
1621 if (packet_length < header.headerLength) | 1621 if (packet_length < header.headerLength) |
1622 return false; | 1622 return false; |
1623 if (packet_length > kVoiceEngineMaxIpPacketSizeBytes) | 1623 if (packet_length > kVoiceEngineMaxIpPacketSizeBytes) |
1624 return false; | 1624 return false; |
1625 if (restored_packet_in_use_) { | 1625 if (restored_packet_in_use_) { |
1626 WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVoice, _channelId, | 1626 WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVoice, _channelId, |
1627 "Multiple RTX headers detected, dropping packet"); | 1627 "Multiple RTX headers detected, dropping packet"); |
1628 return false; | 1628 return false; |
1629 } | 1629 } |
1630 uint8_t* restored_packet_ptr = restored_packet_; | |
1631 if (!rtp_payload_registry_->RestoreOriginalPacket( | 1630 if (!rtp_payload_registry_->RestoreOriginalPacket( |
1632 &restored_packet_ptr, packet, &packet_length, rtp_receiver_->SSRC(), | 1631 restored_packet_, packet, &packet_length, rtp_receiver_->SSRC(), |
1633 header)) { | 1632 header)) { |
1634 WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVoice, _channelId, | 1633 WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVoice, _channelId, |
1635 "Incoming RTX packet: invalid RTP header"); | 1634 "Incoming RTX packet: invalid RTP header"); |
1636 return false; | 1635 return false; |
1637 } | 1636 } |
1638 restored_packet_in_use_ = true; | 1637 restored_packet_in_use_ = true; |
1639 bool ret = OnRecoveredPacket(restored_packet_ptr, packet_length); | 1638 bool ret = OnRecoveredPacket(restored_packet_, packet_length); |
1640 restored_packet_in_use_ = false; | 1639 restored_packet_in_use_ = false; |
1641 return ret; | 1640 return ret; |
1642 } | 1641 } |
1643 | 1642 |
1644 bool Channel::IsPacketInOrder(const RTPHeader& header) const { | 1643 bool Channel::IsPacketInOrder(const RTPHeader& header) const { |
1645 StreamStatistician* statistician = | 1644 StreamStatistician* statistician = |
1646 rtp_receive_statistics_->GetStatistician(header.ssrc); | 1645 rtp_receive_statistics_->GetStatistician(header.ssrc); |
1647 if (!statistician) | 1646 if (!statistician) |
1648 return false; | 1647 return false; |
1649 return statistician->IsPacketInOrder(header.sequenceNumber); | 1648 return statistician->IsPacketInOrder(header.sequenceNumber); |
(...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3954 int64_t min_rtt = 0; | 3953 int64_t min_rtt = 0; |
3955 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) | 3954 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) |
3956 != 0) { | 3955 != 0) { |
3957 return 0; | 3956 return 0; |
3958 } | 3957 } |
3959 return rtt; | 3958 return rtt; |
3960 } | 3959 } |
3961 | 3960 |
3962 } // namespace voe | 3961 } // namespace voe |
3963 } // namespace webrtc | 3962 } // namespace webrtc |
OLD | NEW |