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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 int ViEReceiver::ReceivedRTCPPacket(const void* rtcp_packet, | 226 int ViEReceiver::ReceivedRTCPPacket(const void* rtcp_packet, |
227 size_t rtcp_packet_length) { | 227 size_t rtcp_packet_length) { |
228 return InsertRTCPPacket(static_cast<const uint8_t*>(rtcp_packet), | 228 return InsertRTCPPacket(static_cast<const uint8_t*>(rtcp_packet), |
229 rtcp_packet_length); | 229 rtcp_packet_length); |
230 } | 230 } |
231 | 231 |
232 int32_t ViEReceiver::OnReceivedPayloadData(const uint8_t* payload_data, | 232 int32_t ViEReceiver::OnReceivedPayloadData(const uint8_t* payload_data, |
233 const size_t payload_size, | 233 const size_t payload_size, |
234 const WebRtcRTPHeader* rtp_header) { | 234 const WebRtcRTPHeader* rtp_header) { |
| 235 RTC_DCHECK(vcm_); |
235 WebRtcRTPHeader rtp_header_with_ntp = *rtp_header; | 236 WebRtcRTPHeader rtp_header_with_ntp = *rtp_header; |
236 rtp_header_with_ntp.ntp_time_ms = | 237 rtp_header_with_ntp.ntp_time_ms = |
237 ntp_estimator_->Estimate(rtp_header->header.timestamp); | 238 ntp_estimator_->Estimate(rtp_header->header.timestamp); |
238 if (vcm_->IncomingPacket(payload_data, | 239 if (vcm_->IncomingPacket(payload_data, |
239 payload_size, | 240 payload_size, |
240 rtp_header_with_ntp) != 0) { | 241 rtp_header_with_ntp) != 0) { |
241 // Check this... | 242 // Check this... |
242 return -1; | 243 return -1; |
243 } | 244 } |
244 return 0; | 245 return 0; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 rtp_receive_statistics_->GetStatistician(header.ssrc); | 474 rtp_receive_statistics_->GetStatistician(header.ssrc); |
474 if (!statistician) | 475 if (!statistician) |
475 return false; | 476 return false; |
476 // Check if this is a retransmission. | 477 // Check if this is a retransmission. |
477 int64_t min_rtt = 0; | 478 int64_t min_rtt = 0; |
478 rtp_rtcp_->RTT(rtp_receiver_->SSRC(), NULL, NULL, &min_rtt, NULL); | 479 rtp_rtcp_->RTT(rtp_receiver_->SSRC(), NULL, NULL, &min_rtt, NULL); |
479 return !in_order && | 480 return !in_order && |
480 statistician->IsRetransmitOfOldPacket(header, min_rtt); | 481 statistician->IsRetransmitOfOldPacket(header, min_rtt); |
481 } | 482 } |
482 } // namespace webrtc | 483 } // namespace webrtc |
OLD | NEW |