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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString(); | 87 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString(); |
88 RTC_DCHECK_NE(config_.voe_channel_id, -1); | 88 RTC_DCHECK_NE(config_.voe_channel_id, -1); |
89 RTC_DCHECK(audio_state_.get()); | 89 RTC_DCHECK(audio_state_.get()); |
90 RTC_DCHECK(congestion_controller); | 90 RTC_DCHECK(congestion_controller); |
91 RTC_DCHECK(rtp_header_parser_); | 91 RTC_DCHECK(rtp_header_parser_); |
92 | 92 |
93 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); | 93 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
94 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); | 94 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); |
95 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); | 95 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); |
96 | 96 |
| 97 // TODO(ossu): This is where we'd like to set the decoder factory to |
| 98 // use. However, since it needs to be included when constructing Channel, we |
| 99 // cannot do that until we're able to move Channel ownership into the |
| 100 // Audio{Send,Receive}Streams. The best we can do is check that we're not |
| 101 // trying to use two different factories using the different interfaces. |
| 102 RTC_CHECK(config.decoder_factory); |
| 103 RTC_CHECK_EQ(config.decoder_factory, |
| 104 channel_proxy_->GetAudioDecoderFactory()); |
| 105 |
97 channel_proxy_->RegisterExternalTransport(config.rtcp_send_transport); | 106 channel_proxy_->RegisterExternalTransport(config.rtcp_send_transport); |
98 | 107 |
99 for (const auto& extension : config.rtp.extensions) { | 108 for (const auto& extension : config.rtp.extensions) { |
100 if (extension.uri == RtpExtension::kAudioLevelUri) { | 109 if (extension.uri == RtpExtension::kAudioLevelUri) { |
101 channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id); | 110 channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id); |
102 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( | 111 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( |
103 kRtpExtensionAudioLevel, extension.id); | 112 kRtpExtensionAudioLevel, extension.id); |
104 RTC_DCHECK(registered); | 113 RTC_DCHECK(registered); |
105 } else if (extension.uri == RtpExtension::kAbsSendTimeUri) { | 114 } else if (extension.uri == RtpExtension::kAbsSendTimeUri) { |
106 channel_proxy_->SetReceiveAbsoluteSenderTimeStatus(true, extension.id); | 115 channel_proxy_->SetReceiveAbsoluteSenderTimeStatus(true, extension.id); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 252 |
244 VoiceEngine* AudioReceiveStream::voice_engine() const { | 253 VoiceEngine* AudioReceiveStream::voice_engine() const { |
245 internal::AudioState* audio_state = | 254 internal::AudioState* audio_state = |
246 static_cast<internal::AudioState*>(audio_state_.get()); | 255 static_cast<internal::AudioState*>(audio_state_.get()); |
247 VoiceEngine* voice_engine = audio_state->voice_engine(); | 256 VoiceEngine* voice_engine = audio_state->voice_engine(); |
248 RTC_DCHECK(voice_engine); | 257 RTC_DCHECK(voice_engine); |
249 return voice_engine; | 258 return voice_engine; |
250 } | 259 } |
251 } // namespace internal | 260 } // namespace internal |
252 } // namespace webrtc | 261 } // namespace webrtc |
OLD | NEW |