获取数据
作者:LanPZzzz
void AsyncUDPSocket::OnReadEvent(rtc_base\asyncudpsocket.cc 107 行)
-> PhysicalSocket::RecvFrom(rtc_base\physicalsocketserver.cc 397 行)
-> SignalReadPacket(rtc_base\asyncudpsocket.cc 126 行)
-> AllocationSequence::OnReadPacket (p2p\client\basicportallocator.cc 1696 行)
-> UDPPort::HandleIncomingPacket (p2p\base\stunport.cc 296 行)
-> UDPPort::OnReadPacket(p2p\base\stunport.cc 339 行)
-> Connection::OnReadPacket (p2p\base\port.cc 1195 行)
-> SignalReadPacket (p2p\base\port.cc 1207 行 )
-> P2PTransportChannel::OnReadPacket (p2p\base\p2ptransportchannel.cc 2216 行)
-> SignalReadPacket (p2p\base\p2ptransportchannel.cc 2227 行)
-> DtlsTransport::OnReadPacket (p2p\base\dtlstransport.cc 536 行)
-> SignalReadPacket (p2p\base\dtlstransport.cc 610 行)
-> RtpTransport::OnReadPacket (pc\rtptransport.cc 248 行)
-> rtc::CopyOnWriteBuffer packet(data, len); (pc\rtptransport.cc 265 行) 数据进行copy
-> SrtpTransport::OnRtpPacketReceived (pc\srtptransport.cc 195 行 )
-> UnprotectRtp(data, len, &len) (pc\srtptransport.cc 205 行) 这一步操作应该是把data len 改掉了,然后有设置的packet 中,需要进一步查看为什么会改掉
-> RtpTransport::DemuxPacket (pc\srtptransport.cc 189 行)
-> webrtc::RtpPacketReceived parsed_packet
-> parsed_packet.Parse => RtpPacket::Parse (modules\rtp_rtcp\source\rtp_packet.cc 99 行) 根据packet 中的data,解析ParseBuffer,如timestamp_, ssrc 等,并保存packet
-> RtpDemuxer::OnRtpPacket(call\rtp_demuxer.cc 154 行)
-> RtpPacketSinkInterface* sink = ResolveSink(packet); 根据packet 找sink
-> BaseChannel::OnRtpPacket(pc\channel.cc 451 行) 这次我进入的是video::channel
-> BaseChannel::OnPacketReceived(pc\channel.cc 493 行)
-> BaseChannel::ProcessPacket (pc\channel.cc 524 行)
-> WebRtcVideoChannel::OnPacketReceived(media\engine\webrtcvideoengine.cc 1431 行)
-> call_->Receiver()->DeliverPacket(media\engine\webrtcvideoengine.cc 1436 行) => Call::DeliverPacket (call\call.cc 1297 行)
-> Call::DeliverRtp (call\call.cc 1219 行)
-> Call::NotifyBweOfReceivedPacket (call\call.cc 1334 行) 解析出 RTPHeader
-> receive_side_cc_.OnReceivedPacket (call\call.cc 1356 行) => ReceiveSideCongestionController::OnReceivedPacket (modules\congestion_controller\receive_side_congestion_controller.cc 124 行)
-> RemoteEstimatorProxy::IncomingPacket (modules\remote_bitrate_estimator\remote_estimator_proxy.cc 48 行)
-> RemoteEstimatorProxy::OnPacketArrival(modules\remote_bitrate_estimator\remote_estimator_proxy.cc 113 行)
-> video_receiver_controller_.OnRtpPacket(call\call.cc 1281 行) => RtpStreamReceiverController::OnRtpPacket (call\rtp_stream_receiver_controller.cc 52 行)
-> RtpDemuxer::OnRtpPacket (call\rtp_demuxer.cc 154 行)
** -> RtpVideoStreamReceiver::OnRtpPacket (video\rtp_video_stream_receiver.cc 251 行)
-> RtpVideoStreamReceiver::ReceivePacket (video\rtp_video_stream_receiver.cc 385 行)
-> ParseAndHandleEncapsulatingHeader (video\rtp_video_stream_receiver.cc 403 行)
-> UlpfecReceiverImpl::AddReceivedRedPacket ****(modules\rtp_rtcp\source\ulpfec_receiver_impl.cc 78 行)
-> UlpfecReceiverImpl::ProcessReceivedFec (modules\rtp_rtcp\source\ulpfec_receiver_impl.cc 225 行)
-> RtpVideoStreamReceiver::OnRecoveredPacket (video\rtp_video_stream_receiver.cc 236 行)
-> RtpVideoStreamReceiver::ReceivePacket(video\rtp_video_stream_receiver.cc 385 行)
-> RTPPayloadRegistry::PayloadTypeToPayload (modules\rtp_rtcp\source\rtp_payload_registry.cc 228 行)
-> RtpReceiverImpl::IncomingRtpPacket (modules\rtp_rtcp\source\rtp_receiver_impl.cc 146 行)
** ** ** -> RTPReceiverVideo::ParseRtpPacket ******(modules\rtp_rtcp\source\rtp_receiver_video.cc 46 行)
-> RtpDepacketizer::Create (modules\rtp_rtcp\source\rtp_format.cc 48 行) 根据codec type 创建不同的RtpDepacketizer,如VP8
-> RtpDepacketizerVp8::Parse (modules\rtp_rtcp\source\rtp_format_vp8.cc 469 行) 使用vp8 解析
-> RtpVideoStreamReceiver::OnReceivedPayloadData (video\rtp_video_stream_receiver.cc 190 行)
-> RemoteNtpTimeEstimator::Estimate (modules\rtp_rtcp\source\remote_ntp_time_estimator.cc 59 行)
-> RtpToNtpEstimator::Estimate (system_wrappers\source\rtp_to_ntp_estimator.cc 172 行)
-> NackModule::OnReceivedPacket (modules\video_coding\nack_module.cc 111 行)
-> NackModule::OnReceivedPacket (modules\video_coding\nack_module.cc 58 行)
-> NackModule::AddPacketsToNack (modules\video_coding\nack_module.cc 185 行) 这里有调用 nack_sender_->SendNack(nack_batch)
-> PacketBuffer::InsertPacket (modules\video_coding\packet_buffer.cc 63 行)
-> PacketBuffer::UpdateMissingPackets (modules\video_coding\packet_buffer.cc 469 行)
-> received_frame_callback_->OnReceivedFrame => RtpVideoStreamReceiver::OnReceivedFrame (video\rtp_video_stream_receiver.cc 327 行)
-> RtpFrameReferenceFinder::ManageFrame (modules\video_coding\rtp_frame_reference_finder.cc 34 行)
-> RtpFrameReferenceFinder::ManageFrameInternal (modules\video_coding\rtp_frame_reference_finder.cc 85 行)
-> RtpFrameReferenceFinder::ManageFrameVp8 (modules\video_coding\rtp_frame_reference_finder.cc 242 行)
-> 这回是 kHandOff,RtpVideoStreamReceiver::OnCompleteFrame (video\rtp_video_stream_receiver.cc 338 行) 这里应该就是保存Video Frame 了
-> VideoReceiveStream::OnCompleteFrame (video\video_receive_stream.cc 349 行) 这里有个frame_buffer_,用于保存frame ------------
-> FrameBuffer::InsertFrame (modules\video_coding\frame_buffer2.cc 303 行)
-> ReceiveStatisticsProxy::OnCompleteFrame (video\receive_statistics_proxy.cc 806 行)
-> auto info = frames_.emplace(id, FrameInfo()).first; 从frames_ 添加 info ------------------------
-> FrameBuffer::UpdateFrameInfoWithIncomingFrame (modules\video_coding\frame_buffer2.cc 486 行)
-> info->second.frame = std::move(frame); 把frame 数据放入到 info 中 ------------------------
-> FrameBuffer::UpdatePlayoutDelays (modules\video_coding\frame_buffer2.cc 290 行)
-> RtpVideoStreamReceiver::FrameContinuous (video\rtp_video_stream_receiver.cc 479 行)
-> NackModule::ClearUpTo (modules\video_coding\nack_module.cc 117 行)
-> RtpFrameReferenceFinder::RetryStashedFrames (video\rtp_video_stream_receiver.cc 61 行)
->
->
->
->
->
->
-> 应该是到这里frame 已经放入到frame_buffer_ 中
-> fec_->DecodeFec (modules\rtp_rtcp\source\ulpfec_receiver_impl.cc 248 行)=>ForwardErrorCorrection::DecodeFec(modules\rtp_rtcp\source\forward_error_correction.cc 715 行)
->
->
-> rtp_receive_statistics_->IncomingPacket => ReceiveStatisticsImpl::IncomingPacket (video\rtp_video_stream_receiver.cc 251 行)
-> StreamStatisticianImpl::IncomingPacket (modules\rtp_rtcp\source\receive_statistics_impl.cc 53 行)
-> rtp_callback_->DataCountersUpdated => ReceiveStatisticsImpl::DataCountersUpdated (modules\rtp_rtcp\source\receive_statistics_impl.cc 426 行)
-> ReceiveStatisticsProxy::DataCountersUpdated (video\receive_statistics_proxy.cc 678 行)
-> RateTracker::AddSamples (rtc_base\ratetracker.cc 112 行)
-> rtcp_callback_->StatisticsUpdated => ReceiveStatisticsImpl::StatisticsUpdated (modules\rtp_rtcp\source\receive_statistics_impl.cc 405 行)
-> ReceiveStatisticsProxy::StatisticsUpdated (video\receive_statistics_proxy.cc 654 行)
->
->
->