WebRTC 源码阅读笔记之 TrendlineEstimator
Trendline 趋势线估算器所实现的接口称为 DelayIncreaseDetectorInterface, 意谓延迟增长检测器. 每一个反馈的 PacketResult 都会用来更新这个趋势线, 这个趋势线的斜率反应了网络延迟的变化, 可以从趋势线的斜率和自适应的阈值可能得出带宽的使用状况: kBwNormal: 带宽使用正常 kBwUnderusing: 带宽使用不足 kBwOverusing: 带宽使用过度 class TrendlineEstimator : public DelayIncreaseDetectorInterface { public: TrendlineEstimator(const WebRtcKeyValueConfig* key_value_config, NetworkStatePredictor* network_state_predictor); ~TrendlineEstimator() override; /* * 用新的采样来更新估算器, 这个 delta 是指包组中第一个包和最后一个包之间的发送时间,或接收时间差 * Update the estimator with a new sample. The deltas should represent deltas * between timestamp groups as defined by […]