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

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

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Another rebase and accompanying changes. Created 4 years, 5 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
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 ss << ", sync_group: " << sync_group; 74 ss << ", sync_group: " << sync_group;
75 } 75 }
76 ss << '}'; 76 ss << '}';
77 return ss.str(); 77 return ss.str();
78 } 78 }
79 79
80 namespace internal { 80 namespace internal {
81 AudioReceiveStream::AudioReceiveStream( 81 AudioReceiveStream::AudioReceiveStream(
82 CongestionController* congestion_controller, 82 CongestionController* congestion_controller,
83 const webrtc::AudioReceiveStream::Config& config, 83 const webrtc::AudioReceiveStream::Config& config,
84 const rtc::scoped_refptr<webrtc::AudioState>& audio_state) 84 const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
85 webrtc::RtcEventLog* event_log)
85 : config_(config), 86 : config_(config),
86 audio_state_(audio_state), 87 audio_state_(audio_state),
87 rtp_header_parser_(RtpHeaderParser::Create()) { 88 rtp_header_parser_(RtpHeaderParser::Create()) {
88 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString(); 89 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString();
89 RTC_DCHECK_NE(config_.voe_channel_id, -1); 90 RTC_DCHECK_NE(config_.voe_channel_id, -1);
90 RTC_DCHECK(audio_state_.get()); 91 RTC_DCHECK(audio_state_.get());
91 RTC_DCHECK(congestion_controller); 92 RTC_DCHECK(congestion_controller);
92 RTC_DCHECK(rtp_header_parser_); 93 RTC_DCHECK(rtp_header_parser_);
93 94
94 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); 95 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine());
95 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); 96 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id);
97 channel_proxy_->SetRtcEventLog(event_log);
96 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); 98 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc);
97 // TODO(solenberg): Config NACK history window (which is a packet count), 99 // TODO(solenberg): Config NACK history window (which is a packet count),
98 // using the actual packet size for the configured codec. 100 // using the actual packet size for the configured codec.
99 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0, 101 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0,
100 config_.rtp.nack.rtp_history_ms / 20); 102 config_.rtp.nack.rtp_history_ms / 20);
101 103
102 // TODO(ossu): This is where we'd like to set the decoder factory to 104 // TODO(ossu): This is where we'd like to set the decoder factory to
103 // use. However, since it needs to be included when constructing Channel, we 105 // use. However, since it needs to be included when constructing Channel, we
104 // cannot do that until we're able to move Channel ownership into the 106 // cannot do that until we're able to move Channel ownership into the
105 // Audio{Send,Receive}Streams. The best we can do is check that we're not 107 // Audio{Send,Receive}Streams. The best we can do is check that we're not
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 remote_bitrate_estimator_ = 139 remote_bitrate_estimator_ =
138 congestion_controller->GetRemoteBitrateEstimator(true); 140 congestion_controller->GetRemoteBitrateEstimator(true);
139 } 141 }
140 } 142 }
141 143
142 AudioReceiveStream::~AudioReceiveStream() { 144 AudioReceiveStream::~AudioReceiveStream() {
143 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 145 RTC_DCHECK(thread_checker_.CalledOnValidThread());
144 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString(); 146 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString();
145 channel_proxy_->DeRegisterExternalTransport(); 147 channel_proxy_->DeRegisterExternalTransport();
146 channel_proxy_->ResetCongestionControlObjects(); 148 channel_proxy_->ResetCongestionControlObjects();
149 channel_proxy_->SetRtcEventLog(nullptr);
147 if (remote_bitrate_estimator_) { 150 if (remote_bitrate_estimator_) {
148 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc); 151 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc);
149 } 152 }
150 } 153 }
151 154
152 void AudioReceiveStream::Start() { 155 void AudioReceiveStream::Start() {
153 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 156 RTC_DCHECK(thread_checker_.CalledOnValidThread());
154 } 157 }
155 158
156 void AudioReceiveStream::Stop() { 159 void AudioReceiveStream::Stop() {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 265
263 VoiceEngine* AudioReceiveStream::voice_engine() const { 266 VoiceEngine* AudioReceiveStream::voice_engine() const {
264 internal::AudioState* audio_state = 267 internal::AudioState* audio_state =
265 static_cast<internal::AudioState*>(audio_state_.get()); 268 static_cast<internal::AudioState*>(audio_state_.get());
266 VoiceEngine* voice_engine = audio_state->voice_engine(); 269 VoiceEngine* voice_engine = audio_state->voice_engine();
267 RTC_DCHECK(voice_engine); 270 RTC_DCHECK(voice_engine);
268 return voice_engine; 271 return voice_engine;
269 } 272 }
270 } // namespace internal 273 } // namespace internal
271 } // namespace webrtc 274 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698