 Chromium Code Reviews
 Chromium Code Reviews Issue 2206223002:
  Removed calls to VoE::SetPlayout() from WebRTCVoiceEngine.  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@master
    
  
    Issue 2206223002:
  Removed calls to VoE::SetPlayout() from WebRTCVoiceEngine.  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@master| 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 } | |
| 
aleloi
2016/08/03 13:09:58
Similar to AudioSendStream::Start/Stop
 | |
| 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 int error = base->StopPlayout(config_.voe_channel_id); | |
| 168 if (error != 0) { | |
| 169 LOG(LS_ERROR) << "AudioReceiveStream::Start failed with error: " << error; | |
| 170 } | |
| 161 } | 171 } | 
| 162 | 172 | 
| 163 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { | 173 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { | 
| 164 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 174 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 
| 165 webrtc::AudioReceiveStream::Stats stats; | 175 webrtc::AudioReceiveStream::Stats stats; | 
| 166 stats.remote_ssrc = config_.rtp.remote_ssrc; | 176 stats.remote_ssrc = config_.rtp.remote_ssrc; | 
| 167 ScopedVoEInterface<VoECodec> codec(voice_engine()); | 177 ScopedVoEInterface<VoECodec> codec(voice_engine()); | 
| 168 | 178 | 
| 169 webrtc::CallStatistics call_stats = channel_proxy_->GetRTCPStatistics(); | 179 webrtc::CallStatistics call_stats = channel_proxy_->GetRTCPStatistics(); | 
| 170 webrtc::CodecInst codec_inst = {0}; | 180 webrtc::CodecInst codec_inst = {0}; | 
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 | 275 | 
| 266 VoiceEngine* AudioReceiveStream::voice_engine() const { | 276 VoiceEngine* AudioReceiveStream::voice_engine() const { | 
| 267 internal::AudioState* audio_state = | 277 internal::AudioState* audio_state = | 
| 268 static_cast<internal::AudioState*>(audio_state_.get()); | 278 static_cast<internal::AudioState*>(audio_state_.get()); | 
| 269 VoiceEngine* voice_engine = audio_state->voice_engine(); | 279 VoiceEngine* voice_engine = audio_state->voice_engine(); | 
| 270 RTC_DCHECK(voice_engine); | 280 RTC_DCHECK(voice_engine); | 
| 271 return voice_engine; | 281 return voice_engine; | 
| 272 } | 282 } | 
| 273 } // namespace internal | 283 } // namespace internal | 
| 274 } // namespace webrtc | 284 } // namespace webrtc | 
| OLD | NEW |