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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 } else if (extension.name == RtpExtension::kTransportSequenceNumber) { | 110 } else if (extension.name == RtpExtension::kTransportSequenceNumber) { |
111 channel_proxy_->EnableReceiveTransportSequenceNumber(extension.id); | 111 channel_proxy_->EnableReceiveTransportSequenceNumber(extension.id); |
112 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( | 112 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( |
113 kRtpExtensionTransportSequenceNumber, extension.id); | 113 kRtpExtensionTransportSequenceNumber, extension.id); |
114 RTC_DCHECK(registered); | 114 RTC_DCHECK(registered); |
115 } else { | 115 } else { |
116 RTC_NOTREACHED() << "Unsupported RTP extension."; | 116 RTC_NOTREACHED() << "Unsupported RTP extension."; |
117 } | 117 } |
118 } | 118 } |
119 // Configure bandwidth estimation. | 119 // Configure bandwidth estimation. |
120 channel_proxy_->SetCongestionControlObjects( | 120 channel_proxy_->RegisterReceiverCongestionControlObjects( |
121 nullptr, nullptr, congestion_controller->packet_router()); | 121 congestion_controller->packet_router()); |
122 if (config.combined_audio_video_bwe) { | 122 if (config.combined_audio_video_bwe) { |
123 if (UseSendSideBwe(config)) { | 123 if (UseSendSideBwe(config)) { |
124 remote_bitrate_estimator_ = | 124 remote_bitrate_estimator_ = |
125 congestion_controller->GetRemoteBitrateEstimator(true); | 125 congestion_controller->GetRemoteBitrateEstimator(true); |
126 } else { | 126 } else { |
127 remote_bitrate_estimator_ = | 127 remote_bitrate_estimator_ = |
128 congestion_controller->GetRemoteBitrateEstimator(false); | 128 congestion_controller->GetRemoteBitrateEstimator(false); |
129 } | 129 } |
130 RTC_DCHECK(remote_bitrate_estimator_); | 130 RTC_DCHECK(remote_bitrate_estimator_); |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 AudioReceiveStream::~AudioReceiveStream() { | 134 AudioReceiveStream::~AudioReceiveStream() { |
135 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 135 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
136 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString(); | 136 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString(); |
137 channel_proxy_->SetCongestionControlObjects(nullptr, nullptr, nullptr); | 137 channel_proxy_->ResetCongestionControlObjects(); |
138 if (remote_bitrate_estimator_) { | 138 if (remote_bitrate_estimator_) { |
139 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc); | 139 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc); |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
143 void AudioReceiveStream::Start() { | 143 void AudioReceiveStream::Start() { |
144 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 144 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
145 } | 145 } |
146 | 146 |
147 void AudioReceiveStream::Stop() { | 147 void AudioReceiveStream::Stop() { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 VoiceEngine* AudioReceiveStream::voice_engine() const { | 249 VoiceEngine* AudioReceiveStream::voice_engine() const { |
250 internal::AudioState* audio_state = | 250 internal::AudioState* audio_state = |
251 static_cast<internal::AudioState*>(audio_state_.get()); | 251 static_cast<internal::AudioState*>(audio_state_.get()); |
252 VoiceEngine* voice_engine = audio_state->voice_engine(); | 252 VoiceEngine* voice_engine = audio_state->voice_engine(); |
253 RTC_DCHECK(voice_engine); | 253 RTC_DCHECK(voice_engine); |
254 return voice_engine; | 254 return voice_engine; |
255 } | 255 } |
256 } // namespace internal | 256 } // namespace internal |
257 } // namespace webrtc | 257 } // namespace webrtc |
OLD | NEW |