| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, | 46 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, |
| 47 rtc::TaskQueue* worker_queue, | 47 rtc::TaskQueue* worker_queue, |
| 48 PacketRouter* packet_router, | 48 PacketRouter* packet_router, |
| 49 CongestionController* congestion_controller, | 49 CongestionController* congestion_controller, |
| 50 BitrateAllocator* bitrate_allocator, | 50 BitrateAllocator* bitrate_allocator, |
| 51 RtcEventLog* event_log, | 51 RtcEventLog* event_log, |
| 52 RtcpRttStats* rtcp_rtt_stats) | 52 RtcpRttStats* rtcp_rtt_stats) |
| 53 : worker_queue_(worker_queue), | 53 : worker_queue_(worker_queue), |
| 54 config_(config), | 54 config_(config), |
| 55 audio_state_(audio_state), | 55 audio_state_(audio_state), |
| 56 bitrate_allocator_(bitrate_allocator) { | 56 bitrate_allocator_(bitrate_allocator), |
| 57 congestion_controller_(congestion_controller) { |
| 57 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); | 58 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); |
| 58 RTC_DCHECK_NE(config_.voe_channel_id, -1); | 59 RTC_DCHECK_NE(config_.voe_channel_id, -1); |
| 59 RTC_DCHECK(audio_state_.get()); | 60 RTC_DCHECK(audio_state_.get()); |
| 60 RTC_DCHECK(congestion_controller); | 61 RTC_DCHECK(congestion_controller); |
| 61 | 62 |
| 62 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); | 63 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
| 63 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); | 64 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); |
| 64 channel_proxy_->SetRtcEventLog(event_log); | 65 channel_proxy_->SetRtcEventLog(event_log); |
| 65 channel_proxy_->SetRtcpRttStats(rtcp_rtt_stats); | 66 channel_proxy_->SetRtcpRttStats(rtcp_rtt_stats); |
| 66 channel_proxy_->RegisterSenderCongestionControlObjects( | 67 channel_proxy_->RegisterSenderCongestionControlObjects( |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 return 0; | 252 return 0; |
| 252 } | 253 } |
| 253 | 254 |
| 254 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { | 255 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { |
| 255 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 256 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 256 return config_; | 257 return config_; |
| 257 } | 258 } |
| 258 | 259 |
| 259 void AudioSendStream::SetTransportOverhead(int transport_overhead_per_packet) { | 260 void AudioSendStream::SetTransportOverhead(int transport_overhead_per_packet) { |
| 260 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 261 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 262 congestion_controller_->SetTransportOverhead(transport_overhead_per_packet); |
| 261 channel_proxy_->SetTransportOverhead(transport_overhead_per_packet); | 263 channel_proxy_->SetTransportOverhead(transport_overhead_per_packet); |
| 262 } | 264 } |
| 263 | 265 |
| 264 VoiceEngine* AudioSendStream::voice_engine() const { | 266 VoiceEngine* AudioSendStream::voice_engine() const { |
| 265 internal::AudioState* audio_state = | 267 internal::AudioState* audio_state = |
| 266 static_cast<internal::AudioState*>(audio_state_.get()); | 268 static_cast<internal::AudioState*>(audio_state_.get()); |
| 267 VoiceEngine* voice_engine = audio_state->voice_engine(); | 269 VoiceEngine* voice_engine = audio_state->voice_engine(); |
| 268 RTC_DCHECK(voice_engine); | 270 RTC_DCHECK(voice_engine); |
| 269 return voice_engine; | 271 return voice_engine; |
| 270 } | 272 } |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError(); | 385 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError(); |
| 384 return false; | 386 return false; |
| 385 } | 387 } |
| 386 } | 388 } |
| 387 } | 389 } |
| 388 return true; | 390 return true; |
| 389 } | 391 } |
| 390 | 392 |
| 391 } // namespace internal | 393 } // namespace internal |
| 392 } // namespace webrtc | 394 } // namespace webrtc |
| OLD | NEW |