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

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

发送音频
OpenSlesInput::RecorderSimpleBufferQueueCallback
    OpenSlesInput::RecorderSimpleBufferQueueCallbackHandler,保存数据
OpenSlesInput::CbThreadImpl
    AudioDeviceBuffer::SetRecordedBuffer, 复制数据
    AudioDeviceBuffer::SetVQEData
    AudioDeviceBuffer::DeliverRecordedData
        VoEBaseImpl::RecordedDataIsAvailable
            VoEBaseImpl::ProcessRecordedDataWithAPM
                AudioDeviceModuleImpl::MaxMicrophoneVolume
                    AudioDeviceTemplate::MaxMicrophoneVolume
                TransmitMixer::PrepareDemux
                    TransmitMixer::GenerateAudioFrame
                        DownConvertToCodecFormat, 单双转换,重采样
                            PushResampler<T>::Resample
                    TransmitMixer::ProcessAudio,agc、aec、anc
                        AudioProcessingImpl::ProcessStream
                            AudioBuffer::DeinterleaveFrom
                            AudioProcessingImpl::ProcessStreamLocked
                            AudioBuffer::InterleaveTo
                TransmitMixer::DemuxAndMix
                    Channel::Demultiplex 复制数据
                    Channel::PrepareEncodeAndSend, 一些处理,比如添加dtmf
                TransmitMixer::EncodeAndSend()
                    Channel::EncodeAndSend
                        AudioCodingModuleImpl::Add10MsData
                            AudioCodingModuleImpl::PreprocessToAddData 存储数据
                        AudioCodingModuleImpl::Process
                            AudioCodingModuleImpl::ProcessSingleStream
                                ACMGenericCodec::Encode
                                    ACMISAC::InternalEncode
                                Channel::SendData
                                    ModuleRtpRtcpImpl::SendOutgoingData
                                        RTPSender::SendOutgoingData
                                            RTPSenderAudio::SendAudio
                                                RTPSender::BuildRTPheader
                                                    RTPSender::CreateRtpHeader
                                                RTPSender::SendToNetwork
                                                    统计
                                                    RTPSender::SendPacketToNetwork
                                                        Channel::SendPacket
                                                            UdpTransportImpl::SendPacket
时间: 2024-10-21 17:19:49

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 webrtc实际的ProcessThreadImpl线程主要有: 1. VoiceChannelTransport下的CreateThread(UdpSocketManagerPosixImpl::Run), 用于收发网络包 2. AudioTrackJni::PlayThreadProcess,用于播放 3. OpenSlesInput下的SLAndroidSimpleBufferQueueItf的内部线程,主要是抓取音

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

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

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

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

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代码走读(五):视频接受流程

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

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

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

twemproxy发送流程探索——剖析twemproxy代码正编

本文想要完成对twemproxy发送流程--msg_send的探索,对于twemproxy发送流程的数据结构已经在<twemproxy接收流程探索--剖析twemproxy代码正编>介绍过了,msg_send和msg_recv的流程大致类似.请在阅读代码时,查看注释,英文注释是作者对它的代码的注解,中文注释是我自己的感悟. 函数msg_send 1 rstatus_t 2 msg_send(struct context *ctx, struct conn *conn) 3 { 4 rstatu