码迷,mamicode.com
首页 > Web开发 > 详细

WebRTCDemo.apk代码走读(五):视频接受流程

时间:2015-05-03 17:33:41      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:webrtc   视频   走读   流程   

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

收到视频包
UdpSocketManagerPosixImpl::Run
    UdpSocketManagerPosixImpl::Process
        UdpSocketPosix::HasIncoming(recvfrom)
            UdpTransportImpl::IncomingRTPCallback
                UdpTransportImpl::IncomingRTPFunction       
                    VideoChannelTransport::IncomingRTPPacket
                        ViENetworkImpl::ReceivedRTPPacket
                            ViEChannel::ReceivedRTPPacket
                                ViEReceiver::ReceivedRTPPacket
                                    ViEReceiver::InsertRTPPacket
                                        如果配置了抓包, 可以RtpDumpImpl::DumpPacket
                                        RtpHeaderParserImpl::Parse
                                            RtpHeaderParser::Parse
                                        ViEReceiver::ReceivePacket
                                            RtpReceiverImpl::IncomingRtpPacket
                                                ssrc、payroad等检查
                                                RTPReceiverVideo::ParseRtpPacket
                                                    ViEReceiver::OnReceivedPayloadData
                                                        VideoCodingModuleImpl::IncomingPacket
                                                            VideoReceiver::IncomingPacket
                                                                VCMReceiver::InsertPacket
                                                                    VCMJitterBuffer::InsertPacket
                                                                        VCMJitterBuffer::GetFrame, 完整frame/未完整frame/空frame
                                                                    VCMFrameBuffer::InsertPacket, 组桢
                                                                    如果完成, 插入可解码桢队列(decodable_frames_)
ViEChannel::ChannelDecodeProcess
    VideoCodingModuleImpl::Decode                               
        VideoReceiver::Decode
            VCMReceiver::FrameForDecoding
                VCMJitterBuffer::NextCompleteTimestamp,还未到render时间, 则等待
                VCMJitterBuffer::ExtractAndSetDecode, 取frame
            如果需要,抓图片?()
            VideoReceiver::Decode
                VCMGenericDecoder::Decode
                    VP8DecoderImpl::Decode
decode完成(VP8是同步的, 直接在Decode中调用)
    VCMDecodedFrameCallback::Decoded            
        ViEChannel::FrameToRender
            图片预处理
            ViEFrameProviderBase::DeliverFrame
                ViERenderer::DeliverFrame
                    IncomingVideoStream::RenderFrame, 复制frame,放入队列
IncomingVideoStream::IncomingVideoStreamThreadFun
    IncomingVideoStream::IncomingVideoStreamProcess                 
        AndroidNativeOpenGl2Channel::RenderFrame, 复制frame
VideoRenderAndroid::JavaRenderThreadProcess     
    AndroidNativeOpenGl2Channel::DeliverFrame       
        调用JAVA层函数
            AndroidNativeOpenGl2Channel::DrawNativeStatic
                VideoRenderOpenGles20::Render



WebRTCDemo.apk代码走读(五):视频接受流程

标签:webrtc   视频   走读   流程   

原文地址:http://blog.csdn.net/wanghorse/article/details/45459397

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!