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

Side by Side Diff: webrtc/call/call.cc

Issue 2161053002: Ignore zero bitrate updates in the UMA BWE stats as they represent network being down and would bia… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 video_send_delay_stats_->OnSentPacket(sent_packet.packet_id, 703 video_send_delay_stats_->OnSentPacket(sent_packet.packet_id,
704 clock_->TimeInMilliseconds()); 704 clock_->TimeInMilliseconds());
705 congestion_controller_->OnSentPacket(sent_packet); 705 congestion_controller_->OnSentPacket(sent_packet);
706 } 706 }
707 707
708 void Call::OnNetworkChanged(uint32_t target_bitrate_bps, uint8_t fraction_loss, 708 void Call::OnNetworkChanged(uint32_t target_bitrate_bps, uint8_t fraction_loss,
709 int64_t rtt_ms) { 709 int64_t rtt_ms) {
710 bitrate_allocator_->OnNetworkChanged(target_bitrate_bps, fraction_loss, 710 bitrate_allocator_->OnNetworkChanged(target_bitrate_bps, fraction_loss,
711 rtt_ms); 711 rtt_ms);
712 712
713 { 713 // Ignore updates where the bitrate is zero because the aggregate network
714 // state is down.
715 if (target_bitrate_bps > 0) {
714 rtc::CritScope lock(&bitrate_crit_); 716 rtc::CritScope lock(&bitrate_crit_);
715 // We only update these stats if we have send streams, and assume that 717 // We only update these stats if we have send streams, and assume that
716 // OnNetworkChanged is called roughly with a fixed frequency. 718 // OnNetworkChanged is called roughly with a fixed frequency.
717 estimated_send_bitrate_sum_kbits_ += target_bitrate_bps / 1000; 719 estimated_send_bitrate_sum_kbits_ += target_bitrate_bps / 1000;
718 // Pacer bitrate might be higher than bitrate estimate if enforcing min 720 // Pacer bitrate might be higher than bitrate estimate if enforcing min
719 // bitrate. 721 // bitrate.
720 uint32_t pacer_bitrate_bps = 722 uint32_t pacer_bitrate_bps =
721 std::max(target_bitrate_bps, min_allocated_send_bitrate_bps_); 723 std::max(target_bitrate_bps, min_allocated_send_bitrate_bps_);
722 pacer_bitrate_sum_kbits_ += pacer_bitrate_bps / 1000; 724 pacer_bitrate_sum_kbits_ += pacer_bitrate_bps / 1000;
723 ++num_bitrate_updates_; 725 ++num_bitrate_updates_;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 // thread. Then this check can be enabled. 879 // thread. Then this check can be enabled.
878 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); 880 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread());
879 if (RtpHeaderParser::IsRtcp(packet, length)) 881 if (RtpHeaderParser::IsRtcp(packet, length))
880 return DeliverRtcp(media_type, packet, length); 882 return DeliverRtcp(media_type, packet, length);
881 883
882 return DeliverRtp(media_type, packet, length, packet_time); 884 return DeliverRtp(media_type, packet, length, packet_time);
883 } 885 }
884 886
885 } // namespace internal 887 } // namespace internal
886 } // namespace webrtc 888 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698