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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 void AudioSendStream::Stop() { | 110 void AudioSendStream::Stop() { |
111 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 111 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
112 ScopedVoEInterface<VoEBase> base(voice_engine()); | 112 ScopedVoEInterface<VoEBase> base(voice_engine()); |
113 int error = base->StopSend(config_.voe_channel_id); | 113 int error = base->StopSend(config_.voe_channel_id); |
114 if (error != 0) { | 114 if (error != 0) { |
115 LOG(LS_ERROR) << "AudioSendStream::Stop failed with error: " << error; | 115 LOG(LS_ERROR) << "AudioSendStream::Stop failed with error: " << error; |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 void AudioSendStream::SignalNetworkState(NetworkState state) { | |
120 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | |
121 } | |
122 | |
123 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { | |
124 // TODO(solenberg): Tests call this function on a network thread, libjingle | |
125 // calls on the worker thread. We should move towards always using a network | |
126 // thread. Then this check can be enabled. | |
127 // RTC_DCHECK(!thread_checker_.CalledOnValidThread()); | |
128 return channel_proxy_->ReceivedRTCPPacket(packet, length); | |
129 } | |
130 | |
131 bool AudioSendStream::SendTelephoneEvent(int payload_type, int event, | 119 bool AudioSendStream::SendTelephoneEvent(int payload_type, int event, |
132 int duration_ms) { | 120 int duration_ms) { |
133 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 121 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
134 return channel_proxy_->SetSendTelephoneEventPayloadType(payload_type) && | 122 return channel_proxy_->SetSendTelephoneEventPayloadType(payload_type) && |
135 channel_proxy_->SendTelephoneEventOutband(event, duration_ms); | 123 channel_proxy_->SendTelephoneEventOutband(event, duration_ms); |
136 } | 124 } |
137 | 125 |
138 webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const { | 126 webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const { |
139 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 127 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
140 webrtc::AudioSendStream::Stats stats; | 128 webrtc::AudioSendStream::Stats stats; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 stats.echo_return_loss_enhancement = erle; | 199 stats.echo_return_loss_enhancement = erle; |
212 } | 200 } |
213 | 201 |
214 internal::AudioState* audio_state = | 202 internal::AudioState* audio_state = |
215 static_cast<internal::AudioState*>(audio_state_.get()); | 203 static_cast<internal::AudioState*>(audio_state_.get()); |
216 stats.typing_noise_detected = audio_state->typing_noise_detected(); | 204 stats.typing_noise_detected = audio_state->typing_noise_detected(); |
217 | 205 |
218 return stats; | 206 return stats; |
219 } | 207 } |
220 | 208 |
| 209 void AudioSendStream::SignalNetworkState(NetworkState state) { |
| 210 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 211 } |
| 212 |
| 213 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { |
| 214 // TODO(solenberg): Tests call this function on a network thread, libjingle |
| 215 // calls on the worker thread. We should move towards always using a network |
| 216 // thread. Then this check can be enabled. |
| 217 // RTC_DCHECK(!thread_checker_.CalledOnValidThread()); |
| 218 return channel_proxy_->ReceivedRTCPPacket(packet, length); |
| 219 } |
| 220 |
221 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { | 221 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { |
222 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 222 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
223 return config_; | 223 return config_; |
224 } | 224 } |
225 | 225 |
226 VoiceEngine* AudioSendStream::voice_engine() const { | 226 VoiceEngine* AudioSendStream::voice_engine() const { |
227 internal::AudioState* audio_state = | 227 internal::AudioState* audio_state = |
228 static_cast<internal::AudioState*>(audio_state_.get()); | 228 static_cast<internal::AudioState*>(audio_state_.get()); |
229 VoiceEngine* voice_engine = audio_state->voice_engine(); | 229 VoiceEngine* voice_engine = audio_state->voice_engine(); |
230 RTC_DCHECK(voice_engine); | 230 RTC_DCHECK(voice_engine); |
231 return voice_engine; | 231 return voice_engine; |
232 } | 232 } |
233 } // namespace internal | 233 } // namespace internal |
234 } // namespace webrtc | 234 } // namespace webrtc |
OLD | NEW |