WebRTC代码走读(六):视频发送流程

转载注明出处http://blog.csdn.net/wanghorse

JNI调用
ProvideCameraFrame
    VideoCaptureAndroid::OnIncomingFrame
        VideoCaptureImpl::IncomingFrame
            申请内存,转换层I420
            VideoCaptureImpl::DeliverCapturedFrame
                计算时间戳
                ViECapturer::OnIncomingCapturedFrame
                    OveruseFrameDetector::FrameCaptured
                    复制frame,为什么???
ViECapturer::ViECaptureProcess
    ViECapturer::DeliverI420Frame
        ViEFrameProviderBase::DeliverFrame
            遍历所有注册的观察着
            ViEEncoder::DeliverFrame            
                encode之前的预处理(回调处理)      
                VideoCodingModuleImpl::AddVideoFrame
                    VideoSender::AddVideoFrame
                        VCMGenericEncoder::Encode
                            VP8EncoderImpl::Encode
                                编码
                                VP8EncoderImpl::GetEncodedPartitions
                                    EncodedImageCallbackWrapper::Encoded
                                        VCMEncodedFrameCallback::Encoded
                                            ViEEncoder::SendData
                                                ModuleRtpRtcpImpl::SendOutgoingData
                                                    RTPSender::SendOutgoingData
                                                        RTPSenderVideo::SendVideo
                                                            RTPSenderVideo::Send
                                                                拆包,RTP组包
                                                                RTPSenderVideo::SendVideoPacket
                                                                    RTPSender::SendToNetwork
                                                                    FEC

你可能感兴趣的:(WebRTC)