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

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

时间:2015-03-28 17:20:02      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:

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

VoiceEngine_startListen
    VoEBaseImpl::StartReceive
        channelPtr->StartReceiving设置channel的receiving的状态
VoiceEngine_startPlayout
    VoEBaseImpl::StartPlayout
        VoEBaseImpl::StartPlayout--没有channelId,涉及到硬件,所以是唯一全局的
            AudioDeviceModuleImpl::InitPlayout      
                AudioDeviceTemplate::InitPlayout
                    OpenSlesOutput::InitPlayout,设置状态
            AudioDeviceModuleImpl::StartPlayout     
                AudioDeviceTemplate::StartPlayout
                    OpenSlesOutput::StartPlayout,创建硬件资源
        Channel::StartPlayout
            OutputMixer::SetMixabilityStatus                
                AudioConferenceMixerImpl::SetMixabilityStatus
                    AudioConferenceMixerImpl::AddParticipantToList加入到混音器中
VoiceEngine_startSend
    VoEBaseImpl::StartSend                      
        VoEBaseImpl::StartSend() --没有channelId,涉及到硬件,所以是唯一全局的
            AudioDeviceModuleImpl::StartRecording
                AudioDeviceTemplate::StartRecording
                    OpenSlesInput::StartRecording,创建硬件资源
            AudioDeviceModuleImpl::InitRecording
                AudioDeviceTemplate::InitRecording
                    OpenSlesInput::InitRecording,配置状态
        Channel::StartSend,设置状态
VideoEngine_addRenderer
    ViERenderImpl::AddRenderer
        ViERenderManager::AddRenderStream
            VideoRender::CreateVideoRender, VideoRender和上层的window一一对应
                new ModuleVideoRenderImpl       
                    new AndroidNativeOpenGl2Renderer
                    AndroidNativeOpenGl2Renderer::Init,和JNI环境关联起来
            加入到render_list,??可以有多个Render吗?
            ViERenderer::CreateViERenderer
                new ViERenderer
                    new ViEExternalRendererImpl,用于回调
                        new VideoFrame
                ViERenderer::Init       
                    ModuleVideoRenderImpl::AddIncomingRenderStream
                        VideoRenderAndroid::AddIncomingRenderStream
                            AndroidNativeOpenGl2Renderer::CreateAndroidRenderChannel
                                new AndroidNativeOpenGl2Channel
                                AndroidNativeOpenGl2Channel::Init, 
                                    和JINI环境关联起来
                                    注册两个Native函数,AndroidNativeOpenGl2Channel::DrawNativeStatic,AndroidNativeOpenGl2Channel::CreateOpenGLNativeStatic
                        streamId和AndroidStream(AndroidNativeOpenGl2Channel)一一对应,可以保存多个                          
                    new IncomingVideoStream
                        new VideoRenderFrames
                    IncomingVideoStream::SetRenderCallback初始化回调函数(AndroidNativeOpenGl2Channel)
                    IncomingVideoStream加入map中??可以有多个?
VideoEngine_startRender
    ViERenderer::StartRender
        ModuleVideoRenderImpl::StartRender                          
            IncomingVideoStream::Start
                ThreadWrapper::CreateThread,回调是IncomingVideoStream::IncomingVideoStreamProcess
                Thread启动
                EventPosix::StartTimer
            VideoRenderAndroid::StartRender
                ThreadWrapper::CreateThread,回调是VideoRenderAndroid::JavaRenderThreadProcess
                启动线程
VideoEngine_startReceive
    ViEBaseImpl::StartReceive
        ViEChannel::StartReceive
            ViEReceiver::StartReceive,设置状态
VideoEngine_getCaptureDevice
    ViECaptureImpl::GetCaptureDevice
        ViEInputManager::GetDeviceName
            VideoCaptureFactory::CreateDeviceInfo
                new videocapturemodule::DeviceInfoAndroid
                DeviceInfoAndroid::GetDeviceName
VideoEngine_allocateCaptureDevice
    ViECaptureImpl::AllocateCaptureDevice
        ViEInputManager::CreateCaptureDevice
            ViECapturer::CreateViECapture
                new ViECapturer
                    ThreadWrapper::CreateThread,回调函数ViECapturer::ViECaptureProcess
                    new OveruseFrameDetector
                ViECapturer::Init
                    VideoCaptureFactory::Create
                        VideoCaptureImpl::Create
                            new videocapturemodule::VideoCaptureAndroid
                    VideoCaptureAndroid::RegisterCaptureDataCallback注册回调函数ViECapturer
                    在线程中注册Module,videocapturemodule::VideoCaptureAndroid
            保存ID,可以有多个ViECapturer
VideoEngine_connectCaptureDevice
    ViECaptureImpl::ConnectCaptureDevice,链接摄像头和channle
        ViEFrameProviderBase::RegisterFrameCallback,可以有多个callback           
        ViECapturer::FrameCallbackChanged,将ViEEncoder作为回调类放到VieCapturer的回调list中
            VideoCaptureAndroid::CaptureSettings
            VideoCaptureAndroid::StopCapture
            VideoCaptureAndroid::StartCapture,配置JNI环境,获取摄像头参数   
VideoEngine_startCapture
    ViECaptureImpl::StartCapture
        ViECapturer::Start
            ViEFrameProviderBase::GetBestFormat获取最好的尺寸
                ViEEncoder::GetPreferedFrameSettings
            VideoCaptureAndroid::StartCapture,配置JNI环境,获取摄像头参数
VideoEngine_startSend
    ViEBaseImpl::StartSend
        ViEEncoder::Pause,设置状态
        ViEChannel::StartSend
            ModuleRtpRtcpImpl::SetSendingMediaStatus
                RTPSender::SetSendingMediaStatus设置状态为true
            ModuleRtpRtcpImpl::SetSendingStatus
                RTPSender::SetSendingStatus,初始化状态和RTP头
            还能有多个ModuleRtpRtcpImpl???
        ViEEncoder::SendKeyFrame
            VideoCodingModuleImpl::IntraFrameRequest
                VideoSender::IntraFrameRequest
                    VCMGenericEncoder::RequestFrame
                        VP8EncoderImpl::Encode

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

标签:

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

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