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( |
| 716 int sample_rate_hz) { |
| 717 mix_audio_frame_.sample_rate_hz_ = sample_rate_hz; |
| 718 |
| 719 const auto frame_info = GetAudioFrameWithMuted(-1, &mix_audio_frame_); |
| 720 |
| 721 using FrameInfo = AudioMixer::Source::AudioFrameInfo; |
| 722 FrameInfo new_audio_frame_info = FrameInfo::kError; |
| 723 switch (frame_info) { |
| 724 case MixerParticipant::AudioFrameInfo::kNormal: |
| 725 new_audio_frame_info = FrameInfo::kNormal; |
| 726 break; |
| 727 case MixerParticipant::AudioFrameInfo::kMuted: |
| 728 new_audio_frame_info = FrameInfo::kMuted; |
| 729 break; |
| 730 case MixerParticipant::AudioFrameInfo::kError: |
| 731 new_audio_frame_info = FrameInfo::kError; |
| 732 break; |
| 733 } |
| 734 return {&mix_audio_frame_, new_audio_frame_info}; |
| 735 } |
| 736 |
715 int32_t Channel::NeededFrequency(int32_t id) const { | 737 int32_t Channel::NeededFrequency(int32_t id) const { |
716 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId), | 738 WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId), |
717 "Channel::NeededFrequency(id=%d)", id); | 739 "Channel::NeededFrequency(id=%d)", id); |
718 | 740 |
719 int highestNeeded = 0; | 741 int highestNeeded = 0; |
720 | 742 |
721 // Determine highest needed receive frequency | 743 // Determine highest needed receive frequency |
722 int32_t receiveFrequency = audio_coding_->ReceiveFrequency(); | 744 int32_t receiveFrequency = audio_coding_->ReceiveFrequency(); |
723 | 745 |
724 // Return the bigger of playout and receive frequency in the ACM. | 746 // Return the bigger of playout and receive frequency in the ACM. |
(...skipping 2519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3244 int64_t min_rtt = 0; | 3266 int64_t min_rtt = 0; |
3245 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3267 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3246 0) { | 3268 0) { |
3247 return 0; | 3269 return 0; |
3248 } | 3270 } |
3249 return rtt; | 3271 return rtt; |
3250 } | 3272 } |
3251 | 3273 |
3252 } // namespace voe | 3274 } // namespace voe |
3253 } // namespace webrtc | 3275 } // namespace webrtc |
OLD | NEW |