Remove AudioEncoder methods SetMaxBitrate and SetMaxPayloadSize
And the corresponding ACM methods SetISACMaxRate and SetISACMaxPayloadSize. They were only used in tests. Review URL: https://codereview.webrtc.org/1311533010 Cr-Commit-Position: refs/heads/master@{#9903}
This commit is contained in:
@ -52,8 +52,4 @@ void AudioEncoder::SetProjectedPacketLossRate(double fraction) {}
|
||||
|
||||
void AudioEncoder::SetTargetBitrate(int target_bps) {}
|
||||
|
||||
void AudioEncoder::SetMaxBitrate(int max_bps) {}
|
||||
|
||||
void AudioEncoder::SetMaxPayloadSize(int max_payload_size_bytes) {}
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -138,16 +138,6 @@ class AudioEncoder {
|
||||
// encoder is free to adjust or disregard the given bitrate (the default
|
||||
// implementation does the latter).
|
||||
virtual void SetTargetBitrate(int target_bps);
|
||||
|
||||
// Sets the maximum bitrate which must not be exceeded for any packet. The
|
||||
// encoder is free to adjust or disregard this value (the default
|
||||
// implementation does the latter).
|
||||
virtual void SetMaxBitrate(int max_bps);
|
||||
|
||||
// Sets an upper limit on the size of packet payloads produced by the
|
||||
// encoder. The encoder is free to adjust or disregard this value (the
|
||||
// default implementation does the latter).
|
||||
virtual void SetMaxPayloadSize(int max_payload_size_bytes);
|
||||
};
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_
|
||||
|
@ -199,14 +199,6 @@ void AudioEncoderCng::SetTargetBitrate(int bits_per_second) {
|
||||
speech_encoder_->SetTargetBitrate(bits_per_second);
|
||||
}
|
||||
|
||||
void AudioEncoderCng::SetMaxBitrate(int max_bps) {
|
||||
speech_encoder_->SetMaxBitrate(max_bps);
|
||||
}
|
||||
|
||||
void AudioEncoderCng::SetMaxPayloadSize(int max_payload_size_bytes) {
|
||||
speech_encoder_->SetMaxPayloadSize(max_payload_size_bytes);
|
||||
}
|
||||
|
||||
AudioEncoder::EncodedInfo AudioEncoderCng::EncodePassive(
|
||||
size_t frames_to_encode,
|
||||
size_t max_encoded_bytes,
|
||||
|
@ -67,8 +67,6 @@ class AudioEncoderCng final : public AudioEncoder {
|
||||
void SetMaxPlaybackRate(int frequency_hz) override;
|
||||
void SetProjectedPacketLossRate(double fraction) override;
|
||||
void SetTargetBitrate(int target_bps) override;
|
||||
void SetMaxBitrate(int max_bps) override;
|
||||
void SetMaxPayloadSize(int max_payload_size_bytes) override;
|
||||
|
||||
private:
|
||||
EncodedInfo EncodePassive(size_t frames_to_encode,
|
||||
|
@ -67,8 +67,6 @@ class AudioEncoderIsacT final : public AudioEncoder {
|
||||
size_t max_encoded_bytes,
|
||||
uint8_t* encoded) override;
|
||||
void Reset() override;
|
||||
void SetMaxPayloadSize(int max_payload_size_bytes) override;
|
||||
void SetMaxBitrate(int max_rate_bps) override;
|
||||
|
||||
private:
|
||||
// This value is taken from STREAM_SIZE_MAX_60 for iSAC float (60 ms) and
|
||||
|
@ -157,20 +157,6 @@ void AudioEncoderIsacT<T>::Reset() {
|
||||
RecreateEncoderInstance(config_);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void AudioEncoderIsacT<T>::SetMaxPayloadSize(int max_payload_size_bytes) {
|
||||
auto conf = config_;
|
||||
conf.max_payload_size_bytes = max_payload_size_bytes;
|
||||
RecreateEncoderInstance(conf);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void AudioEncoderIsacT<T>::SetMaxBitrate(int max_rate_bps) {
|
||||
auto conf = config_;
|
||||
conf.max_bit_rate = max_rate_bps;
|
||||
RecreateEncoderInstance(conf);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void AudioEncoderIsacT<T>::RecreateEncoderInstance(const Config& config) {
|
||||
CHECK(config.IsOk());
|
||||
|
@ -121,12 +121,4 @@ void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) {
|
||||
speech_encoder_->SetTargetBitrate(bits_per_second);
|
||||
}
|
||||
|
||||
void AudioEncoderCopyRed::SetMaxBitrate(int max_bps) {
|
||||
speech_encoder_->SetMaxBitrate(max_bps);
|
||||
}
|
||||
|
||||
void AudioEncoderCopyRed::SetMaxPayloadSize(int max_payload_size_bytes) {
|
||||
speech_encoder_->SetMaxPayloadSize(max_payload_size_bytes);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -54,8 +54,6 @@ class AudioEncoderCopyRed final : public AudioEncoder {
|
||||
void SetMaxPlaybackRate(int frequency_hz) override;
|
||||
void SetProjectedPacketLossRate(double fraction) override;
|
||||
void SetTargetBitrate(int target_bps) override;
|
||||
void SetMaxBitrate(int max_bps) override;
|
||||
void SetMaxPayloadSize(int max_payload_size_bytes) override;
|
||||
|
||||
private:
|
||||
AudioEncoder* speech_encoder_;
|
||||
|
Reference in New Issue
Block a user