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 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 } | 1129 } |
1130 | 1130 |
1131 void RecreateAudioSendStream( | 1131 void RecreateAudioSendStream( |
1132 const std::vector<webrtc::RtpExtension>& extensions) { | 1132 const std::vector<webrtc::RtpExtension>& extensions) { |
1133 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1133 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
1134 if (stream_) { | 1134 if (stream_) { |
1135 call_->DestroyAudioSendStream(stream_); | 1135 call_->DestroyAudioSendStream(stream_); |
1136 stream_ = nullptr; | 1136 stream_ = nullptr; |
1137 } | 1137 } |
1138 config_.rtp.extensions = extensions; | 1138 config_.rtp.extensions = extensions; |
| 1139 if (webrtc::field_trial::FindFullName("WebRTC-AdaptAudioBitrate") == |
| 1140 "Enabled") { |
| 1141 // TODO(mflodman): Keep testing this and set proper values. |
| 1142 // Note: This is an early experiment currently only supported by Opus. |
| 1143 config_.min_bitrate_kbps = kOpusMinBitrate; |
| 1144 config_.max_bitrate_kbps = kOpusBitrateFb; |
| 1145 } |
| 1146 |
1139 RTC_DCHECK(!stream_); | 1147 RTC_DCHECK(!stream_); |
1140 stream_ = call_->CreateAudioSendStream(config_); | 1148 stream_ = call_->CreateAudioSendStream(config_); |
1141 RTC_CHECK(stream_); | 1149 RTC_CHECK(stream_); |
1142 UpdateSendState(); | 1150 UpdateSendState(); |
1143 } | 1151 } |
1144 | 1152 |
1145 bool SendTelephoneEvent(int payload_type, int event, int duration_ms) { | 1153 bool SendTelephoneEvent(int payload_type, int event, int duration_ms) { |
1146 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1154 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
1147 RTC_DCHECK(stream_); | 1155 RTC_DCHECK(stream_); |
1148 return stream_->SendTelephoneEvent(payload_type, event, duration_ms); | 1156 return stream_->SendTelephoneEvent(payload_type, event, duration_ms); |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2616 } | 2624 } |
2617 } else { | 2625 } else { |
2618 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2626 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
2619 engine()->voe()->base()->StopPlayout(channel); | 2627 engine()->voe()->base()->StopPlayout(channel); |
2620 } | 2628 } |
2621 return true; | 2629 return true; |
2622 } | 2630 } |
2623 } // namespace cricket | 2631 } // namespace cricket |
2624 | 2632 |
2625 #endif // HAVE_WEBRTC_VOICE | 2633 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |