WebRTC录音【转】
来源:互联网 发布:国家要打仗了知乎 编辑:程序博客网 时间:2024/06/04 18:02
录音流程:AudioDeviceLinuxPulse::RecThreadProcess()负责采集音频数据,传递到AudioDeviceBuffer中缓存,AudioDeviceBuffer则将数据送入TransmixMixer,首先交给AudioProcess进行近端音频处理,完成后分发到各个Channel中,Channel则通过AudioCodingModule进行编码,编码后再交付到RtpRtcp中经由RTPSender发送出去。
AudioDeviceLinuxPulse::RecThreadProcessAudioDeviceLinuxPulse::ProcessRecordedDataAudioDeviceLinuxPulse::ReadRecordedData // Provide data to VoiceEngine if (ProcessRecordedData(_recBuffer, numRecSamples, recDelay) == -1) { // We have stopped recording return -1; } AudioDeviceBuffer::DeliverRecordedDataVoEBaseImpl::RecordedDataIsAvailableVoEBaseImpl::ProcessRecordedDataWithAPMVoEBaseImpl::ProcessRecordedDataWithAPMTransmitMixer::PrepareDemuxTransmitMixer::GenerateAudioFrameVoEBaseImpl::ProcessRecordedDataWithAPMTransmitMixer::DemuxAndMixChannel::DemultiplexChannel::PrepareEncodeAndSendTransmitMixer::EncodeAndSendChannel::EncodeAndSend{... // The ACM resamples internally. _audioFrame.timestamp_ = _timeStamp; if (audio_coding_->Add10MsData((AudioFrame&)_audioFrame) != 0) { WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId,_channelId), "Channel::EncodeAndSend() ACM encoding failed"); return -1; } return audio_coding_->Process();...}AudioCodingModuleImpl::Add10MsData AudioCodingModuleImpl::PreprocessToAddDataACMGenericCodec::Add10MsDataReason: ACMGenericCodec* codecs_[ACMCodecDB::kMaxNumCodecs] if (codecs_[current_send_codec_idx_]->Add10MsData( ptr_frame->timestamp_, ptr_audio, ptr_frame->samples_per_channel_, send_codec_inst_.channels) < 0) return -1;int32_t ACMGenericCodec::Add10MsData(const uint32_t timestamp, const int16_t* data, const uint16_t length_smpl, const uint8_t audio_channel) { WriteLockScoped wl(codec_wrapper_lock_); return Add10MsDataSafe(timestamp, data, length_smpl, audio_channel);}ACMGenericCodec::Add10MsDataSafeaudio_coding_->Process();AudioCodingModuleImpl::Process()AudioCodingModuleImpl::ProcessSingleStream(){... status = codecs_[current_send_codec_idx_]->Encode(stream, &length_bytes, &rtp_timestamp, &encoding_type);...}ACMGenericCodec::Encode AudioCodingModuleImpl::ProcessSingleStream Channel::SendDataModuleRtpRtcpImpl::SendOutgoingDataRTPSender::SendOutgoingDataRTPSender::BuildRTPheaderRTPSender::SendToNetworkChannel::SendPacketBaseChannel::SendPacketP2PTransportChannel::SendPacketAsyncUDPSocket::SendToPhysicalSocket: Sendto来自:http://blog.csdn.net/u014338577/article/details/45825381
0 0
- WebRTC录音【转】
- WEBRTC 录音与会议录音【转】
- WebRTC录音
- WEBRTC 录音与会议录音
- WEBRTC 录音与会议录音
- WEBRTC 录音与会议录音
- WebRTC录音(1)-实现通话双向录音
- WebRTC学习之三:录音和播放
- 录音
- 录音
- 录音
- 录音
- 录音
- 录音
- 录音
- 录音
- 录音
- 录音
- JavaWeb---数据分页
- 统计序列中出现一次的数字
- cocos2d-lua 手游之RichText的改写
- Andriod 测试 步骤流程
- 降低Java垃圾回收开销的5条建议
- WebRTC录音【转】
- 第一次玩CSDN,专业计算机,学习java,有兴趣的朋友可以加我。
- c语言基本常识1(知识点)
- 【牛客网】数组中只出现一次的数字
- 【深入理解java集合系列】LinkedHashMap实现原理
- 高效的HPPC java库
- 系统拆分解耦利器之消息队列---RabbitMQ-Helloworld
- redis基本命令2
- 使用JMeter创建FTP测试计划