OLD | NEW |
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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 if (config_.bitrate_config.min_bitrate_bps == | 572 if (config_.bitrate_config.min_bitrate_bps == |
573 bitrate_config.min_bitrate_bps && | 573 bitrate_config.min_bitrate_bps && |
574 (bitrate_config.start_bitrate_bps <= 0 || | 574 (bitrate_config.start_bitrate_bps <= 0 || |
575 config_.bitrate_config.start_bitrate_bps == | 575 config_.bitrate_config.start_bitrate_bps == |
576 bitrate_config.start_bitrate_bps) && | 576 bitrate_config.start_bitrate_bps) && |
577 config_.bitrate_config.max_bitrate_bps == | 577 config_.bitrate_config.max_bitrate_bps == |
578 bitrate_config.max_bitrate_bps) { | 578 bitrate_config.max_bitrate_bps) { |
579 // Nothing new to set, early abort to avoid encoder reconfigurations. | 579 // Nothing new to set, early abort to avoid encoder reconfigurations. |
580 return; | 580 return; |
581 } | 581 } |
582 config_.bitrate_config = bitrate_config; | 582 config_.bitrate_config.min_bitrate_bps = bitrate_config.min_bitrate_bps; |
| 583 // Start bitrate of -1 means we should keep the old bitrate, which there is |
| 584 // no point in remembering for the future. |
| 585 if (bitrate_config.start_bitrate_bps > 0) |
| 586 config_.bitrate_config.start_bitrate_bps = bitrate_config.start_bitrate_bps; |
| 587 config_.bitrate_config.max_bitrate_bps = bitrate_config.max_bitrate_bps; |
583 congestion_controller_->SetBweBitrates(bitrate_config.min_bitrate_bps, | 588 congestion_controller_->SetBweBitrates(bitrate_config.min_bitrate_bps, |
584 bitrate_config.start_bitrate_bps, | 589 bitrate_config.start_bitrate_bps, |
585 bitrate_config.max_bitrate_bps); | 590 bitrate_config.max_bitrate_bps); |
586 } | 591 } |
587 | 592 |
588 void Call::SignalChannelNetworkState(MediaType media, NetworkState state) { | 593 void Call::SignalChannelNetworkState(MediaType media, NetworkState state) { |
589 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 594 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
590 switch (media) { | 595 switch (media) { |
591 case MediaType::AUDIO: | 596 case MediaType::AUDIO: |
592 audio_network_state_ = state; | 597 audio_network_state_ = state; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 // thread. Then this check can be enabled. | 873 // thread. Then this check can be enabled. |
869 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); | 874 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); |
870 if (RtpHeaderParser::IsRtcp(packet, length)) | 875 if (RtpHeaderParser::IsRtcp(packet, length)) |
871 return DeliverRtcp(media_type, packet, length); | 876 return DeliverRtcp(media_type, packet, length); |
872 | 877 |
873 return DeliverRtp(media_type, packet, length, packet_time); | 878 return DeliverRtp(media_type, packet, length, packet_time); |
874 } | 879 } |
875 | 880 |
876 } // namespace internal | 881 } // namespace internal |
877 } // namespace webrtc | 882 } // namespace webrtc |
OLD | NEW |