Chromium Code Reviews| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 _shared->channel_manager().GetChannel(channel).channel()->SetBitRate( | 140 _shared->channel_manager().GetChannel(channel).channel()->SetBitRate( |
| 141 bitrate_bps); | 141 bitrate_bps, 0); |
|
minyue-webrtc
2016/11/28 12:00:00
Should we give something more meaningful? "0" seem
minyue-webrtc
2016/11/28 13:14:42
?
michaelt
2016/11/28 13:30:09
Oh sorry missed that one. This function is not use
| |
| 142 return 0; | 142 return 0; |
| 143 } | 143 } |
| 144 | 144 |
| 145 int VoECodecImpl::GetRecCodec(int channel, CodecInst& codec) { | 145 int VoECodecImpl::GetRecCodec(int channel, CodecInst& codec) { |
| 146 if (!_shared->statistics().Initialized()) { | 146 if (!_shared->statistics().Initialized()) { |
| 147 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 147 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
| 148 return -1; | 148 return -1; |
| 149 } | 149 } |
| 150 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); | 150 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); |
| 151 voe::Channel* channelPtr = ch.channel(); | 151 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, | 389 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, |
| 390 "GetOpusDtx failed to locate channel"); | 390 "GetOpusDtx failed to locate channel"); |
| 391 return -1; | 391 return -1; |
| 392 } | 392 } |
| 393 return channelPtr->GetOpusDtx(enabled); | 393 return channelPtr->GetOpusDtx(enabled); |
| 394 } | 394 } |
| 395 | 395 |
| 396 #endif // WEBRTC_VOICE_ENGINE_CODEC_API | 396 #endif // WEBRTC_VOICE_ENGINE_CODEC_API |
| 397 | 397 |
| 398 } // namespace webrtc | 398 } // namespace webrtc |
| OLD | NEW |