| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 capture_start_ntp_time_ms_ = | 705 capture_start_ntp_time_ms_ = |
| 706 audioFrame->ntp_time_ms_ - audioFrame->elapsed_time_ms_; | 706 audioFrame->ntp_time_ms_ - audioFrame->elapsed_time_ms_; |
| 707 } | 707 } |
| 708 } | 708 } |
| 709 } | 709 } |
| 710 | 710 |
| 711 return muted ? MixerParticipant::AudioFrameInfo::kMuted | 711 return muted ? MixerParticipant::AudioFrameInfo::kMuted |
| 712 : MixerParticipant::AudioFrameInfo::kNormal; | 712 : MixerParticipant::AudioFrameInfo::kNormal; |
| 713 } | 713 } |
| 714 | 714 |
| 715 AudioMixer::Source::AudioFrameWithInfo Channel::GetAudioFrameWithInfo( | 715 AudioMixer::Source::AudioFrameInfo Channel::GetAudioFrameWithInfo( |
| 716 int sample_rate_hz) { | 716 int sample_rate_hz, |
| 717 mix_audio_frame_.sample_rate_hz_ = sample_rate_hz; | 717 AudioFrame* audio_frame) { |
| 718 audio_frame->sample_rate_hz_ = sample_rate_hz; |
| 718 | 719 |
| 719 const auto frame_info = GetAudioFrameWithMuted(-1, &mix_audio_frame_); | 720 const auto frame_info = GetAudioFrameWithMuted(-1, audio_frame); |
| 720 | 721 |
| 721 using FrameInfo = AudioMixer::Source::AudioFrameInfo; | 722 using FrameInfo = AudioMixer::Source::AudioFrameInfo; |
| 722 FrameInfo new_audio_frame_info = FrameInfo::kError; | 723 FrameInfo new_audio_frame_info = FrameInfo::kError; |
| 723 switch (frame_info) { | 724 switch (frame_info) { |
| 724 case MixerParticipant::AudioFrameInfo::kNormal: | 725 case MixerParticipant::AudioFrameInfo::kNormal: |
| 725 new_audio_frame_info = FrameInfo::kNormal; | 726 new_audio_frame_info = FrameInfo::kNormal; |
| 726 break; | 727 break; |
| 727 case MixerParticipant::AudioFrameInfo::kMuted: | 728 case MixerParticipant::AudioFrameInfo::kMuted: |
| 728 new_audio_frame_info = FrameInfo::kMuted; | 729 new_audio_frame_info = FrameInfo::kMuted; |
| 729 break; | 730 break; |
| 730 case MixerParticipant::AudioFrameInfo::kError: | 731 case MixerParticipant::AudioFrameInfo::kError: |
| 731 new_audio_frame_info = FrameInfo::kError; | 732 new_audio_frame_info = FrameInfo::kError; |
| 732 break; | 733 break; |
| 733 } | 734 } |
| 734 return {&mix_audio_frame_, new_audio_frame_info}; | 735 return new_audio_frame_info; |
| 735 } | 736 } |
| 736 | 737 |
| 737 int32_t Channel::NeededFrequency(int32_t id) const { | 738 int32_t Channel::NeededFrequency(int32_t id) const { |
| 738 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId), | 739 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId), |
| 739 "Channel::NeededFrequency(id=%d)", id); | 740 "Channel::NeededFrequency(id=%d)", id); |
| 740 | 741 |
| 741 int highestNeeded = 0; | 742 int highestNeeded = 0; |
| 742 | 743 |
| 743 // Determine highest needed receive frequency | 744 // Determine highest needed receive frequency |
| 744 int32_t receiveFrequency = audio_coding_->ReceiveFrequency(); | 745 int32_t receiveFrequency = audio_coding_->ReceiveFrequency(); |
| (...skipping 2521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3266 int64_t min_rtt = 0; | 3267 int64_t min_rtt = 0; |
| 3267 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3268 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
| 3268 0) { | 3269 0) { |
| 3269 return 0; | 3270 return 0; |
| 3270 } | 3271 } |
| 3271 return rtt; | 3272 return rtt; |
| 3272 } | 3273 } |
| 3273 | 3274 |
| 3274 } // namespace voe | 3275 } // namespace voe |
| 3275 } // namespace webrtc | 3276 } // namespace webrtc |
| OLD | NEW |