webrtc 代码学习(二十三)audio 接收rtcp nack,怎么发送需要重传的数据

本文详细介绍了WebRTC中处理音频接收RTCP NACK的流程,从DeliverRtcp开始,经过RTPSender::ReSendPacket将需要重传的数据存入packet_queue,再到SrtpTransport::ProtectRtp进行SRTP校验。在模拟丢包场景下,由于重复发送已接收的包导致SrtpTransport返回错误9。
摘要由CSDN通过智能技术生成

audio 接收rtcp nack,怎么发送需要重传的数据
作者:LanPZzzz

1. 流程如下:

从socket 中获取数据到下面DeliverRtcp 的部分,请查看audio rtcp 接收数据
->AudioReceiveStream::DeliverRtcp (audio\audio_receive_stream.cc 307)
->… -> RTCPReceiver::TriggerCallbacksFromRtcpPacket(modules\rtp_rtcp\source\rtcp_receiver.cc 949)
-> ModuleRtpRtcpImpl::OnReceivedNack (modules\rtp_rtcp\source\rtp_rtcp_impl.cc 828)
-> RTPSender::OnReceivedNack (modules\rtp_rtcp\source\rtp_sender.cc 715)
-> RTPSender::ReSendPacket (modules\rtp_rtcp\source\rtp_sender.cc 634)
-> PacedSender::InsertPacket (modules\pacing\paced_sender.cc 185)
-> RoundRobinPacketQueue::Push (modules\pacing\round_robin_packet_queue.cc 28) 放入到 streams_->packet_queue 中
->
->
->
->
->
->
->

2. 代码 RTPSender::ReSendPacket,最终存入到 packet_queue 中
int32_t RTPSender::ReSendPacket(uint16_t packet_id) {
  先从历史数据中获取当前packer_id 的PacketState,及info
  // Try to find packet
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值