相关对象之间所属关系
Call
|
---RtpTransportControllerSend
|
---SendSideCongestionController
|
---BitrateControllerImp
| |
| ---SendSideBandwidthEstimation(负责最终的带宽的确定工作)
|
---DelaybaseBwe(包装Trendline滤波器)
SendSideBandwidthEstimation : 计算并存储最终码率,如果是gcc同样存放远端计算的码率(即通过TMMBR、REMB传过来的)
|
---void UpdateEstimate(int64_t now_ms) : 在Proccess中周期性调用,进行当前最新码率的计算
|
---void UpdateDelayBasedEstimate(int64_t now_ms, uint32_t bitrate_bps) : 根据DelaybaseBwe计算的结果计算当前码率
|
---void UpdatePacketsLost(int packets_lost, ...) : 更新丢包率
|
---void UpdateRtt(int64_t rtt, int64_t now_ms) : 更新RTT
|
---void CurrentEstimate(int* bitrate, uint8_t* loss, int64_t* rtt) : 上层通过这接口获取当前码率从而进行pacer及编码器码率的设置
BitrateControllerImp : 是SendSideBandwidthEstimation的包装,同样还负责RR报文的解析
|
---void OnDelayBasedBweResult(const DelayBasedBwe::Result& result) : 通过这个接口将DelaybaseBwe计算的结果存放到SendSideBandwidthEstimation中
|
---void Process() : 调用SendSideBandwidthEstimation的UpdateEstimate及CurrentEstimate接口,并将计算好的带宽通知给观察者
|
---void OnReceivedRtcpReceiverReport(...) : rtp/rtcp模块调用
基于丢包 RR报文
RTCPReceiver::IncomingPacket
|
RTCPReceiver::TriggerCallbacksFromRtcpPacket
|
BitrateControllerImpl::OnReceivedRtcpReceiverReport
|
SendSideBandwidthEstimation::UpdateReceiverBlock
|
SendSideBandwidthEstimation::UpdatePacketsLost
|
SendSideBandwidthEstimation::UpdateEstimate
|
SendSideBandwidthEstimation::CapBitrateToThresholds
|
current_bitrate_bps_ = bitrate_bps;
基于延时 TransportFeedback报文
RTCPReceiver::IncomingPacket
|
RTCPReceiver::TriggerCallbacksFromRtcpPacket
|
SendSideCongestionController::OnTransportFeedback
|
BitrateControllerImpl::OnDelayBasedBweResult
|
SendSideBandwidthEstimation::UpdateDelayBasedEstimate
|
SendSideBandwidthEstimation::CapBitrateToThresholds
|
current_bitrate_bps_ = bitrate_bps;
webrtc中Transport-CC带宽计算流程
于 2022-01-20 17:26:24 首次发布