Adds trial to calculate audio overhead based on available data.
This adds the ability to disable legacy overhead calculation so we'll use the available data on per packet over head and frame length range to set the min and max total allocatable bitrate. Bug: webrtc:11001 Change-Id: I2a94499433e15bad11a08f81fe7f1dfc27982cdf Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155175 Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29368}
This commit is contained in:
committed by
Commit Bot
parent
f1e97b9ebd
commit
62aee9379c
@ -879,4 +879,17 @@ ANAStats AudioEncoderOpusImpl::GetANAStats() const {
|
||||
return ANAStats();
|
||||
}
|
||||
|
||||
absl::optional<std::pair<TimeDelta, TimeDelta> >
|
||||
AudioEncoderOpusImpl::GetFrameLengthRange() const {
|
||||
if (config_.supported_frame_lengths_ms.empty()) {
|
||||
return absl::nullopt;
|
||||
} else if (audio_network_adaptor_) {
|
||||
return {{TimeDelta::ms(config_.supported_frame_lengths_ms.front()),
|
||||
TimeDelta::ms(config_.supported_frame_lengths_ms.back())}};
|
||||
} else {
|
||||
return {{TimeDelta::ms(config_.frame_size_ms),
|
||||
TimeDelta::ms(config_.frame_size_ms)}};
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user