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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
586 stats.max_padding_bitrate_bps = configured_max_padding_bitrate_bps_; | 586 stats.max_padding_bitrate_bps = configured_max_padding_bitrate_bps_; |
587 } | 587 } |
588 return stats; | 588 return stats; |
589 } | 589 } |
590 | 590 |
591 void Call::SetBitrateConfig( | 591 void Call::SetBitrateConfig( |
592 const webrtc::Call::Config::BitrateConfig& bitrate_config) { | 592 const webrtc::Call::Config::BitrateConfig& bitrate_config) { |
593 TRACE_EVENT0("webrtc", "Call::SetBitrateConfig"); | 593 TRACE_EVENT0("webrtc", "Call::SetBitrateConfig"); |
594 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 594 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
595 RTC_DCHECK_GE(bitrate_config.min_bitrate_bps, 0); | 595 RTC_DCHECK_GE(bitrate_config.min_bitrate_bps, 0); |
596 if (bitrate_config.max_bitrate_bps != -1) | 596 if (bitrate_config.max_bitrate_bps < -1) |
597 RTC_DCHECK_GT(bitrate_config.max_bitrate_bps, 0); | 597 return; |
stefan-webrtc
2016/08/12 13:19:58
Is there a reason not to DCHECK?
philipel
2016/08/12 14:08:06
Thought this might be user input, but i haven't lo
| |
598 if (config_.bitrate_config.min_bitrate_bps == | 598 if (config_.bitrate_config.min_bitrate_bps == |
599 bitrate_config.min_bitrate_bps && | 599 bitrate_config.min_bitrate_bps && |
600 (bitrate_config.start_bitrate_bps <= 0 || | 600 (bitrate_config.start_bitrate_bps <= 0 || |
601 config_.bitrate_config.start_bitrate_bps == | 601 config_.bitrate_config.start_bitrate_bps == |
602 bitrate_config.start_bitrate_bps) && | 602 bitrate_config.start_bitrate_bps) && |
603 config_.bitrate_config.max_bitrate_bps == | 603 config_.bitrate_config.max_bitrate_bps == |
604 bitrate_config.max_bitrate_bps) { | 604 bitrate_config.max_bitrate_bps) { |
605 // Nothing new to set, early abort to avoid encoder reconfigurations. | 605 // Nothing new to set, early abort to avoid encoder reconfigurations. |
606 return; | 606 return; |
607 } | 607 } |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
901 // thread. Then this check can be enabled. | 901 // thread. Then this check can be enabled. |
902 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); | 902 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); |
903 if (RtpHeaderParser::IsRtcp(packet, length)) | 903 if (RtpHeaderParser::IsRtcp(packet, length)) |
904 return DeliverRtcp(media_type, packet, length); | 904 return DeliverRtcp(media_type, packet, length); |
905 | 905 |
906 return DeliverRtp(media_type, packet, length, packet_time); | 906 return DeliverRtp(media_type, packet, length, packet_time); |
907 } | 907 } |
908 | 908 |
909 } // namespace internal | 909 } // namespace internal |
910 } // namespace webrtc | 910 } // namespace webrtc |
OLD | NEW |