Implement AudioEncoder::GetFrameLengthRange() for all audio encoders.
The WebRTC-SendSideBwe-WithOverhead field trial requires audio encoders to properly implement the AudioEncoder::GetFrameLengthRange() function. Thic CL implements the function for all audio encoders in WebRTC in preparation for making that function pure virtual in the interface. Bug: webrtc:11427 Change-Id: Ieab6b6c72c62af6ac9525a20fcb39bd477079551 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171503 Reviewed-by: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Minyue Li <minyue@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30890}
This commit is contained in:
@ -11,8 +11,12 @@
|
||||
#ifndef MODULES_AUDIO_CODING_CODECS_ILBC_AUDIO_ENCODER_ILBC_H_
|
||||
#define MODULES_AUDIO_CODING_CODECS_ILBC_AUDIO_ENCODER_ILBC_H_
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/audio_codecs/audio_encoder.h"
|
||||
#include "api/audio_codecs/ilbc/audio_encoder_ilbc_config.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "modules/audio_coding/codecs/ilbc/ilbc.h"
|
||||
#include "rtc_base/constructor_magic.h"
|
||||
|
||||
@ -32,6 +36,8 @@ class AudioEncoderIlbcImpl final : public AudioEncoder {
|
||||
rtc::ArrayView<const int16_t> audio,
|
||||
rtc::Buffer* encoded) override;
|
||||
void Reset() override;
|
||||
absl::optional<std::pair<TimeDelta, TimeDelta>> GetFrameLengthRange()
|
||||
const override;
|
||||
|
||||
private:
|
||||
size_t RequiredOutputSizeBytes() const;
|
||||
|
||||
Reference in New Issue
Block a user