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
@ -12,25 +12,11 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "common_types.h"
|
||||
#include "modules/audio_coding/codecs/g711/g711_interface.h"
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
namespace {
|
||||
|
||||
template <typename T>
|
||||
typename T::Config CreateConfig(const CodecInst& codec_inst) {
|
||||
typename T::Config config;
|
||||
config.frame_size_ms = codec_inst.pacsize / 8;
|
||||
config.num_channels = codec_inst.channels;
|
||||
config.payload_type = codec_inst.pltype;
|
||||
return config;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
bool AudioEncoderPcm::Config::IsOk() const {
|
||||
return (frame_size_ms % 10 == 0) && (num_channels >= 1);
|
||||
}
|
||||
@ -103,9 +89,6 @@ void AudioEncoderPcm::Reset() {
|
||||
speech_buffer_.clear();
|
||||
}
|
||||
|
||||
AudioEncoderPcmA::AudioEncoderPcmA(const CodecInst& codec_inst)
|
||||
: AudioEncoderPcmA(CreateConfig<AudioEncoderPcmA>(codec_inst)) {}
|
||||
|
||||
size_t AudioEncoderPcmA::EncodeCall(const int16_t* audio,
|
||||
size_t input_len,
|
||||
uint8_t* encoded) {
|
||||
@ -120,9 +103,6 @@ AudioEncoder::CodecType AudioEncoderPcmA::GetCodecType() const {
|
||||
return AudioEncoder::CodecType::kPcmA;
|
||||
}
|
||||
|
||||
AudioEncoderPcmU::AudioEncoderPcmU(const CodecInst& codec_inst)
|
||||
: AudioEncoderPcmU(CreateConfig<AudioEncoderPcmU>(codec_inst)) {}
|
||||
|
||||
size_t AudioEncoderPcmU::EncodeCall(const int16_t* audio,
|
||||
size_t input_len,
|
||||
uint8_t* encoded) {
|
||||
|
||||
Reference in New Issue
Block a user