Implement Opus bandwidth adjustment behind a FieldTrial
Bug: webrtc:8522 Change-Id: I3a32ebfecd27ff74b507c2cee9e16aab17153442 Reviewed-on: https://webrtc-review.googlesource.com/22210 Commit-Queue: Alejandro Luebs <aluebs@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20799}
This commit is contained in:
@ -43,6 +43,13 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
||||
static rtc::Optional<int> GetNewComplexity(
|
||||
const AudioEncoderOpusConfig& config);
|
||||
|
||||
// Returns OPUS_AUTO if the the current bitrate is above wideband threshold.
|
||||
// Returns empty if it is below, but bandwidth coincides with the desired one.
|
||||
// Otherwise returns the desired bandwidth.
|
||||
static rtc::Optional<int> GetNewBandwidth(
|
||||
const AudioEncoderOpusConfig& config,
|
||||
OpusEncInst* inst);
|
||||
|
||||
using AudioNetworkAdaptorCreator =
|
||||
std::function<std::unique_ptr<AudioNetworkAdaptor>(const std::string&,
|
||||
RtcEventLog*)>;
|
||||
@ -148,6 +155,8 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
||||
AudioEncoderOpusConfig config_;
|
||||
const int payload_type_;
|
||||
const bool send_side_bwe_with_overhead_;
|
||||
const bool adjust_bandwidth_;
|
||||
bool bitrate_changed_;
|
||||
float packet_loss_rate_;
|
||||
std::vector<int16_t> input_buffer_;
|
||||
OpusEncInst* inst_;
|
||||
|
||||
Reference in New Issue
Block a user