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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 // Check if this is a retransmission. | 515 // Check if this is a retransmission. |
516 int64_t min_rtt = 0; | 516 int64_t min_rtt = 0; |
517 rtp_rtcp_->RTT(rtp_receiver_->SSRC(), nullptr, nullptr, &min_rtt, nullptr); | 517 rtp_rtcp_->RTT(rtp_receiver_->SSRC(), nullptr, nullptr, &min_rtt, nullptr); |
518 return !in_order && | 518 return !in_order && |
519 statistician->IsRetransmitOfOldPacket(header, min_rtt); | 519 statistician->IsRetransmitOfOldPacket(header, min_rtt); |
520 } | 520 } |
521 | 521 |
522 void RtpStreamReceiver::UpdateHistograms() { | 522 void RtpStreamReceiver::UpdateHistograms() { |
523 FecPacketCounter counter = fec_receiver_->GetPacketCounter(); | 523 FecPacketCounter counter = fec_receiver_->GetPacketCounter(); |
524 if (counter.num_packets > 0) { | 524 if (counter.num_packets > 0) { |
525 RTC_LOGGED_HISTOGRAM_PERCENTAGE( | 525 RTC_HISTOGRAM_PERCENTAGE( |
526 "WebRTC.Video.ReceivedFecPacketsInPercent", | 526 "WebRTC.Video.ReceivedFecPacketsInPercent", |
527 static_cast<int>(counter.num_fec_packets * 100 / counter.num_packets)); | 527 static_cast<int>(counter.num_fec_packets * 100 / counter.num_packets)); |
528 } | 528 } |
529 if (counter.num_fec_packets > 0) { | 529 if (counter.num_fec_packets > 0) { |
530 RTC_LOGGED_HISTOGRAM_PERCENTAGE( | 530 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.RecoveredMediaPacketsInPercentOfFec", |
531 "WebRTC.Video.RecoveredMediaPacketsInPercentOfFec", | 531 static_cast<int>(counter.num_recovered_packets * |
532 static_cast<int>(counter.num_recovered_packets * 100 / | 532 100 / counter.num_fec_packets)); |
533 counter.num_fec_packets)); | |
534 } | 533 } |
535 } | 534 } |
536 | 535 |
537 void RtpStreamReceiver::EnableReceiveRtpHeaderExtension( | 536 void RtpStreamReceiver::EnableReceiveRtpHeaderExtension( |
538 const std::string& extension, int id) { | 537 const std::string& extension, int id) { |
539 // One-byte-extension local identifiers are in the range 1-14 inclusive. | 538 // One-byte-extension local identifiers are in the range 1-14 inclusive. |
540 RTC_DCHECK_GE(id, 1); | 539 RTC_DCHECK_GE(id, 1); |
541 RTC_DCHECK_LE(id, 14); | 540 RTC_DCHECK_LE(id, 14); |
542 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); | 541 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); |
543 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( | 542 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( |
544 StringToRtpExtensionType(extension), id)); | 543 StringToRtpExtensionType(extension), id)); |
545 } | 544 } |
546 | 545 |
547 } // namespace webrtc | 546 } // namespace webrtc |
OLD | NEW |