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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 _RxVadDetection(false), | 820 _RxVadDetection(false), |
821 _rxAgcIsEnabled(false), | 821 _rxAgcIsEnabled(false), |
822 _rxNsIsEnabled(false), | 822 _rxNsIsEnabled(false), |
823 restored_packet_in_use_(false), | 823 restored_packet_in_use_(false), |
824 rtcp_observer_(new VoERtcpObserver(this)), | 824 rtcp_observer_(new VoERtcpObserver(this)), |
825 network_predictor_(new NetworkPredictor(Clock::GetRealTimeClock())), | 825 network_predictor_(new NetworkPredictor(Clock::GetRealTimeClock())), |
826 associate_send_channel_(ChannelOwner(nullptr)), | 826 associate_send_channel_(ChannelOwner(nullptr)), |
827 pacing_enabled_(config.Get<VoicePacing>().enabled), | 827 pacing_enabled_(config.Get<VoicePacing>().enabled), |
828 feedback_observer_proxy_(new TransportFeedbackProxy()), | 828 feedback_observer_proxy_(new TransportFeedbackProxy()), |
829 seq_num_allocator_proxy_(new TransportSequenceNumberProxy()), | 829 seq_num_allocator_proxy_(new TransportSequenceNumberProxy()), |
830 rtp_packet_sender_proxy_(new RtpPacketSenderProxy()) { | 830 rtp_packet_sender_proxy_(new RtpPacketSenderProxy()), |
| 831 decoder_factory_(decoder_factory) { |
831 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId, _channelId), | 832 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId, _channelId), |
832 "Channel::Channel() - ctor"); | 833 "Channel::Channel() - ctor"); |
833 AudioCodingModule::Config acm_config; | 834 AudioCodingModule::Config acm_config; |
834 acm_config.id = VoEModuleId(instanceId, channelId); | 835 acm_config.id = VoEModuleId(instanceId, channelId); |
835 if (config.Get<NetEqCapacityConfig>().enabled) { | 836 if (config.Get<NetEqCapacityConfig>().enabled) { |
836 // Clamping the buffer capacity at 20 packets. While going lower will | 837 // Clamping the buffer capacity at 20 packets. While going lower will |
837 // probably work, it makes little sense. | 838 // probably work, it makes little sense. |
838 acm_config.neteq_config.max_packets_in_buffer = | 839 acm_config.neteq_config.max_packets_in_buffer = |
839 std::max(20, config.Get<NetEqCapacityConfig>().capacity); | 840 std::max(20, config.Get<NetEqCapacityConfig>().capacity); |
840 } | 841 } |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 int32_t Channel::UpdateLocalTimeStamp() { | 1077 int32_t Channel::UpdateLocalTimeStamp() { |
1077 _timeStamp += static_cast<uint32_t>(_audioFrame.samples_per_channel_); | 1078 _timeStamp += static_cast<uint32_t>(_audioFrame.samples_per_channel_); |
1078 return 0; | 1079 return 0; |
1079 } | 1080 } |
1080 | 1081 |
1081 void Channel::SetSink(std::unique_ptr<AudioSinkInterface> sink) { | 1082 void Channel::SetSink(std::unique_ptr<AudioSinkInterface> sink) { |
1082 rtc::CritScope cs(&_callbackCritSect); | 1083 rtc::CritScope cs(&_callbackCritSect); |
1083 audio_sink_ = std::move(sink); | 1084 audio_sink_ = std::move(sink); |
1084 } | 1085 } |
1085 | 1086 |
| 1087 const rtc::scoped_refptr<AudioDecoderFactory>& |
| 1088 Channel::GetAudioDecoderFactory() const { |
| 1089 return decoder_factory_; |
| 1090 } |
| 1091 |
1086 int32_t Channel::StartPlayout() { | 1092 int32_t Channel::StartPlayout() { |
1087 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), | 1093 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), |
1088 "Channel::StartPlayout()"); | 1094 "Channel::StartPlayout()"); |
1089 if (channel_state_.Get().playing) { | 1095 if (channel_state_.Get().playing) { |
1090 return 0; | 1096 return 0; |
1091 } | 1097 } |
1092 | 1098 |
1093 if (!_externalMixing) { | 1099 if (!_externalMixing) { |
1094 // Add participant as candidates for mixing. | 1100 // Add participant as candidates for mixing. |
1095 if (_outputMixerPtr->SetMixabilityStatus(*this, true) != 0) { | 1101 if (_outputMixerPtr->SetMixabilityStatus(*this, true) != 0) { |
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3577 int64_t min_rtt = 0; | 3583 int64_t min_rtt = 0; |
3578 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3584 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3579 0) { | 3585 0) { |
3580 return 0; | 3586 return 0; |
3581 } | 3587 } |
3582 return rtt; | 3588 return rtt; |
3583 } | 3589 } |
3584 | 3590 |
3585 } // namespace voe | 3591 } // namespace voe |
3586 } // namespace webrtc | 3592 } // namespace webrtc |
OLD | NEW |