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

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2332213006: Relaxed unnecessarily stringent thread checking in WebRtcAudioSendStream::OnData(). (Closed)
Patch Set: Created 4 years, 3 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 | « 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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 UpdateSendState(); 1263 UpdateSendState();
1264 } 1264 }
1265 1265
1266 // AudioSource::Sink implementation. 1266 // AudioSource::Sink implementation.
1267 // This method is called on the audio thread. 1267 // This method is called on the audio thread.
1268 void OnData(const void* audio_data, 1268 void OnData(const void* audio_data,
1269 int bits_per_sample, 1269 int bits_per_sample,
1270 int sample_rate, 1270 int sample_rate,
1271 size_t number_of_channels, 1271 size_t number_of_channels,
1272 size_t number_of_frames) override { 1272 size_t number_of_frames) override {
1273 RTC_DCHECK(!worker_thread_checker_.CalledOnValidThread());
Henrik Grunell WebRTC 2016/09/14 07:27:04 Just for the record: this is not the check that fa
1274 RTC_DCHECK(audio_capture_thread_checker_.CalledOnValidThread()); 1273 RTC_DCHECK(audio_capture_thread_checker_.CalledOnValidThread());
1275 RTC_DCHECK(voe_audio_transport_); 1274 RTC_DCHECK(voe_audio_transport_);
1276 voe_audio_transport_->PushCaptureData(config_.voe_channel_id, audio_data, 1275 voe_audio_transport_->PushCaptureData(config_.voe_channel_id, audio_data,
1277 bits_per_sample, sample_rate, 1276 bits_per_sample, sample_rate,
1278 number_of_channels, number_of_frames); 1277 number_of_channels, number_of_frames);
1279 } 1278 }
1280 1279
1281 // Callback from the |source_| when it is going away. In case Start() has 1280 // Callback from the |source_| when it is going away. In case Start() has
1282 // never been called, this callback won't be triggered. 1281 // never been called, this callback won't be triggered.
1283 void OnClose() override { 1282 void OnClose() override {
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
2661 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 2660 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
2662 const auto it = send_streams_.find(ssrc); 2661 const auto it = send_streams_.find(ssrc);
2663 if (it != send_streams_.end()) { 2662 if (it != send_streams_.end()) {
2664 return it->second->channel(); 2663 return it->second->channel();
2665 } 2664 }
2666 return -1; 2665 return -1;
2667 } 2666 }
2668 } // namespace cricket 2667 } // namespace cricket
2669 2668
2670 #endif // HAVE_WEBRTC_VOICE 2669 #endif // HAVE_WEBRTC_VOICE
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