webrtc-org
webrtc-org copied to clipboard
Ask a question about PCC congestion control
In function OnSentPacket(SentPacket msg) of "pcc_network_controller.cc" file. There is codes if (last_received_packets_.size() > 0) sending_time = last_received_packets_.back().receive_time - last_received_packets_.front().receive_time; DataRate receiving_rate = bandwidth_estimate_; if (sending_time > TimeDelta::Zero()) receiving_rate = received_size / sending_time; bandwidth_estimate_ = std::min<DataRate>(bandwidth_estimate_ * 0.5, receiving_rate); But the unit of sending_time is ms(millisecond), the unit of received_size is bytes. So the unit of receiving_rate is B/ms,is not bps, is it right? but the unit of bandwidth_estimate_ is bps. So what does it mean? The unit is different?
Another question: In function ComputeDelayGradient(double delay_gradient_threshold) of file "monitor_interval.cc", why the unit of delay is us(microsecond)? And by analyzing the source code of us(), I found this function does nothing but call function ToValue(), so the result is still ms(millisecond)? I am confused. Can anyone answer to me? Thanks a lot!