Index: webrtc/modules/congestion_controller/probe_bitrate_estimator.h |
diff --git a/webrtc/modules/congestion_controller/probe_bitrate_estimator.h b/webrtc/modules/congestion_controller/probe_bitrate_estimator.h |
index 7f0c4569c97f039976e822d94887987d66e8e994..67b53f3e7ec19cd6bb218adc5560919313b40682 100644 |
--- a/webrtc/modules/congestion_controller/probe_bitrate_estimator.h |
+++ b/webrtc/modules/congestion_controller/probe_bitrate_estimator.h |
@@ -18,25 +18,16 @@ |
namespace webrtc { |
-struct ProbingResult { |
- static constexpr int kNoEstimate = -1; |
- |
- ProbingResult(); |
- ProbingResult(int bps, int64_t timestamp); |
- bool valid() const; |
- |
- int bps; |
- int64_t timestamp; |
-}; |
- |
class ProbeBitrateEstimator { |
public: |
ProbeBitrateEstimator(); |
- // Should be called for every packet we receive feedback about. If the |
- // packet was used for probing it will validate/calculate the resulting |
- // bitrate and return the result. |
- ProbingResult PacketFeedback(const PacketInfo& packet_info); |
+ // Should be called for every probe packet we receive feedback about. |
+ // Estimates highest bitrate across all probe clusters received. |
+ // |min_probe_clusters| specifies minimum number of probe clusters to |
+ // have a valid BW value. |
+ int HandleProbeAndEstimateBitrate(const PacketInfo& packet_info, |
+ size_t min_probe_clusters); |
private: |
struct AggregatedCluster { |
@@ -46,7 +37,9 @@ class ProbeBitrateEstimator { |
int64_t first_receive_ms = std::numeric_limits<int64_t>::max(); |
int64_t last_receive_ms = 0; |
size_t size = 0; |
+ int bps = 0; |
}; |
+ int HighestBitrateOnClusters(); |
std::map<int, AggregatedCluster> clusters_; |
int last_valid_cluster_id_; |