Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: voice_engine/channel.cc

Issue 3012403002: Remove unnecessary send codec initialization from voe::Channel. (Closed)
Patch Set: rebase Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: voice_engine/channel.cc
diff --git a/voice_engine/channel.cc b/voice_engine/channel.cc
index 5a7094179e1ef01126472597058c2395f4b6d923..4dff3de585c38ef9aeeb2001fb0906cc6e621b7b 100644
--- a/voice_engine/channel.cc
+++ b/voice_engine/channel.cc
@@ -874,40 +874,6 @@ int32_t Channel::Init() {
return -1;
}
- // TODO(solenberg): Remove?
- // Register a default set of send codecs.
- const int nSupportedCodecs = AudioCodingModule::NumberOfCodecs();
- for (int idx = 0; idx < nSupportedCodecs; idx++) {
- CodecInst codec;
- RTC_CHECK_EQ(0, audio_coding_->Codec(idx, &codec));
-
- // Ensure that PCMU is used as default send codec.
- if (STR_CASE_CMP(codec.plname, "PCMU") == 0 && codec.channels == 1) {
- SetSendCodec(codec);
- }
-
- // Register default PT for 'telephone-event'
- if (STR_CASE_CMP(codec.plname, "telephone-event") == 0) {
- if (_rtpRtcpModule->RegisterSendPayload(codec) == -1) {
- WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, _channelId),
- "Channel::Init() failed to register outband "
- "'telephone-event' (%d/%d) correctly",
- codec.pltype, codec.plfreq);
- }
- }
-
- if (STR_CASE_CMP(codec.plname, "CN") == 0) {
- if (!codec_manager_.RegisterEncoder(codec) ||
- !codec_manager_.MakeEncoder(&rent_a_codec_, audio_coding_.get()) ||
- _rtpRtcpModule->RegisterSendPayload(codec) == -1) {
- WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, _channelId),
- "Channel::Init() failed to register CN (%d/%d) "
- "correctly - 1",
- codec.pltype, codec.plfreq);
- }
- }
- }
-
return 0;
}
@@ -932,12 +898,6 @@ void Channel::Terminate() {
" (Audio coding module)");
}
- if (audio_coding_->RegisterVADCallback(NULL) == -1) {
- WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, _channelId),
- "Terminate() failed to de-register VAD callback"
- " (Audio coding module)");
- }
-
// De-register modules in process thread
if (_moduleProcessThreadPtr)
_moduleProcessThreadPtr->DeRegisterModule(_rtpRtcpModule.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698