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

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

Issue 2154783002: Fix bug where a connection switch causes BWE to be set to zero. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@53
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 | webrtc/video/video_send_stream_tests.cc » ('j') | 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 if (config_.bitrate_config.min_bitrate_bps == 569 if (config_.bitrate_config.min_bitrate_bps ==
570 bitrate_config.min_bitrate_bps && 570 bitrate_config.min_bitrate_bps &&
571 (bitrate_config.start_bitrate_bps <= 0 || 571 (bitrate_config.start_bitrate_bps <= 0 ||
572 config_.bitrate_config.start_bitrate_bps == 572 config_.bitrate_config.start_bitrate_bps ==
573 bitrate_config.start_bitrate_bps) && 573 bitrate_config.start_bitrate_bps) &&
574 config_.bitrate_config.max_bitrate_bps == 574 config_.bitrate_config.max_bitrate_bps ==
575 bitrate_config.max_bitrate_bps) { 575 bitrate_config.max_bitrate_bps) {
576 // Nothing new to set, early abort to avoid encoder reconfigurations. 576 // Nothing new to set, early abort to avoid encoder reconfigurations.
577 return; 577 return;
578 } 578 }
579 config_.bitrate_config = bitrate_config; 579 config_.bitrate_config.min_bitrate_bps = bitrate_config.min_bitrate_bps;
580 // Start bitrate of -1 means we should keep the old bitrate, which there is
581 // no point in remembering for the future.
582 if (bitrate_config.start_bitrate_bps > 0)
583 config_.bitrate_config.start_bitrate_bps = bitrate_config.start_bitrate_bps;
584 config_.bitrate_config.max_bitrate_bps = bitrate_config.max_bitrate_bps;
580 congestion_controller_->SetBweBitrates(bitrate_config.min_bitrate_bps, 585 congestion_controller_->SetBweBitrates(bitrate_config.min_bitrate_bps,
581 bitrate_config.start_bitrate_bps, 586 bitrate_config.start_bitrate_bps,
582 bitrate_config.max_bitrate_bps); 587 bitrate_config.max_bitrate_bps);
583 } 588 }
584 589
585 void Call::SignalChannelNetworkState(MediaType media, NetworkState state) { 590 void Call::SignalChannelNetworkState(MediaType media, NetworkState state) {
586 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 591 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
587 switch (media) { 592 switch (media) {
588 case MediaType::AUDIO: 593 case MediaType::AUDIO:
589 audio_network_state_ = state; 594 audio_network_state_ = state;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 // thread. Then this check can be enabled. 870 // thread. Then this check can be enabled.
866 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); 871 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread());
867 if (RtpHeaderParser::IsRtcp(packet, length)) 872 if (RtpHeaderParser::IsRtcp(packet, length))
868 return DeliverRtcp(media_type, packet, length); 873 return DeliverRtcp(media_type, packet, length);
869 874
870 return DeliverRtp(media_type, packet, length, packet_time); 875 return DeliverRtp(media_type, packet, length, packet_time);
871 } 876 }
872 877
873 } // namespace internal 878 } // namespace internal
874 } // namespace webrtc 879 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698