OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 return 0; | 130 return 0; |
131 } | 131 } |
132 | 132 |
133 int VoECodecImpl::SetBitRate(int channel, int bitrate_bps) { | 133 int VoECodecImpl::SetBitRate(int channel, int bitrate_bps) { |
134 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | 134 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), |
135 "SetBitRate(bitrate_bps=%d)", bitrate_bps); | 135 "SetBitRate(bitrate_bps=%d)", bitrate_bps); |
136 if (!_shared->statistics().Initialized()) { | 136 if (!_shared->statistics().Initialized()) { |
137 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 137 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
138 return -1; | 138 return -1; |
139 } | 139 } |
| 140 constexpr int64_t kDefaultProbingIntervalMs = 3000; |
140 _shared->channel_manager().GetChannel(channel).channel()->SetBitRate( | 141 _shared->channel_manager().GetChannel(channel).channel()->SetBitRate( |
141 bitrate_bps); | 142 bitrate_bps, kDefaultProbingIntervalMs); |
142 return 0; | 143 return 0; |
143 } | 144 } |
144 | 145 |
145 int VoECodecImpl::GetRecCodec(int channel, CodecInst& codec) { | 146 int VoECodecImpl::GetRecCodec(int channel, CodecInst& codec) { |
146 if (!_shared->statistics().Initialized()) { | 147 if (!_shared->statistics().Initialized()) { |
147 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 148 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
148 return -1; | 149 return -1; |
149 } | 150 } |
150 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); | 151 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); |
151 voe::Channel* channelPtr = ch.channel(); | 152 voe::Channel* channelPtr = ch.channel(); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, | 390 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, |
390 "GetOpusDtx failed to locate channel"); | 391 "GetOpusDtx failed to locate channel"); |
391 return -1; | 392 return -1; |
392 } | 393 } |
393 return channelPtr->GetOpusDtx(enabled); | 394 return channelPtr->GetOpusDtx(enabled); |
394 } | 395 } |
395 | 396 |
396 #endif // WEBRTC_VOICE_ENGINE_CODEC_API | 397 #endif // WEBRTC_VOICE_ENGINE_CODEC_API |
397 | 398 |
398 } // namespace webrtc | 399 } // namespace webrtc |
OLD | NEW |