Removes redundant starting rate.

Sine a starting rate field was added to the constraints struct. Having
it in the initial config separately is reduntant. To simplify the code,
the extra field is removed. This is a follow up on:
https://webrtc-review.googlesource.com/c/src/+/92624

Bug: webrtc:9586
Change-Id: I9b01b16b2fc4b8479e83b7e998308be2295e0325
Reviewed-on: https://webrtc-review.googlesource.com/96801
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24514}
This commit is contained in:
Sebastian Jansson
2018-08-30 15:56:48 +02:00
committed by Commit Bot
parent 836a7a2e4d
commit ed1f75ab6d
9 changed files with 17 additions and 21 deletions

View File

@ -29,15 +29,13 @@ class TargetTransferRateObserver {
// optional to use for a network controller implementation.
struct NetworkControllerConfig {
// The initial constraints to start with, these can be changed at any later
// time by calls to OnTargetRateConstraints.
// time by calls to OnTargetRateConstraints. Note that the starting rate
// has to be set initially to provide a starting state for the network
// controller, even though the field is marked as optional.
TargetRateConstraints constraints;
// Initial stream specific configuration, these are changed at any later time
// by calls to OnStreamsConfig.
StreamsConfig stream_based_config;
// The initial bandwidth estimate to base target rate on. This should be used
// as the basis for initial OnTargetTransferRate and OnPacerConfig callbacks.
// Note that starting rate is only provided on construction.
DataRate starting_bandwidth = DataRate::Infinity();
};
// NetworkControllerInterface is implemented by network controllers. A network

View File

@ -45,6 +45,8 @@ struct TargetRateConstraints {
Timestamp at_time = Timestamp::Infinity();
absl::optional<DataRate> min_data_rate;
absl::optional<DataRate> max_data_rate;
// The initial bandwidth estimate to base target rate on. This should be used
// as the basis for initial OnTargetTransferRate and OnPacerConfig callbacks.
absl::optional<DataRate> starting_rate;
};