Switch to using AudioEncoderPcm16B instead of ACMPCM16B

This change switches from the old codec wrapper ACMPCM16B to the new
AudioEncoderPcm16B wrapped in an ACMGenericCodecWrapper.

BUG=4228
COAUTHOR=kwiberg@webrtc.org
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33249004

Cr-Commit-Position: refs/heads/master@{#8324}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8324 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2015-02-11 08:25:12 +00:00
parent f58fe0ab2b
commit c2d0473320

View File

@ -746,46 +746,9 @@ ACMGenericCodec* ACMCodecDB::CreateCodecInstance(const CodecInst& codec_inst,
return new ACMCNG(codec_id, enable_red);
} else if (!STR_CASE_CMP(codec_inst.plname, "L16")) {
#ifdef WEBRTC_CODEC_PCM16
// For L16 we need to check sampling frequency to know what codec to create.
int codec_id;
if (codec_inst.channels == 1) {
switch (codec_inst.plfreq) {
case 8000: {
codec_id = kPCM16B;
break;
}
case 16000: {
codec_id = kPCM16Bwb;
break;
}
case 32000: {
codec_id = kPCM16Bswb32kHz;
break;
}
default: {
return NULL;
}
}
} else {
switch (codec_inst.plfreq) {
case 8000: {
codec_id = kPCM16B_2ch;
break;
}
case 16000: {
codec_id = kPCM16Bwb_2ch;
break;
}
case 32000: {
codec_id = kPCM16Bswb32kHz_2ch;
break;
}
default: {
return NULL;
}
}
}
return new ACMPCM16B(codec_id, enable_red);
return new ACMGenericCodecWrapper(codec_inst, cng_pt_nb, cng_pt_wb,
cng_pt_swb, cng_pt_fb, enable_red,
red_payload_type);
#endif
} else if (!STR_CASE_CMP(codec_inst.plname, "telephone-event")) {
#ifdef WEBRTC_CODEC_AVT