Remove CodecInst pt.3

Finally remove CodecInst from common_types.h, including remaining code referencing it.

TBR=kwiberg

Bug: webrtc:7626
Change-Id: I5e6b949ae9093641e33972af8438d1126fc48556
Reviewed-on: https://webrtc-review.googlesource.com/c/114546
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26036}
This commit is contained in:
Fredrik Solenberg
2018-12-17 21:02:22 +01:00
committed by Commit Bot
parent de133ce79e
commit 41f3a43c74
20 changed files with 21 additions and 304 deletions

View File

@ -10,7 +10,6 @@
#include "modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h"
#include "common_types.h"
#include "modules/audio_coding/codecs/pcm16b/pcm16b.h"
#include "rtc_base/checks.h"
@ -30,20 +29,6 @@ AudioEncoder::CodecType AudioEncoderPcm16B::GetCodecType() const {
return CodecType::kOther;
}
namespace {
AudioEncoderPcm16B::Config CreateConfig(const CodecInst& codec_inst) {
AudioEncoderPcm16B::Config config;
config.num_channels = codec_inst.channels;
config.sample_rate_hz = codec_inst.plfreq;
config.frame_size_ms = rtc::CheckedDivExact(
codec_inst.pacsize, rtc::CheckedDivExact(config.sample_rate_hz, 1000));
config.payload_type = codec_inst.pltype;
return config;
}
} // namespace
bool AudioEncoderPcm16B::Config::IsOk() const {
if ((sample_rate_hz != 8000) && (sample_rate_hz != 16000) &&
(sample_rate_hz != 32000) && (sample_rate_hz != 48000))
@ -51,7 +36,4 @@ bool AudioEncoderPcm16B::Config::IsOk() const {
return AudioEncoderPcm::Config::IsOk();
}
AudioEncoderPcm16B::AudioEncoderPcm16B(const CodecInst& codec_inst)
: AudioEncoderPcm16B(CreateConfig(codec_inst)) {}
} // namespace webrtc