| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 channel_proxy_->DeRegisterExternalTransport(); | 147 channel_proxy_->DeRegisterExternalTransport(); |
| 148 channel_proxy_->ResetCongestionControlObjects(); | 148 channel_proxy_->ResetCongestionControlObjects(); |
| 149 channel_proxy_->SetRtcEventLog(nullptr); | 149 channel_proxy_->SetRtcEventLog(nullptr); |
| 150 if (remote_bitrate_estimator_) { | 150 if (remote_bitrate_estimator_) { |
| 151 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc); | 151 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc); |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 void AudioReceiveStream::Start() { | 155 void AudioReceiveStream::Start() { |
| 156 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 156 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 157 ScopedVoEInterface<VoEBase> base(voice_engine()); |
| 158 int error = base->StartPlayout(config_.voe_channel_id); |
| 159 if (error != 0) { |
| 160 LOG(LS_ERROR) << "AudioReceiveStream::Start failed with error: " << error; |
| 161 } |
| 157 } | 162 } |
| 158 | 163 |
| 159 void AudioReceiveStream::Stop() { | 164 void AudioReceiveStream::Stop() { |
| 160 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 165 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 166 ScopedVoEInterface<VoEBase> base(voice_engine()); |
| 167 base->StopPlayout(config_.voe_channel_id); |
| 161 } | 168 } |
| 162 | 169 |
| 163 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { | 170 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { |
| 164 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 171 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 165 webrtc::AudioReceiveStream::Stats stats; | 172 webrtc::AudioReceiveStream::Stats stats; |
| 166 stats.remote_ssrc = config_.rtp.remote_ssrc; | 173 stats.remote_ssrc = config_.rtp.remote_ssrc; |
| 167 ScopedVoEInterface<VoECodec> codec(voice_engine()); | 174 ScopedVoEInterface<VoECodec> codec(voice_engine()); |
| 168 | 175 |
| 169 webrtc::CallStatistics call_stats = channel_proxy_->GetRTCPStatistics(); | 176 webrtc::CallStatistics call_stats = channel_proxy_->GetRTCPStatistics(); |
| 170 webrtc::CodecInst codec_inst = {0}; | 177 webrtc::CodecInst codec_inst = {0}; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 272 |
| 266 VoiceEngine* AudioReceiveStream::voice_engine() const { | 273 VoiceEngine* AudioReceiveStream::voice_engine() const { |
| 267 internal::AudioState* audio_state = | 274 internal::AudioState* audio_state = |
| 268 static_cast<internal::AudioState*>(audio_state_.get()); | 275 static_cast<internal::AudioState*>(audio_state_.get()); |
| 269 VoiceEngine* voice_engine = audio_state->voice_engine(); | 276 VoiceEngine* voice_engine = audio_state->voice_engine(); |
| 270 RTC_DCHECK(voice_engine); | 277 RTC_DCHECK(voice_engine); |
| 271 return voice_engine; | 278 return voice_engine; |
| 272 } | 279 } |
| 273 } // namespace internal | 280 } // namespace internal |
| 274 } // namespace webrtc | 281 } // namespace webrtc |
| OLD | NEW |