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; | |
141 _shared->channel_manager().GetChannel(channel).channel()->SetBitRate( | 140 _shared->channel_manager().GetChannel(channel).channel()->SetBitRate( |
142 bitrate_bps, kDefaultProbingIntervalMs); | 141 bitrate_bps); |
143 return 0; | 142 return 0; |
144 } | 143 } |
145 | 144 |
146 int VoECodecImpl::GetRecCodec(int channel, CodecInst& codec) { | 145 int VoECodecImpl::GetRecCodec(int channel, CodecInst& codec) { |
147 if (!_shared->statistics().Initialized()) { | 146 if (!_shared->statistics().Initialized()) { |
148 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 147 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
149 return -1; | 148 return -1; |
150 } | 149 } |
151 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); | 150 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); |
152 voe::Channel* channelPtr = ch.channel(); | 151 voe::Channel* channelPtr = ch.channel(); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, | 389 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, |
391 "GetOpusDtx failed to locate channel"); | 390 "GetOpusDtx failed to locate channel"); |
392 return -1; | 391 return -1; |
393 } | 392 } |
394 return channelPtr->GetOpusDtx(enabled); | 393 return channelPtr->GetOpusDtx(enabled); |
395 } | 394 } |
396 | 395 |
397 #endif // WEBRTC_VOICE_ENGINE_CODEC_API | 396 #endif // WEBRTC_VOICE_ENGINE_CODEC_API |
398 | 397 |
399 } // namespace webrtc | 398 } // namespace webrtc |
OLD | NEW |