Index: webrtc/voice_engine/channel.cc |
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc |
index a17f546f4ed7a6f7b4b59c75e22fb1b0afa62200..397fa8f1e6d223939eb3f531c3dfeeb4ae2f3454 100644 |
--- a/webrtc/voice_engine/channel.cc |
+++ b/webrtc/voice_engine/channel.cc |
@@ -1028,18 +1028,6 @@ int32_t Channel::Init() { |
codec.pltype, codec.plfreq); |
} |
} |
-#ifdef WEBRTC_CODEC_RED |
- // Register RED to the receiving side of the ACM. |
- // We will not receive an OnInitializeDecoder() callback for RED. |
- if (!STR_CASE_CMP(codec.plname, "RED")) { |
- if (!RegisterReceiveCodec(&audio_coding_, &rent_a_codec_, codec)) { |
- WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, _channelId), |
- "Channel::Init() failed to register RED (%d/%d) " |
- "correctly", |
- codec.pltype, codec.plfreq); |
- } |
- } |
-#endif |
} |
if (rx_audioproc_->noise_suppression()->set_level(kDefaultNsMode) != 0) { |
@@ -2874,53 +2862,6 @@ int Channel::GetRTPStatistics(CallStatistics& stats) { |
return 0; |
} |
-int Channel::SetREDStatus(bool enable, int redPayloadtype) { |
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), |
- "Channel::SetREDStatus()"); |
- |
- if (enable) { |
- if (redPayloadtype < 0 || redPayloadtype > 127) { |
- _engineStatisticsPtr->SetLastError( |
- VE_PLTYPE_ERROR, kTraceError, |
- "SetREDStatus() invalid RED payload type"); |
- return -1; |
- } |
- |
- if (SetRedPayloadType(redPayloadtype) < 0) { |
the sun
2016/06/13 08:17:39
Can you remove SetRedPayloadType() as well?
kwiberg-webrtc
2016/06/13 11:21:14
Indeed I can. Good catch.
|
- _engineStatisticsPtr->SetLastError( |
- VE_CODEC_ERROR, kTraceError, |
- "SetSecondarySendCodec() Failed to register RED ACM"); |
- return -1; |
- } |
- } |
- |
- if (!codec_manager_.SetCopyRed(enable) || |
- !codec_manager_.MakeEncoder(&rent_a_codec_, audio_coding_.get())) { |
- _engineStatisticsPtr->SetLastError( |
- VE_AUDIO_CODING_MODULE_ERROR, kTraceError, |
- "SetREDStatus() failed to set RED state in the ACM"); |
- return -1; |
- } |
- return 0; |
-} |
- |
-int Channel::GetREDStatus(bool& enabled, int& redPayloadtype) { |
- enabled = codec_manager_.GetStackParams()->use_red; |
- if (enabled) { |
- int8_t payloadType = 0; |
- if (_rtpRtcpModule->SendREDPayloadType(&payloadType) != 0) { |
- _engineStatisticsPtr->SetLastError( |
- VE_RTP_RTCP_MODULE_ERROR, kTraceError, |
- "GetREDStatus() failed to retrieve RED PT from RTP/RTCP " |
- "module"); |
- return -1; |
- } |
- redPayloadtype = payloadType; |
- return 0; |
- } |
- return 0; |
-} |
- |
int Channel::SetCodecFECStatus(bool enable) { |
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), |
"Channel::SetCodecFECStatus()"); |