Delete unused AudioCodingModule methods.

Methods deleted: IsCodecValid (static), QueryEncoder, SendFrequency.

Bug: None
Change-Id: Id63ea7cdc364583e896d3301d04fa9caae1e4d94
Reviewed-on: https://webrtc-review.googlesource.com/95486
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24440}
This commit is contained in:
Niels Möller
2018-08-22 16:00:36 +02:00
committed by Commit Bot
parent 18f1adc0da
commit 764c14c87d
4 changed files with 0 additions and 66 deletions

View File

@ -50,15 +50,9 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
void ModifyEncoder(rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)>
modifier) override;
void QueryEncoder(
rtc::FunctionView<void(const AudioEncoder*)> query) override;
// Get current send codec.
absl::optional<CodecInst> SendCodec() const override;
// Get current send frequency.
int SendFrequency() const override;
// Sets the bitrate to the specified value in bits/sec. In case the codec does
// not support the requested value it will choose an appropriate value
// instead.
@ -592,12 +586,6 @@ void AudioCodingModuleImpl::ModifyEncoder(
modifier(&encoder_stack_);
}
void AudioCodingModuleImpl::QueryEncoder(
rtc::FunctionView<void(const AudioEncoder*)> query) {
rtc::CritScope lock(&acm_crit_sect_);
query(encoder_stack_.get());
}
// Get current send codec.
absl::optional<CodecInst> AudioCodingModuleImpl::SendCodec() const {
rtc::CritScope lock(&acm_crit_sect_);
@ -621,18 +609,6 @@ absl::optional<CodecInst> AudioCodingModuleImpl::SendCodec() const {
}
}
// Get current send frequency.
int AudioCodingModuleImpl::SendFrequency() const {
rtc::CritScope lock(&acm_crit_sect_);
if (!encoder_stack_) {
RTC_LOG(LS_ERROR) << "SendFrequency Failed, no codec is registered";
return -1;
}
return encoder_stack_->SampleRateHz();
}
void AudioCodingModuleImpl::SetBitRate(int bitrate_bps) {
rtc::CritScope lock(&acm_crit_sect_);
if (encoder_stack_) {
@ -1284,12 +1260,4 @@ int AudioCodingModule::Codec(const char* payload_name,
return i ? *i : -1;
}
// Checks the validity of the parameters of the given codec
bool AudioCodingModule::IsCodecValid(const CodecInst& codec) {
bool valid = acm2::RentACodec::IsCodecValid(codec);
if (!valid)
RTC_LOG(LS_ERROR) << "Invalid codec setting";
return valid;
}
} // namespace webrtc