Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 1628683002: Use separate rtp module lists for send and receive in PacketRouter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, 61 const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
62 CongestionController* congestion_controller) 62 CongestionController* congestion_controller)
63 : config_(config), audio_state_(audio_state) { 63 : config_(config), audio_state_(audio_state) {
64 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); 64 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString();
65 RTC_DCHECK_NE(config_.voe_channel_id, -1); 65 RTC_DCHECK_NE(config_.voe_channel_id, -1);
66 RTC_DCHECK(audio_state_.get()); 66 RTC_DCHECK(audio_state_.get());
67 RTC_DCHECK(congestion_controller); 67 RTC_DCHECK(congestion_controller);
68 68
69 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); 69 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine());
70 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); 70 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id);
71 channel_proxy_->SetCongestionControlObjects( 71 channel_proxy_->RegisterSenderCongestionControlObjects(
72 congestion_controller->pacer(), 72 congestion_controller->pacer(),
73 congestion_controller->GetTransportFeedbackObserver(), 73 congestion_controller->GetTransportFeedbackObserver(),
74 congestion_controller->packet_router()); 74 congestion_controller->packet_router());
75 channel_proxy_->SetRTCPStatus(true); 75 channel_proxy_->SetRTCPStatus(true);
76 channel_proxy_->SetLocalSSRC(config.rtp.ssrc); 76 channel_proxy_->SetLocalSSRC(config.rtp.ssrc);
77 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); 77 channel_proxy_->SetRTCP_CNAME(config.rtp.c_name);
78 78
79 for (const auto& extension : config.rtp.extensions) { 79 for (const auto& extension : config.rtp.extensions) {
80 if (extension.name == RtpExtension::kAbsSendTime) { 80 if (extension.name == RtpExtension::kAbsSendTime) {
81 channel_proxy_->SetSendAbsoluteSenderTimeStatus(true, extension.id); 81 channel_proxy_->SetSendAbsoluteSenderTimeStatus(true, extension.id);
82 } else if (extension.name == RtpExtension::kAudioLevel) { 82 } else if (extension.name == RtpExtension::kAudioLevel) {
83 channel_proxy_->SetSendAudioLevelIndicationStatus(true, extension.id); 83 channel_proxy_->SetSendAudioLevelIndicationStatus(true, extension.id);
84 } else if (extension.name == RtpExtension::kTransportSequenceNumber) { 84 } else if (extension.name == RtpExtension::kTransportSequenceNumber) {
85 channel_proxy_->EnableSendTransportSequenceNumber(extension.id); 85 channel_proxy_->EnableSendTransportSequenceNumber(extension.id);
86 } else { 86 } else {
87 RTC_NOTREACHED() << "Registering unsupported RTP extension."; 87 RTC_NOTREACHED() << "Registering unsupported RTP extension.";
88 } 88 }
89 } 89 }
90 } 90 }
91 91
92 AudioSendStream::~AudioSendStream() { 92 AudioSendStream::~AudioSendStream() {
93 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 93 RTC_DCHECK(thread_checker_.CalledOnValidThread());
94 LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString(); 94 LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString();
95 channel_proxy_->SetCongestionControlObjects(nullptr, nullptr, nullptr); 95 channel_proxy_->ResetCongestionControlObjects();
96 } 96 }
97 97
98 void AudioSendStream::Start() { 98 void AudioSendStream::Start() {
99 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 99 RTC_DCHECK(thread_checker_.CalledOnValidThread());
100 } 100 }
101 101
102 void AudioSendStream::Stop() { 102 void AudioSendStream::Stop() {
103 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 103 RTC_DCHECK(thread_checker_.CalledOnValidThread());
104 } 104 }
105 105
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 VoiceEngine* AudioSendStream::voice_engine() const { 213 VoiceEngine* AudioSendStream::voice_engine() const {
214 internal::AudioState* audio_state = 214 internal::AudioState* audio_state =
215 static_cast<internal::AudioState*>(audio_state_.get()); 215 static_cast<internal::AudioState*>(audio_state_.get());
216 VoiceEngine* voice_engine = audio_state->voice_engine(); 216 VoiceEngine* voice_engine = audio_state->voice_engine();
217 RTC_DCHECK(voice_engine); 217 RTC_DCHECK(voice_engine);
218 return voice_engine; 218 return voice_engine;
219 } 219 }
220 } // namespace internal 220 } // namespace internal
221 } // namespace webrtc 221 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream_unittest.cc ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698