iSAC: Make separate AudioEncoder and AudioDecoder objects

The only shared state is now the bandwidth estimation info.
This reduces the amount and complexity of the locking
substantially.

Review URL: https://codereview.webrtc.org/1208993010

Cr-Commit-Position: refs/heads/master@{#9762}
This commit is contained in:
kwiberg
2015-08-24 02:03:23 -07:00
committed by Commit bot
parent 2159b89fa2
commit 608c3cfe77
20 changed files with 367 additions and 510 deletions

View File

@ -559,22 +559,13 @@ AudioDecoder* CreateAudioDecoder(NetEqDecoder codec_type) {
return new AudioDecoderIlbc;
#endif
#if defined(WEBRTC_CODEC_ISACFX)
case kDecoderISAC: {
AudioEncoderDecoderIsacFix::Config config;
return new AudioEncoderDecoderIsacFix(config);
}
case kDecoderISAC:
return new AudioDecoderIsacFix();
#elif defined(WEBRTC_CODEC_ISAC)
case kDecoderISAC: {
AudioEncoderDecoderIsac::Config config;
config.sample_rate_hz = 16000;
return new AudioEncoderDecoderIsac(config);
}
case kDecoderISAC:
case kDecoderISACswb:
case kDecoderISACfb: {
AudioEncoderDecoderIsac::Config config;
config.sample_rate_hz = 32000;
return new AudioEncoderDecoderIsac(config);
}
case kDecoderISACfb:
return new AudioDecoderIsac();
#endif
#ifdef WEBRTC_CODEC_PCM16
case kDecoderPCM16B: