Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc

Issue 1881003003: Reland Remove the deprecated EncodeInternal interface from AudioEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Renamed ApproximateEncodedBytes to SufficientOutputBufferSize in Opus Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
index a24b1526fd23777a5bb674fafe7bbb533066163f..e4da8d7440bc5520342474ca6e9a9360f885c9bc 100644
--- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
@@ -52,10 +52,6 @@ AudioEncoderPcm::AudioEncoderPcm(const Config& config, int sample_rate_hz)
AudioEncoderPcm::~AudioEncoderPcm() = default;
-size_t AudioEncoderPcm::MaxEncodedBytes() const {
- return full_frame_samples_ * BytesPerSample();
-}
-
int AudioEncoderPcm::SampleRateHz() const {
return sample_rate_hz_;
}
@@ -93,7 +89,7 @@ AudioEncoder::EncodedInfo AudioEncoderPcm::EncodeImpl(
info.encoded_timestamp = first_timestamp_in_buffer_;
info.payload_type = payload_type_;
info.encoded_bytes =
- encoded->AppendData(MaxEncodedBytes(),
+ encoded->AppendData(full_frame_samples_ * BytesPerSample(),
[&] (rtc::ArrayView<uint8_t> encoded) {
return EncodeCall(&speech_buffer_[0],
full_frame_samples_,

Powered by Google App Engine
This is Rietveld 408576698