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 27 matching lines...) Expand all Loading... |
38 bool IsCodec(const webrtc::CodecInst& codec, const char* ref_name) { | 38 bool IsCodec(const webrtc::CodecInst& codec, const char* ref_name) { |
39 return (_stricmp(codec.plname, ref_name) == 0); | 39 return (_stricmp(codec.plname, ref_name) == 0); |
40 } | 40 } |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 namespace internal { | 43 namespace internal { |
44 AudioSendStream::AudioSendStream( | 44 AudioSendStream::AudioSendStream( |
45 const webrtc::AudioSendStream::Config& config, | 45 const webrtc::AudioSendStream::Config& config, |
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 CongestionController* congestion_controller, | 49 CongestionController* congestion_controller, |
49 BitrateAllocator* bitrate_allocator, | 50 BitrateAllocator* bitrate_allocator, |
50 RtcEventLog* event_log) | 51 RtcEventLog* event_log) |
51 : worker_queue_(worker_queue), | 52 : worker_queue_(worker_queue), |
52 config_(config), | 53 config_(config), |
53 audio_state_(audio_state), | 54 audio_state_(audio_state), |
54 bitrate_allocator_(bitrate_allocator) { | 55 bitrate_allocator_(bitrate_allocator) { |
55 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); | 56 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); |
56 RTC_DCHECK_NE(config_.voe_channel_id, -1); | 57 RTC_DCHECK_NE(config_.voe_channel_id, -1); |
57 RTC_DCHECK(audio_state_.get()); | 58 RTC_DCHECK(audio_state_.get()); |
58 RTC_DCHECK(congestion_controller); | 59 RTC_DCHECK(congestion_controller); |
59 | 60 |
60 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); | 61 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
61 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); | 62 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); |
62 channel_proxy_->SetRtcEventLog(event_log); | 63 channel_proxy_->SetRtcEventLog(event_log); |
63 channel_proxy_->RegisterSenderCongestionControlObjects( | 64 channel_proxy_->RegisterSenderCongestionControlObjects( |
64 congestion_controller->pacer(), | 65 congestion_controller->pacer(), |
65 congestion_controller->GetTransportFeedbackObserver(), | 66 congestion_controller->GetTransportFeedbackObserver(), packet_router); |
66 congestion_controller->packet_router()); | |
67 channel_proxy_->SetRTCPStatus(true); | 67 channel_proxy_->SetRTCPStatus(true); |
68 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); | 68 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); |
69 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); | 69 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); |
70 // TODO(solenberg): Config NACK history window (which is a packet count), | 70 // TODO(solenberg): Config NACK history window (which is a packet count), |
71 // using the actual packet size for the configured codec. | 71 // using the actual packet size for the configured codec. |
72 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0, | 72 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0, |
73 config_.rtp.nack.rtp_history_ms / 20); | 73 config_.rtp.nack.rtp_history_ms / 20); |
74 | 74 |
75 channel_proxy_->RegisterExternalTransport(config.send_transport); | 75 channel_proxy_->RegisterExternalTransport(config.send_transport); |
76 | 76 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError(); | 377 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError(); |
378 return false; | 378 return false; |
379 } | 379 } |
380 } | 380 } |
381 } | 381 } |
382 return true; | 382 return true; |
383 } | 383 } |
384 | 384 |
385 } // namespace internal | 385 } // namespace internal |
386 } // namespace webrtc | 386 } // namespace webrtc |
OLD | NEW |