Reprint Annotated Source Http://blog.csdn.net/wanghorse
Voiceengine_startlisten Voebaseimpl:: StartreceiveChannelptr -Startreceiving setting the receiving state of the channel Voiceengine_startplayout Voebaseimpl:: StartplayoutVoebaseimpl:: Startplayout--No channelid, hardware involved, so it's the only global Audiodevicemoduleimpl:: InitplayoutAudiodevicetemplate:: InitplayoutOpenslesoutput:: Initplayout, set the status Audiodevicemoduleimpl:: StartplayoutAudiodevicetemplate:: StartplayoutOpenslesoutput:: Startplayout, create a hardware resource Channel:: StartplayoutOutputmixer:: SetmixabilitystatusAudioconferencemixerimpl:: SetmixabilitystatusAudioconferencemixerimpl:: AddparticipanttolistAdded to the mixer voiceengine_startsend Voebaseimpl:: StartsendVoebaseimpl:: Startsend()--No channelid, hardware involved, so it's the only global Audiodevicemoduleimpl:: startrecordingAudiodevicetemplate:: startrecordingOpenslesinput:: startrecording, create a hardware resource Audiodevicemoduleimpl:: initrecordingAudiodevicetemplate:: initrecordingOpenslesinput:: initrecording, configure status Channel:: Startsend, set the status Videoengine_addrenderer Vierenderimpl:: AddrendererVierendermanager:: AddrenderstreamVideorender:: Createvideorender, the Videorender and the upper window one by one correspondNewModulevideorenderimplNewAndroidnativeopengl2renderer Androidnativeopengl2renderer:: Init, associated with the JNI environment and added to the render_list,??Can I have more than one render? Vierenderer:: Createvierenderer NewVierendererNewVieexternalrendererimpl, for callbacksNewVideoframe Vierenderer:: InitModulevideorenderimpl:: AddincomingrenderstreamVideorenderandroid:: AddincomingrenderstreamAndroidnativeopengl2renderer:: Createandroidrenderchannel NewAndroidnativeopengl2channel Androidnativeopengl2channel:: Init, and the Jini environment is associated with registering two native functions, Androidnativeopengl2chan Nel::D rawnativestatic, Androidnativeopengl2channel:: CreateopenglnativestaticStreamid and Androidstream (Androidnativeopengl2channel) One by one, you can save multipleNewIncomingvideostreamNewVideorenderframes Incomingvideostream:: SetrendercallbackInitialize callback function (Androidnativeopengl2channel) Incomingvideostream JoinMapIn?? Can there be more than one? Videoengine_startrender Vierenderer:: StartrenderModulevideorenderimpl:: StartrenderIncomingvideostream:: StartThreadwrapper:: CreateThread, the callback is Incomingvideostream:: Incomingvideostreamprocess ThreadStart Eventposix:: StarttimerVideorenderandroid:: StartrenderThreadwrapper:: CreateThread, the callback is videorenderandroid:: JavarenderthreadprocessStart Thread videoengine_startreceive Viebaseimpl:: StartreceiveViechannel:: StartreceiveViereceiver:: Startreceive, set the status Videoengine_getcapturedevice Viecaptureimpl:: GetcapturedeviceVieinputmanager:: GetdevicenameVideocapturefactory:: Createdeviceinfo NewVideocapturemodule::D eviceinfoandroidDeviceinfoandroid:: GetdevicenameVideoengine_allocatecapturedevice Viecaptureimpl:: AllocatecapturedeviceVieinputmanager:: CreatecapturedeviceViecapturer:: Createviecapture NewViecapturer Threadwrapper:: CreateThread, the callback function viecapturer:: Viecaptureprocess NewOveruseframedetector Viecapturer:: InitVideocapturefactory:: CreateVideocaptureimpl:: Create NewVideocapturemodule:: VideocaptureandroidVideocaptureandroid:: RegistercapturedatacallbackRegister callback function Viecapturer Register in thread Module,videocapturemodule:: VideocaptureandroidSave ID, can have multiple Viecapturervideoengine_connectcapturedevice Viecaptureimpl:: Connectcapturedevice, link camera and Channle vieframeproviderbase:: Registerframecallback, you can have multiple callback Viecapturer:: framecallbackchanged, put Vieencoder as the callback class to the Viecapturer callbackListZhong Videocaptureandroid:: CapturesettingsVideocaptureandroid:: StopcaptureVideocaptureandroid:: Startcapture, configure the JNI environment, get camera parameters videoengine_startcapture Viecaptureimpl:: StartcaptureViecapturer:: StartVieframeproviderbase:: GetbestformatGet the best size Vieencoder:: GetpreferedframesettingsVideocaptureandroid:: Startcapture, configure the JNI environment, get camera parameters videoengine_startsend Viebaseimpl:: StartsendVieencoder::P ause, set the status Viechannel:: StartsendModulertprtcpimpl:: SetsendingmediastatusRtpsender:: SetsendingmediastatusSet the status totrueModulertprtcpimpl:: SetsendingstatusRtpsender:: Setsendingstatus, initialization state and RTP header can also have multiple Modulertprtcpimpl??? Vieencoder:: SendkeyframeVideocodingmoduleimpl:: IntraframerequestVideosender:: IntraframerequestVcmgenericencoder:: RequestframeVp8encoderimpl:: Encode
WEBRTCDEMO.APK Code of the daytime (ii): Send call