summaryrefslogtreecommitdiff
path: root/voice_engine/channel.cc
diff options
context:
space:
mode:
authorminyue@webrtc.org <minyue@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-08-12 08:13:33 +0000
committerminyue@webrtc.org <minyue@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-08-12 08:13:33 +0000
commit1bfd54032a8e60b993fb3b32c15ba9c55184c86b (patch)
treeb21eb10c388a4313dd1ab869a446f0c0593c3508 /voice_engine/channel.cc
parent22c283b04855b8775d323e8788a0438ce2d7c2b5 (diff)
downloadwebrtc-1bfd54032a8e60b993fb3b32c15ba9c55184c86b.tar.gz
Adding SetOpusMaxBandwidth in VoE and ACM
This is a step to solve https://code.google.com/p/webrtc/issues/detail?id=1906 In particular, we add an API in VoE and ACM to call Opus's API of setting maximum bandwidth. TEST = added a test in voe_cmd_test and listened to the result BUG= R=henrika@google.com, henrika@webrtc.org, turaj@webrtc.org Review URL: https://webrtc-codereview.appspot.com/21129004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6869 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/channel.cc')
-rw-r--r--voice_engine/channel.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/voice_engine/channel.cc b/voice_engine/channel.cc
index c9364efb..3f13ba27 100644
--- a/voice_engine/channel.cc
+++ b/voice_engine/channel.cc
@@ -1749,6 +1749,19 @@ Channel::SetSendCNPayloadType(int type, PayloadFrequencies frequency)
return 0;
}
+int Channel::SetOpusMaxBandwidth(int bandwidth_hz) {
+ WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
+ "Channel::SetOpusMaxBandwidth()");
+
+ if (audio_coding_->SetOpusMaxBandwidth(bandwidth_hz) != 0) {
+ _engineStatisticsPtr->SetLastError(
+ VE_AUDIO_CODING_MODULE_ERROR, kTraceError,
+ "SetOpusMaxBandwidth() failed to set maximum encoding bandwidth");
+ return -1;
+ }
+ return 0;
+}
+
int32_t Channel::RegisterExternalTransport(Transport& transport)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),