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

转载注明出处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

时间: 2024-10-04 22:47:32

WebRTCDemo.apk代码走读(五):视频接受流程的相关文章

WebRTCDemo.apk代码走读(八):代码目录结构

转载注明出处http://blog.csdn.net/wanghorse ├── ./base //基础平台库,包括线程.锁.socket等 ├── ./build //编译脚本,gyp ├── ./common_audio //基础公共的音频处理 │ ├── ./common_audio/include //就一个类型转换头文件 │ ├── ./common_audio/resampler //音频重采样代码 │ ├── ./common_audio/signal_processing //音

WebRTCDemo.apk代码走读(六):视频发送流程

转载注明出处http://blog.csdn.net/wanghorse JNI调用 ProvideCameraFrame VideoCaptureAndroid::OnIncomingFrame VideoCaptureImpl::IncomingFrame 申请内存,转换层I420 VideoCaptureImpl::DeliverCapturedFrame 计算时间戳 ViECapturer::OnIncomingCapturedFrame OveruseFrameDetector::Fr

WebRTCDemo.apk代码走读(三):音频接收流程

收到音频包 UdpSocketManagerPosixImpl::Run UdpSocketManagerPosixImpl::Process UdpSocketPosix::HasIncoming(recvfrom) UdpTransportImpl::IncomingRTPCallback UdpTransportImpl::IncomingRTPFunction VoiceChannelTransport::IncomingRTPPacket VoENetworkImpl::Receive

WebRTCDemo.apk代码走读(四):音频发送流程

转载注明出处http://blog.csdn.net/wanghorse 发送音频 OpenSlesInput::RecorderSimpleBufferQueueCallback OpenSlesInput::RecorderSimpleBufferQueueCallbackHandler,保存数据 OpenSlesInput::CbThreadImpl AudioDeviceBuffer::SetRecordedBuffer, 复制数据 AudioDeviceBuffer::SetVQEDa

WebRTCDemo.apk代码走读(九):VoiceEngine和VideoEngine主要的控制类说明

转载注明出处http://blog.csdn.net/wanghorse 1. VideoEngineImpl VideoEngine对外提供的集成接口实现类, 其继承了VideoEngine对外提供的所有接口实现类,包括 ViEBaseImpl/ViECaptureImpl/ViEFileImpl/ViEImageProcessImpl/ViENetworkImpl/ViERTP_RTCPImpl/ViEExternalCodecImpl/VideoEngine 2. ViEBaseImpl

WebRTCDemo.apk代码走读(七):线程关系

转载注明出处http://blog.csdn.net/wanghorse webrtc实际的ProcessThreadImpl线程主要有: 1. VoiceChannelTransport下的CreateThread(UdpSocketManagerPosixImpl::Run), 用于收发网络包 2. AudioTrackJni::PlayThreadProcess,用于播放 3. OpenSlesInput下的SLAndroidSimpleBufferQueueItf的内部线程,主要是抓取音

WebRTCDemo.apk代码走读(二):发送Call

转载注明出处http://blog.csdn.net/wanghorse VoiceEngine_startListen VoEBaseImpl::StartReceive channelPtr->StartReceiving设置channel的receiving的状态 VoiceEngine_startPlayout VoEBaseImpl::StartPlayout VoEBaseImpl::StartPlayout--没有channelId,涉及到硬件,所以是唯一全局的 AudioDevi

WebRTCDemo.apk代码走读(一):初始化

MediaEngine.java:MediaEngine初始化 转载注明出处http://blog.csdn.net/wanghorse new VoiceEngine/VoiceEngine_create new VoiceEngineData webrtc::VoiceEngine::Create GetVoiceEngine new VoiceEngineImpl 初始化SharedData ProcessThread::CreateProcessThread OutputMixer::C

WebRTC代码走读(八):代码文件夹结构

转载注明出处http://blog.csdn.net/wanghorse ├── ./base //基础平台库,包含线程.锁.socket等 ├── ./build //编译脚本.gyp ├── ./common_audio //基础公共的音频处理 │ ├── ./common_audio/include //就一个类型转换头文件 │ ├── ./common_audio/resampler //音频重採样代码 │ ├── ./common_audio/signal_processing //音