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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 return ss.str(); | 57 return ss.str(); |
58 } | 58 } |
59 | 59 |
60 namespace internal { | 60 namespace internal { |
61 AudioSendStream::AudioSendStream( | 61 AudioSendStream::AudioSendStream( |
62 const webrtc::AudioSendStream::Config& config, | 62 const webrtc::AudioSendStream::Config& config, |
63 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, | 63 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, |
64 rtc::TaskQueue* worker_queue, | 64 rtc::TaskQueue* worker_queue, |
65 CongestionController* congestion_controller, | 65 CongestionController* congestion_controller, |
66 BitrateAllocator* bitrate_allocator, | 66 BitrateAllocator* bitrate_allocator, |
67 RtcEventLog* event_log, | 67 RtcEventLog* event_log) |
68 RtcpRttStats* rtcp_rtt_stats) | |
69 : worker_queue_(worker_queue), | 68 : worker_queue_(worker_queue), |
70 config_(config), | 69 config_(config), |
71 audio_state_(audio_state), | 70 audio_state_(audio_state), |
72 bitrate_allocator_(bitrate_allocator) { | 71 bitrate_allocator_(bitrate_allocator) { |
73 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); | 72 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); |
74 RTC_DCHECK_NE(config_.voe_channel_id, -1); | 73 RTC_DCHECK_NE(config_.voe_channel_id, -1); |
75 RTC_DCHECK(audio_state_.get()); | 74 RTC_DCHECK(audio_state_.get()); |
76 RTC_DCHECK(congestion_controller); | 75 RTC_DCHECK(congestion_controller); |
77 | 76 |
78 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); | 77 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
79 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); | 78 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); |
80 channel_proxy_->SetRtcEventLog(event_log); | 79 channel_proxy_->SetRtcEventLog(event_log); |
81 channel_proxy_->SetRtcpRttStats(rtcp_rtt_stats); | |
82 channel_proxy_->RegisterSenderCongestionControlObjects( | 80 channel_proxy_->RegisterSenderCongestionControlObjects( |
83 congestion_controller->pacer(), | 81 congestion_controller->pacer(), |
84 congestion_controller->GetTransportFeedbackObserver(), | 82 congestion_controller->GetTransportFeedbackObserver(), |
85 congestion_controller->packet_router()); | 83 congestion_controller->packet_router()); |
86 channel_proxy_->SetRTCPStatus(true); | 84 channel_proxy_->SetRTCPStatus(true); |
87 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); | 85 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); |
88 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); | 86 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); |
89 // TODO(solenberg): Config NACK history window (which is a packet count), | 87 // TODO(solenberg): Config NACK history window (which is a packet count), |
90 // using the actual packet size for the configured codec. | 88 // using the actual packet size for the configured codec. |
91 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0, | 89 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 280 |
283 VoiceEngine* AudioSendStream::voice_engine() const { | 281 VoiceEngine* AudioSendStream::voice_engine() const { |
284 internal::AudioState* audio_state = | 282 internal::AudioState* audio_state = |
285 static_cast<internal::AudioState*>(audio_state_.get()); | 283 static_cast<internal::AudioState*>(audio_state_.get()); |
286 VoiceEngine* voice_engine = audio_state->voice_engine(); | 284 VoiceEngine* voice_engine = audio_state->voice_engine(); |
287 RTC_DCHECK(voice_engine); | 285 RTC_DCHECK(voice_engine); |
288 return voice_engine; | 286 return voice_engine; |
289 } | 287 } |
290 } // namespace internal | 288 } // namespace internal |
291 } // namespace webrtc | 289 } // namespace webrtc |
OLD | NEW |