| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 restored_packet_in_use_(false), | 50 restored_packet_in_use_(false), |
| 51 last_packet_log_ms_(-1) {} | 51 last_packet_log_ms_(-1) {} |
| 52 | 52 |
| 53 ViEReceiver::~ViEReceiver() { | 53 ViEReceiver::~ViEReceiver() { |
| 54 UpdateHistograms(); | 54 UpdateHistograms(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void ViEReceiver::UpdateHistograms() { | 57 void ViEReceiver::UpdateHistograms() { |
| 58 FecPacketCounter counter = fec_receiver_->GetPacketCounter(); | 58 FecPacketCounter counter = fec_receiver_->GetPacketCounter(); |
| 59 if (counter.num_packets > 0) { | 59 if (counter.num_packets > 0) { |
| 60 RTC_HISTOGRAM_PERCENTAGE( | 60 RTC_LOGGED_HISTOGRAM_PERCENTAGE( |
| 61 "WebRTC.Video.ReceivedFecPacketsInPercent", | 61 "WebRTC.Video.ReceivedFecPacketsInPercent", |
| 62 static_cast<int>(counter.num_fec_packets * 100 / counter.num_packets)); | 62 static_cast<int>(counter.num_fec_packets * 100 / counter.num_packets)); |
| 63 } | 63 } |
| 64 if (counter.num_fec_packets > 0) { | 64 if (counter.num_fec_packets > 0) { |
| 65 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.RecoveredMediaPacketsInPercentOfFec", | 65 RTC_LOGGED_HISTOGRAM_PERCENTAGE( |
| 66 static_cast<int>(counter.num_recovered_packets * | 66 "WebRTC.Video.RecoveredMediaPacketsInPercentOfFec", |
| 67 100 / counter.num_fec_packets)); | 67 static_cast<int>(counter.num_recovered_packets * 100 / |
| 68 counter.num_fec_packets)); |
| 68 } | 69 } |
| 69 } | 70 } |
| 70 | 71 |
| 71 bool ViEReceiver::SetReceiveCodec(const VideoCodec& video_codec) { | 72 bool ViEReceiver::SetReceiveCodec(const VideoCodec& video_codec) { |
| 72 int8_t old_pltype = -1; | 73 int8_t old_pltype = -1; |
| 73 if (rtp_payload_registry_.ReceivePayloadType( | 74 if (rtp_payload_registry_.ReceivePayloadType( |
| 74 video_codec.plName, kVideoPayloadTypeFrequency, 0, | 75 video_codec.plName, kVideoPayloadTypeFrequency, 0, |
| 75 video_codec.maxBitrate, &old_pltype) != -1) { | 76 video_codec.maxBitrate, &old_pltype) != -1) { |
| 76 rtp_payload_registry_.DeRegisterReceivePayload(old_pltype); | 77 rtp_payload_registry_.DeRegisterReceivePayload(old_pltype); |
| 77 } | 78 } |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 rtp_receive_statistics_->GetStatistician(header.ssrc); | 380 rtp_receive_statistics_->GetStatistician(header.ssrc); |
| 380 if (!statistician) | 381 if (!statistician) |
| 381 return false; | 382 return false; |
| 382 // Check if this is a retransmission. | 383 // Check if this is a retransmission. |
| 383 int64_t min_rtt = 0; | 384 int64_t min_rtt = 0; |
| 384 rtp_rtcp_[0]->RTT(rtp_receiver_->SSRC(), NULL, NULL, &min_rtt, NULL); | 385 rtp_rtcp_[0]->RTT(rtp_receiver_->SSRC(), NULL, NULL, &min_rtt, NULL); |
| 385 return !in_order && | 386 return !in_order && |
| 386 statistician->IsRetransmitOfOldPacket(header, min_rtt); | 387 statistician->IsRetransmitOfOldPacket(header, min_rtt); |
| 387 } | 388 } |
| 388 } // namespace webrtc | 389 } // namespace webrtc |
| OLD | NEW |