| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 ss << ", sync_group: " << sync_group; | 75 ss << ", sync_group: " << sync_group; |
| 76 } | 76 } |
| 77 ss << '}'; | 77 ss << '}'; |
| 78 return ss.str(); | 78 return ss.str(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 namespace internal { | 81 namespace internal { |
| 82 AudioReceiveStream::AudioReceiveStream( | 82 AudioReceiveStream::AudioReceiveStream( |
| 83 CongestionController* congestion_controller, | 83 CongestionController* congestion_controller, |
| 84 const webrtc::AudioReceiveStream::Config& config, | 84 const webrtc::AudioReceiveStream::Config& config, |
| 85 const rtc::scoped_refptr<webrtc::AudioState>& audio_state) | 85 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, |
| 86 webrtc::RtcEventLog* event_log) |
| 86 : config_(config), | 87 : config_(config), |
| 87 audio_state_(audio_state), | 88 audio_state_(audio_state), |
| 88 rtp_header_parser_(RtpHeaderParser::Create()) { | 89 rtp_header_parser_(RtpHeaderParser::Create()) { |
| 89 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString(); | 90 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString(); |
| 90 RTC_DCHECK_NE(config_.voe_channel_id, -1); | 91 RTC_DCHECK_NE(config_.voe_channel_id, -1); |
| 91 RTC_DCHECK(audio_state_.get()); | 92 RTC_DCHECK(audio_state_.get()); |
| 92 RTC_DCHECK(congestion_controller); | 93 RTC_DCHECK(congestion_controller); |
| 93 RTC_DCHECK(rtp_header_parser_); | 94 RTC_DCHECK(rtp_header_parser_); |
| 94 | 95 |
| 95 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); | 96 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
| 96 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); | 97 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); |
| 98 channel_proxy_->SetRtcEventLog(event_log); |
| 97 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); | 99 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); |
| 98 for (const auto& extension : config.rtp.extensions) { | 100 for (const auto& extension : config.rtp.extensions) { |
| 99 if (extension.name == RtpExtension::kAudioLevel) { | 101 if (extension.name == RtpExtension::kAudioLevel) { |
| 100 channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id); | 102 channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id); |
| 101 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( | 103 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( |
| 102 kRtpExtensionAudioLevel, extension.id); | 104 kRtpExtensionAudioLevel, extension.id); |
| 103 RTC_DCHECK(registered); | 105 RTC_DCHECK(registered); |
| 104 } else if (extension.name == RtpExtension::kAbsSendTime) { | 106 } else if (extension.name == RtpExtension::kAbsSendTime) { |
| 105 channel_proxy_->SetReceiveAbsoluteSenderTimeStatus(true, extension.id); | 107 channel_proxy_->SetReceiveAbsoluteSenderTimeStatus(true, extension.id); |
| 106 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( | 108 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 242 |
| 241 VoiceEngine* AudioReceiveStream::voice_engine() const { | 243 VoiceEngine* AudioReceiveStream::voice_engine() const { |
| 242 internal::AudioState* audio_state = | 244 internal::AudioState* audio_state = |
| 243 static_cast<internal::AudioState*>(audio_state_.get()); | 245 static_cast<internal::AudioState*>(audio_state_.get()); |
| 244 VoiceEngine* voice_engine = audio_state->voice_engine(); | 246 VoiceEngine* voice_engine = audio_state->voice_engine(); |
| 245 RTC_DCHECK(voice_engine); | 247 RTC_DCHECK(voice_engine); |
| 246 return voice_engine; | 248 return voice_engine; |
| 247 } | 249 } |
| 248 } // namespace internal | 250 } // namespace internal |
| 249 } // namespace webrtc | 251 } // namespace webrtc |
| OLD | NEW |