1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| webrtc::RtpTransport::DemuxPacket(rtc::CopyOnWriteBuffer * packet, __int64 packet_time_us) 行202 webrtc::RtpDemuxer::OnRtpPacket(const webrtc::RtpPacketReceived & packet) 行158 void BaseChannel::OnRtpPacket(const webrtc::RtpPacketReceived& parsed_packet) { media_channel_->OnPacketReceived( cricket::BaseChannel::OnPacketReceived(bool rtcp, const rtc::CopyOnWriteBuffer & packet, __int64 packet_time_us) 行506 void WebRtcVideoChannel::OnPacketReceived(rtc::CopyOnWriteBuffer packet, third_party/webrtc/media/engine/webrtc_video_engine.cc
反向分析: webrtc::PacketBuffer::InsertPacketList(std::list<webrtc::Packet,std::allocator<webrtc::Packet> > * packet_list, const webrtc::DecoderDatabase & decoder_database, absl::optional<unsigned char> * current_rtp_payload_type, absl::optional<unsigned char> * current_cng_rtp_payload_type, webrtc::StatisticsCalculator * stats) 行139 webrtc::NetEqImpl::InsertPacketInternal(const webrtc::RTPHeader & rtp_header, rtc::ArrayView<unsigned char const ,-4711> payload, unsigned int receive_timestamp) 行712 将数据加到packet_buffer_数据包队列中,待解码 webrtc::NetEqImpl::InsertPacket(const webrtc::RTPHeader & rtp_header, rtc::ArrayView<unsigned char const ,-4711> payload, unsigned int receive_timestamp) 行148 third_party/webrtc/modules/audio_coding/neteq/neteq_impl.cc webrtc::acm2::AcmReceiver::InsertPacket(const webrtc::WebRtcRTPHeader & rtp_header, rtc::ArrayView<unsigned char const ,-4711> incoming_payload) 行110 if (neteq_->InsertPacket(rtp_header, incoming_payload) < 0) {
webrtc::`anonymous namespace'::AudioCodingModuleImpl::IncomingPacket(const unsigned char * incoming_payload, const unsigned int payload_length, const webrtc::WebRtcRTPHeader & rtp_header) 行811 webrtc::voe::`anonymous namespace'::ChannelReceive::OnReceivedPayloadData(const unsigned char * payloadData, unsigned int payloadSize, const webrtc::WebRtcRTPHeader * rtpHeader) 行289 webrtc::voe::`anonymous namespace'::ChannelReceive::ReceivePacket(const unsigned char * packet, unsigned int packet_length, const webrtc::RTPHeader & header) 行675 third_party/webrtc/audio/channel_receive.cc webrtc::voe::`anonymous namespace'::ChannelReceive::OnRtpPacket(const webrtc::RtpPacketReceived & packet) 行624 webrtc::RtpDemuxer::OnRtpPacket(const webrtc::RtpPacketReceived & packet) 行158 bool RtpDemuxer::OnRtpPacket(const RtpPacketReceived& packet) { RtpPacketSinkInterface* sink = ResolveSink(packet); if (sink != nullptr) { sink->OnRtpPacket(packet); return true; } return false; } webrtc::RtpStreamReceiverController::OnRtpPacket(const webrtc::RtpPacketReceived & packet) 行54 webrtc::internal::Call::DeliverRtp(webrtc::MediaType media_type, rtc::CopyOnWriteBuffer packet, __int64 packet_time_us) 行1318 bool RtpStreamReceiverController::OnRtpPacket(const RtpPacketReceived& packet) { RTC_DCHECK_RUN_ON(&demuxer_sequence_); return demuxer_.OnRtpPacket(packet); } webrtc::internal::Call::DeliverPacket(webrtc::MediaType media_type, rtc::CopyOnWriteBuffer packet, __int64 packet_time_us) 行1356 cricket::WebRtcVoiceMediaChannel::OnPacketReceived(rtc::CopyOnWriteBuffer * packet, __int64 packet_time_us) 行2057
反向分析:进行解码: opus_decode(OpusDecoder * st, const unsigned char * data, int len, short * pcm, int frame_size, int decode_fec) 行766 DecodeNative(WebRtcOpusDecInst * inst, const unsigned char * encoded, unsigned int encoded_bytes, int frame_size, short * decoded, short * audio_type, int decode_fec) 行341 WebRtcOpus_Decode(WebRtcOpusDecInst * inst, const unsigned char * encoded, unsigned int encoded_bytes, short * decoded, short * audio_type) 行361 webrtc::AudioDecoderOpusImpl::DecodeInternal(const unsigned char * encoded, unsigned int encoded_len, int sample_rate_hz, short * decoded, webrtc::AudioDecoder::SpeechType * speech_type) 行126 webrtc::AudioDecoder::Decode(const unsigned char * encoded, unsigned int encoded_len, int sample_rate_hz, unsigned int max_decoded_bytes, short * decoded, webrtc::AudioDecoder::SpeechType * speech_type) 行98 webrtc::`anonymous namespace'::OpusFrame::Decode(rtc::ArrayView<short,-4711> decoded) 行54
webrtc::NetEqImpl::DecodeLoop(std::list<webrtc::Packet,std::allocator<webrtc::Packet> > * packet_list, const webrtc::Operations & operation, webrtc::AudioDecoder * decoder, int * decoded_length, webrtc::AudioDecoder::SpeechType * speech_type) 行1445 auto opt_result = packet_list->front().frame->Decode( webrtc::NetEqImpl::Decode(std::list<webrtc::Packet,std::allocator<webrtc::Packet> > * packet_list, webrtc::Operations * operation, int * decoded_length, webrtc::AudioDecoder::SpeechType * speech_type) 行1356 webrtc::NetEqImpl::GetAudioInternal(webrtc::AudioFrame * audio_frame, bool * muted, absl::optional<enum webrtc::Operations> action_override) 行846 从GetDecision拿到数据包进行解码 webrtc::NetEqImpl::GetAudio(webrtc::AudioFrame * audio_frame, bool * muted, absl::optional<enum webrtc::Operations> action_override) 行211 webrtc::acm2::AcmReceiver::GetAudio(int desired_freq_hz, webrtc::AudioFrame * audio_frame, bool * muted) 行127 webrtc::`anonymous namespace'::AudioCodingModuleImpl::PlayoutData10Ms(int desired_freq_hz, webrtc::AudioFrame * audio_frame, bool * muted) 行840 webrtc::voe::`anonymous namespace'::ChannelReceive::GetAudioFrameWithInfo(int sample_rate_hz, webrtc::AudioFrame * audio_frame) 行341
webrtc::AudioMixerImpl::GetAudioFromSources() 行190 webrtc::AudioMixerImpl::Mix(unsigned int number_of_channels, webrtc::AudioFrame * audio_frame_for_mixing) 行129 frame_combiner_.Combine(GetAudioFromSources(output_frequency), number_of_channels, output_frequency, number_of_streams, audio_frame_for_mixing); webrtc::AudioTransportImpl::NeedMorePlayData(const unsigned int nSamples, const unsigned int nBytesPerSample, const unsigned int nChannels, const unsigned int samplesPerSec, void * audioSamples, unsigned int & nSamplesOut, __int64 * elapsed_time_ms, __int64 * ntp_time_ms) 行214 webrtc::AudioDeviceBuffer::RequestPlayoutData(unsigned int samples_per_channel) 行304
webrtc::AudioDeviceWindowsCore::DoRenderThread() 行2976 webrtc::AudioDeviceWindowsCore::WSAPIRenderThread(void * context) 行2778 渲染音频数据线程,取音频数据包进行解码播放 对linux: AudioDeviceLinuxPulse::PlayThreadProcess() { third_party/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc
混音: 在audioMixerImpl: Mix: frame_combiner_.Combine(GetAudioFromSources(output_frequency), third_party/webrtc/modules/audio_mixer/frame_combiner.cc void FrameCombiner::Combine(rtc::ArrayView<AudioFrame* const> mix_list,
third_party/webrtc/modules/audio_mixer/audio_frame_manipulator.cc void RemixFrame(size_t target_number_of_channels, AudioFrame* frame) { mixer.Transform(frame);
third_party/webrtc/audio/utility/channel_mixer.cc void ChannelMixer::Transform(AudioFrame* frame) { 混音
|