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 |
11 #include "webrtc/audio/audio_receive_stream.h" | 11 #include "webrtc/audio/audio_receive_stream.h" |
12 | 12 |
13 #include <string> | 13 #include <string> |
| 14 #include <utility> |
14 | 15 |
| 16 #include "webrtc/audio/audio_sink.h" |
15 #include "webrtc/audio/audio_state.h" | 17 #include "webrtc/audio/audio_state.h" |
16 #include "webrtc/audio/conversion.h" | 18 #include "webrtc/audio/conversion.h" |
17 #include "webrtc/base/checks.h" | 19 #include "webrtc/base/checks.h" |
18 #include "webrtc/base/logging.h" | 20 #include "webrtc/base/logging.h" |
19 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" | 21 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" |
20 #include "webrtc/system_wrappers/include/tick_util.h" | 22 #include "webrtc/system_wrappers/include/tick_util.h" |
21 #include "webrtc/voice_engine/channel_proxy.h" | 23 #include "webrtc/voice_engine/channel_proxy.h" |
22 #include "webrtc/voice_engine/include/voe_base.h" | 24 #include "webrtc/voice_engine/include/voe_base.h" |
23 #include "webrtc/voice_engine/include/voe_codec.h" | 25 #include "webrtc/voice_engine/include/voe_codec.h" |
24 #include "webrtc/voice_engine/include/voe_neteq_stats.h" | 26 #include "webrtc/voice_engine/include/voe_neteq_stats.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 stats.decoding_calls_to_silence_generator = ds.calls_to_silence_generator; | 196 stats.decoding_calls_to_silence_generator = ds.calls_to_silence_generator; |
195 stats.decoding_calls_to_neteq = ds.calls_to_neteq; | 197 stats.decoding_calls_to_neteq = ds.calls_to_neteq; |
196 stats.decoding_normal = ds.decoded_normal; | 198 stats.decoding_normal = ds.decoded_normal; |
197 stats.decoding_plc = ds.decoded_plc; | 199 stats.decoding_plc = ds.decoded_plc; |
198 stats.decoding_cng = ds.decoded_cng; | 200 stats.decoding_cng = ds.decoded_cng; |
199 stats.decoding_plc_cng = ds.decoded_plc_cng; | 201 stats.decoding_plc_cng = ds.decoded_plc_cng; |
200 | 202 |
201 return stats; | 203 return stats; |
202 } | 204 } |
203 | 205 |
| 206 void AudioReceiveStream::SetSink(rtc::scoped_ptr<AudioSinkInterface> sink) { |
| 207 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 208 channel_proxy_->SetSink(std::move(sink)); |
| 209 } |
| 210 |
204 const webrtc::AudioReceiveStream::Config& AudioReceiveStream::config() const { | 211 const webrtc::AudioReceiveStream::Config& AudioReceiveStream::config() const { |
205 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 212 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
206 return config_; | 213 return config_; |
207 } | 214 } |
208 | 215 |
209 VoiceEngine* AudioReceiveStream::voice_engine() const { | 216 VoiceEngine* AudioReceiveStream::voice_engine() const { |
210 internal::AudioState* audio_state = | 217 internal::AudioState* audio_state = |
211 static_cast<internal::AudioState*>(audio_state_.get()); | 218 static_cast<internal::AudioState*>(audio_state_.get()); |
212 VoiceEngine* voice_engine = audio_state->voice_engine(); | 219 VoiceEngine* voice_engine = audio_state->voice_engine(); |
213 RTC_DCHECK(voice_engine); | 220 RTC_DCHECK(voice_engine); |
214 return voice_engine; | 221 return voice_engine; |
215 } | 222 } |
216 } // namespace internal | 223 } // namespace internal |
217 } // namespace webrtc | 224 } // namespace webrtc |
OLD | NEW |