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

Side by Side Diff: webrtc/call/call.cc

Issue 1434263002: Re-add a thread check in Call::Call that was removed by mistake in a rebase. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 1 month 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 | « no previous file | no next file » | 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 new CongestionController(module_process_thread_.get(), 167 new CongestionController(module_process_thread_.get(),
168 call_stats_.get())), 168 call_stats_.get())),
169 config_(config), 169 config_(config),
170 network_enabled_(true), 170 network_enabled_(true),
171 receive_crit_(RWLockWrapper::CreateRWLock()), 171 receive_crit_(RWLockWrapper::CreateRWLock()),
172 send_crit_(RWLockWrapper::CreateRWLock()), 172 send_crit_(RWLockWrapper::CreateRWLock()),
173 received_video_bytes_per_sec_(1000, 1), 173 received_video_bytes_per_sec_(1000, 1),
174 received_audio_bytes_per_sec_(1000, 1), 174 received_audio_bytes_per_sec_(1000, 1),
175 received_rtcp_bytes_per_sec_(1000, 1), 175 received_rtcp_bytes_per_sec_(1000, 1),
176 first_rtp_packet_received_ms_(-1) { 176 first_rtp_packet_received_ms_(-1) {
177 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
177 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0); 178 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
178 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps, 179 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps,
179 config.bitrate_config.min_bitrate_bps); 180 config.bitrate_config.min_bitrate_bps);
180 if (config.bitrate_config.max_bitrate_bps != -1) { 181 if (config.bitrate_config.max_bitrate_bps != -1) {
181 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps, 182 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps,
182 config.bitrate_config.start_bitrate_bps); 183 config.bitrate_config.start_bitrate_bps);
183 } 184 }
184 if (config.audio_state.get()) { 185 if (config.audio_state.get()) {
185 ScopedVoEInterface<VoECodec> voe_codec(voice_engine()); 186 ScopedVoEInterface<VoECodec> voe_codec(voice_engine());
186 event_log_ = voe_codec->GetEventLog(); 187 event_log_ = voe_codec->GetEventLog();
187 } 188 }
188 189
189 Trace::CreateTrace(); 190 Trace::CreateTrace();
190 module_process_thread_->Start(); 191 module_process_thread_->Start();
191 module_process_thread_->RegisterModule(call_stats_.get()); 192 module_process_thread_->RegisterModule(call_stats_.get());
192 193
193 congestion_controller_->SetBweBitrates( 194 congestion_controller_->SetBweBitrates(
194 config_.bitrate_config.min_bitrate_bps, 195 config_.bitrate_config.min_bitrate_bps,
195 config_.bitrate_config.start_bitrate_bps, 196 config_.bitrate_config.start_bitrate_bps,
196 config_.bitrate_config.max_bitrate_bps); 197 config_.bitrate_config.max_bitrate_bps);
197 198
198 congestion_controller_->GetBitrateController()->SetEventLog(event_log_); 199 congestion_controller_->GetBitrateController()->SetEventLog(event_log_);
199 } 200 }
200 201
201 Call::~Call() { 202 Call::~Call() {
203 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
202 UpdateHistograms(); 204 UpdateHistograms();
203 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
204 RTC_CHECK(audio_send_ssrcs_.empty()); 205 RTC_CHECK(audio_send_ssrcs_.empty());
205 RTC_CHECK(video_send_ssrcs_.empty()); 206 RTC_CHECK(video_send_ssrcs_.empty());
206 RTC_CHECK(video_send_streams_.empty()); 207 RTC_CHECK(video_send_streams_.empty());
207 RTC_CHECK(audio_receive_ssrcs_.empty()); 208 RTC_CHECK(audio_receive_ssrcs_.empty());
208 RTC_CHECK(video_receive_ssrcs_.empty()); 209 RTC_CHECK(video_receive_ssrcs_.empty());
209 RTC_CHECK(video_receive_streams_.empty()); 210 RTC_CHECK(video_receive_streams_.empty());
210 211
211 module_process_thread_->DeRegisterModule(call_stats_.get()); 212 module_process_thread_->DeRegisterModule(call_stats_.get());
212 module_process_thread_->Stop(); 213 module_process_thread_->Stop();
213 Trace::ReturnTrace(); 214 Trace::ReturnTrace();
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 // thread. Then this check can be enabled. 652 // thread. Then this check can be enabled.
652 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); 653 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread());
653 if (RtpHeaderParser::IsRtcp(packet, length)) 654 if (RtpHeaderParser::IsRtcp(packet, length))
654 return DeliverRtcp(media_type, packet, length); 655 return DeliverRtcp(media_type, packet, length);
655 656
656 return DeliverRtp(media_type, packet, length, packet_time); 657 return DeliverRtp(media_type, packet, length, packet_time);
657 } 658 }
658 659
659 } // namespace internal 660 } // namespace internal
660 } // namespace webrtc 661 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698