| 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 capture_start_ntp_time_ms_ = | 732 capture_start_ntp_time_ms_ = |
| 733 audioFrame->ntp_time_ms_ - audioFrame->elapsed_time_ms_; | 733 audioFrame->ntp_time_ms_ - audioFrame->elapsed_time_ms_; |
| 734 } | 734 } |
| 735 } | 735 } |
| 736 } | 736 } |
| 737 | 737 |
| 738 return muted ? MixerParticipant::AudioFrameInfo::kMuted | 738 return muted ? MixerParticipant::AudioFrameInfo::kMuted |
| 739 : MixerParticipant::AudioFrameInfo::kNormal; | 739 : MixerParticipant::AudioFrameInfo::kNormal; |
| 740 } | 740 } |
| 741 | 741 |
| 742 AudioMixer::Source::AudioFrameWithInfo Channel::GetAudioFrameWithInfo( |
| 743 int sample_rate_hz) { |
| 744 mix_audio_frame_.sample_rate_hz_ = sample_rate_hz; |
| 745 |
| 746 const auto frame_info = GetAudioFrameWithMuted(-1, &mix_audio_frame_); |
| 747 |
| 748 using FrameInfo = AudioMixer::Source::AudioFrameInfo; |
| 749 FrameInfo new_audio_frame_info = FrameInfo::kError; |
| 750 switch (frame_info) { |
| 751 case MixerParticipant::AudioFrameInfo::kNormal: |
| 752 new_audio_frame_info = FrameInfo::kNormal; |
| 753 break; |
| 754 case MixerParticipant::AudioFrameInfo::kMuted: |
| 755 new_audio_frame_info = FrameInfo::kMuted; |
| 756 break; |
| 757 case MixerParticipant::AudioFrameInfo::kError: |
| 758 new_audio_frame_info = FrameInfo::kError; |
| 759 break; |
| 760 } |
| 761 return {&mix_audio_frame_, new_audio_frame_info}; |
| 762 } |
| 763 |
| 742 int32_t Channel::NeededFrequency(int32_t id) const { | 764 int32_t Channel::NeededFrequency(int32_t id) const { |
| 743 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId), | 765 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId), |
| 744 "Channel::NeededFrequency(id=%d)", id); | 766 "Channel::NeededFrequency(id=%d)", id); |
| 745 | 767 |
| 746 int highestNeeded = 0; | 768 int highestNeeded = 0; |
| 747 | 769 |
| 748 // Determine highest needed receive frequency | 770 // Determine highest needed receive frequency |
| 749 int32_t receiveFrequency = audio_coding_->ReceiveFrequency(); | 771 int32_t receiveFrequency = audio_coding_->ReceiveFrequency(); |
| 750 | 772 |
| 751 // Return the bigger of playout and receive frequency in the ACM. | 773 // Return the bigger of playout and receive frequency in the ACM. |
| (...skipping 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3287 int64_t min_rtt = 0; | 3309 int64_t min_rtt = 0; |
| 3288 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3310 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
| 3289 0) { | 3311 0) { |
| 3290 return 0; | 3312 return 0; |
| 3291 } | 3313 } |
| 3292 return rtt; | 3314 return rtt; |
| 3293 } | 3315 } |
| 3294 | 3316 |
| 3295 } // namespace voe | 3317 } // namespace voe |
| 3296 } // namespace webrtc | 3318 } // namespace webrtc |
| OLD | NEW |