一、函数调用关系
Thread::PreRun
-->ProcessMessages
-->Dispatch
-->Thread::QueuedTaskHandler::OnMessage
-->BaseChannel::SetRemoteContent
-->VoiceChannel::SetRemoteContent_w
1)ProcessMessages
2)Dispatch
3) Thread::QueuedTaskHandler::OnMessage
4) BaseChannel::SetRemoteContent
5)VoiceChannel::SetRemoteContent_w
----video.streams通过MediaContentDescription获取,MediaContentDescription通过sdp获取
->BaseChannel::UpdateRemoteStreams_w
->WebRtcVideoChannel::AddRecvStream
1)BaseChannel::UpdateRemoteStreams_w
2)WebRtcVideoChannel::AddRecvStream
-----调用ConfigureReceiverRtp配置远端ssrc
WebRtcVideoChannel::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream
WebRtcVideoChannel::WebRtcVideoReceiveStream::RecreateWebRtcVideoStream
webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream
----将远端ssrc,emplace到receive_rtp_config_,后续收包时做合法性判断。、
1)internal::VideoReceiveStream2::VideoReceiveStream2
2)RtpVideoStreamReceiver2::RtpVideoStreamReceiver2
----生效远端ssrc
二、具体函数实现
- CreateTracksFromSsrcInfos解析sdp命令行,构造StreamParams参数
- ConfigureReceiverRtp配置远端ssrc
- Call::CreateVideoReceiveStream,将远端ssrc,emplace到receive_rtp_config_
- DeliveryStatus Call::DeliverRtp对收到报文的ssrc进行合法性判断
- RtpVideoStreamReceiver2::RtpVideoStreamReceiver2函数生效远端ssrc
- RtpVideoStreamReceiver2::RtpVideoStreamReceiver2函数生效远端ssrc
接收RTCP报文时,使用该值做合法性判断
SDP命令行
参考:webrtc代码走读二(视频数据处理流程)_EveryDayOneHour的博客-CSDN博客
SDP有SSRC的协商 :