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

转载注明出处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
时间: 2024-10-10 15:49:55

WebRTCDemo.apk代码走读(二):发送Call的相关文章

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

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

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

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

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代码走读(三):音频接收流程

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

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

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

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代码走读(一):初始化

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

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

转载注明出处http://blog.csdn.net/wanghorse 收到视频包 UdpSocketManagerPosixImpl::Run UdpSocketManagerPosixImpl::Process UdpSocketPosix::HasIncoming(recvfrom) UdpTransportImpl::IncomingRTPCallback UdpTransportImpl::IncomingRTPFunction VideoChannelTransport::Inco

Exphp代码走读(二)

App.class.php 1 <?php 2 namespace System\Core; 3 use System\Driver; 4 5 class App{ 6 public $DB; 7 public $Cache; 8 public $Session; 9 public $Controller; 10 11 public function __construct(){ 12 DBUG ? set_error_handler(array($this,'errorHandler')) :