Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1631 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1631 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 1632 LOG(LS_INFO) << "WebRtcVoiceMediaChannel::SetSendParameters: " | 1632 LOG(LS_INFO) << "WebRtcVoiceMediaChannel::SetSendParameters: " |
| 1633 << params.ToString(); | 1633 << params.ToString(); |
| 1634 // TODO(pthatcher): Refactor this to be more clean now that we have | 1634 // TODO(pthatcher): Refactor this to be more clean now that we have |
| 1635 // all the information at once. | 1635 // all the information at once. |
| 1636 | 1636 |
| 1637 if (!SetSendCodecs(params.codecs)) { | 1637 if (!SetSendCodecs(params.codecs)) { |
| 1638 return false; | 1638 return false; |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 if (params.max_bandwidth_bps >= 0) { | |
| 1642 // Note that max_bandwidth_bps intentionally takes priority over the | |
| 1643 // bitrate config for the codec. | |
| 1644 bitrate_config_.max_bitrate_bps = | |
| 1645 params.max_bandwidth_bps == 0 ? -1 : params.max_bandwidth_bps; | |
| 1646 } | |
| 1647 call_->SetBitrateConfig(bitrate_config_); | 1641 call_->SetBitrateConfig(bitrate_config_); |
|
minyue-webrtc
2017/03/27 09:22:06
I think there is no need to call this if we remove
stefan-webrtc
2017/03/27 10:10:27
Done.
| |
| 1648 | 1642 |
| 1649 if (!ValidateRtpExtensions(params.extensions)) { | 1643 if (!ValidateRtpExtensions(params.extensions)) { |
| 1650 return false; | 1644 return false; |
| 1651 } | 1645 } |
| 1652 std::vector<webrtc::RtpExtension> filtered_extensions = | 1646 std::vector<webrtc::RtpExtension> filtered_extensions = |
| 1653 FilterRtpExtensions(params.extensions, | 1647 FilterRtpExtensions(params.extensions, |
| 1654 webrtc::RtpExtension::IsSupportedForAudio, true); | 1648 webrtc::RtpExtension::IsSupportedForAudio, true); |
| 1655 if (send_rtp_extensions_ != filtered_extensions) { | 1649 if (send_rtp_extensions_ != filtered_extensions) { |
| 1656 send_rtp_extensions_.swap(filtered_extensions); | 1650 send_rtp_extensions_.swap(filtered_extensions); |
| 1657 for (auto& it : send_streams_) { | 1651 for (auto& it : send_streams_) { |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2654 ssrc); | 2648 ssrc); |
| 2655 if (it != unsignaled_recv_ssrcs_.end()) { | 2649 if (it != unsignaled_recv_ssrcs_.end()) { |
| 2656 unsignaled_recv_ssrcs_.erase(it); | 2650 unsignaled_recv_ssrcs_.erase(it); |
| 2657 return true; | 2651 return true; |
| 2658 } | 2652 } |
| 2659 return false; | 2653 return false; |
| 2660 } | 2654 } |
| 2661 } // namespace cricket | 2655 } // namespace cricket |
| 2662 | 2656 |
| 2663 #endif // HAVE_WEBRTC_VOICE | 2657 #endif // HAVE_WEBRTC_VOICE |
| OLD | NEW |