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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2350663002: Change thread check to race check (Closed)
Patch Set: comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/race_checker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc
index e066f309a74b09225c4a4f90d4786662e25a06a4..358c142a1b01bea7ba3a977f55279a78cc45221f 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -26,6 +26,7 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/helpers.h"
#include "webrtc/base/logging.h"
+#include "webrtc/base/race_checker.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/stringutils.h"
#include "webrtc/base/trace_event.h"
@@ -1155,7 +1156,6 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
// TODO(solenberg): Once we're not using FakeWebRtcVoiceEngine anymore:
// RTC_DCHECK(voe_audio_transport);
RTC_DCHECK(call);
- audio_capture_thread_checker_.DetachFromThread();
config_.rtp.ssrc = ssrc;
config_.rtp.c_name = c_name;
config_.voe_channel_id = ch;
@@ -1270,7 +1270,7 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
int sample_rate,
size_t number_of_channels,
size_t number_of_frames) override {
- RTC_DCHECK(audio_capture_thread_checker_.CalledOnValidThread());
+ RTC_CHECK_RUNS_SERIALIZED(&audio_capture_race_checker_);
RTC_DCHECK(voe_audio_transport_);
voe_audio_transport_->PushCaptureData(config_.voe_channel_id, audio_data,
bits_per_sample, sample_rate,
@@ -1317,7 +1317,7 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
}
rtc::ThreadChecker worker_thread_checker_;
- rtc::ThreadChecker audio_capture_thread_checker_;
+ rtc::RaceChecker audio_capture_race_checker_;
webrtc::AudioTransport* const voe_audio_transport_ = nullptr;
webrtc::Call* call_ = nullptr;
webrtc::AudioSendStream::Config config_;
« no previous file with comments | « webrtc/base/race_checker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698