webrtc代码走读二十六(rtcp打包模式及流程)

一、RTCP打包模式

根据webrtc代码定义,webrtc支持的rtcp打包模式有两种:

enum class RtcpMode { kOff, kCompound, kReducedSize };

Compound mode 遵循 RFC 4585 
ReducedSize mode遵循 RFC 5506

两种模式的差别:

1、Compound模式RTCP报文里面必须包含RR or SR and CNAME SDES才能发送报文。这样会导致RTCP报文size比较大,另外对于feedback反馈报文的响应速度也比较慢。

2、ReducedSize mode就是解决这类问题,如RFC 5506字段描述:

 

二、RTCP报文发送流程调用栈

ModuleRtpRtcpImpl2::ScheduleRtcpSendEvaluation  //定时调用函数
->ModuleRtpRtcpImpl2::MaybeSendRtcp
->RTCPSender::TimeToSendRTCPReport      //判断发送时间是否到,到就SendRTCP
->RTCPSender::SendRTCP                  //发送RTCP报文
->RTCPSender::ComputeCompoundRTCPPacket //封装RTCP报文
->RTCPSender::PrepareReport
->RTCPSender::SetNextRtcpSendEvaluationDuration //配置下次发送rtcp报文时间

RTCPSender::SendRTCP: 

 

  RTCPSender::ComputeCompoundRTCPPacket:

RTCPSender::PrepareReport 

 

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值