Chromium Code Reviews| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 int sample_rate_hz, | 305 int sample_rate_hz, |
| 306 AudioFrame* audio_frame) { | 306 AudioFrame* audio_frame) { |
| 307 return channel_proxy_->GetAudioFrameWithInfo(sample_rate_hz, audio_frame); | 307 return channel_proxy_->GetAudioFrameWithInfo(sample_rate_hz, audio_frame); |
| 308 } | 308 } |
| 309 | 309 |
| 310 int AudioReceiveStream::PreferredSampleRate() const { | 310 int AudioReceiveStream::PreferredSampleRate() const { |
| 311 return channel_proxy_->NeededFrequency(); | 311 return channel_proxy_->NeededFrequency(); |
| 312 } | 312 } |
| 313 | 313 |
| 314 int AudioReceiveStream::Ssrc() const { | 314 int AudioReceiveStream::Ssrc() const { |
| 315 return config_.rtp.local_ssrc; | 315 return config_.rtp.remote_ssrc; |
|
aleloi
2016/12/05 14:03:08
Thanks, I think it is correct now.
| |
| 316 } | 316 } |
| 317 | 317 |
| 318 internal::AudioState* AudioReceiveStream::audio_state() const { | 318 internal::AudioState* AudioReceiveStream::audio_state() const { |
| 319 auto* audio_state = static_cast<internal::AudioState*>(audio_state_.get()); | 319 auto* audio_state = static_cast<internal::AudioState*>(audio_state_.get()); |
| 320 RTC_DCHECK(audio_state); | 320 RTC_DCHECK(audio_state); |
| 321 return audio_state; | 321 return audio_state; |
| 322 } | 322 } |
| 323 | 323 |
| 324 VoiceEngine* AudioReceiveStream::voice_engine() const { | 324 VoiceEngine* AudioReceiveStream::voice_engine() const { |
| 325 auto* voice_engine = audio_state()->voice_engine(); | 325 auto* voice_engine = audio_state()->voice_engine(); |
| 326 RTC_DCHECK(voice_engine); | 326 RTC_DCHECK(voice_engine); |
| 327 return voice_engine; | 327 return voice_engine; |
| 328 } | 328 } |
| 329 | 329 |
| 330 int AudioReceiveStream::SetVoiceEnginePlayout(bool playout) { | 330 int AudioReceiveStream::SetVoiceEnginePlayout(bool playout) { |
| 331 ScopedVoEInterface<VoEBase> base(voice_engine()); | 331 ScopedVoEInterface<VoEBase> base(voice_engine()); |
| 332 if (playout) { | 332 if (playout) { |
| 333 return base->StartPlayout(config_.voe_channel_id); | 333 return base->StartPlayout(config_.voe_channel_id); |
| 334 } else { | 334 } else { |
| 335 return base->StopPlayout(config_.voe_channel_id); | 335 return base->StopPlayout(config_.voe_channel_id); |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace internal | 339 } // namespace internal |
| 340 } // namespace webrtc | 340 } // namespace webrtc |
| OLD | NEW |