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:

committed by
Commit Bot

parent
de133ce79e
commit
41f3a43c74
@ -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
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
struct CodecInst;
|
||||
|
||||
class AudioEncoderPcm16B final : public AudioEncoderPcm {
|
||||
public:
|
||||
struct Config : public AudioEncoderPcm::Config {
|
||||
@ -30,7 +28,6 @@ class AudioEncoderPcm16B final : public AudioEncoderPcm {
|
||||
|
||||
explicit AudioEncoderPcm16B(const Config& config)
|
||||
: AudioEncoderPcm(config, config.sample_rate_hz) {}
|
||||
explicit AudioEncoderPcm16B(const CodecInst& codec_inst);
|
||||
|
||||
protected:
|
||||
size_t EncodeCall(const int16_t* audio,
|
||||
|
Reference in New Issue
Block a user