Adds stable bandwidth estimate to GoogCC.
The intention is to provide a bandwidth estimate that only updates if the actual available bandwidth is known to have changed. This will be used in media streams to avoid changing the configuration (such as frame size, audio frame length etc), just because the control target rate changed. Bug: webrtc:9718 Change-Id: I17ba5a2f9e5bd408a71f89c690d45541655a68e2 Reviewed-on: https://webrtc-review.googlesource.com/c/107726 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25772}
This commit is contained in:
committed by
Commit Bot
parent
88ce4ef46e
commit
57f3ad0f8d
@ -308,6 +308,7 @@ void SimulatedTimeClient::Update(NetworkControlUpdate update) {
|
||||
DataRate rate_per_stream =
|
||||
update.target_rate->target_rate * ratio_per_stream;
|
||||
target_rate_ = update.target_rate->target_rate;
|
||||
link_capacity_ = update.target_rate->network_estimate.bandwidth;
|
||||
for (auto& stream : packet_streams_)
|
||||
stream->OnTargetRateUpdate(rate_per_stream);
|
||||
}
|
||||
@ -349,6 +350,10 @@ TimeDelta SimulatedTimeClient::GetNetworkControllerProcessInterval() const {
|
||||
return network_controller_factory_.GetProcessInterval();
|
||||
}
|
||||
|
||||
DataRate SimulatedTimeClient::link_capacity() const {
|
||||
return link_capacity_;
|
||||
}
|
||||
|
||||
double SimulatedTimeClient::target_rate_kbps() const {
|
||||
return target_rate_.kbps<double>();
|
||||
}
|
||||
|
||||
@ -132,6 +132,7 @@ class SimulatedTimeClient : NetworkReceiverInterface {
|
||||
void TriggerFakeReroute(Timestamp at_time);
|
||||
TimeDelta GetNetworkControllerProcessInterval() const;
|
||||
double target_rate_kbps() const;
|
||||
DataRate link_capacity() const;
|
||||
|
||||
bool TryDeliverPacket(rtc::CopyOnWriteBuffer packet,
|
||||
uint64_t receiver,
|
||||
@ -147,6 +148,7 @@ class SimulatedTimeClient : NetworkReceiverInterface {
|
||||
SimulatedFeedback feedback_;
|
||||
TargetRateConstraints current_contraints_;
|
||||
DataRate target_rate_ = DataRate::Infinity();
|
||||
DataRate link_capacity_ = DataRate::Infinity();
|
||||
FILE* packet_log_ = nullptr;
|
||||
|
||||
std::vector<std::unique_ptr<PacketStream>> packet_streams_;
|
||||
|
||||
Reference in New Issue
Block a user