Index: talk/app/webrtc/test/fakeaudiocapturemodule.cc |
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.cc b/talk/app/webrtc/test/fakeaudiocapturemodule.cc |
index 47f17a1739abe566a38bad9d14ebdfa24b0507d2..065ef25426c42f5c47018cee3f9292197f6d5e11 100644 |
--- a/talk/app/webrtc/test/fakeaudiocapturemodule.cc |
+++ b/talk/app/webrtc/test/fakeaudiocapturemodule.cc |
@@ -54,7 +54,6 @@ static const uint32_t kMaxVolume = 14392; |
enum { |
MSG_START_PROCESS, |
MSG_RUN_PROCESS, |
- MSG_STOP_PROCESS, |
}; |
FakeAudioCaptureModule::FakeAudioCaptureModule( |
@@ -74,7 +73,7 @@ FakeAudioCaptureModule::FakeAudioCaptureModule( |
FakeAudioCaptureModule::~FakeAudioCaptureModule() { |
// Ensure that thread stops calling ProcessFrame(). |
- process_thread_->Send(this, MSG_STOP_PROCESS); |
+ process_thread_->Clear(this); |
} |
rtc::scoped_refptr<FakeAudioCaptureModule> FakeAudioCaptureModule::Create( |
@@ -601,9 +600,6 @@ void FakeAudioCaptureModule::OnMessage(rtc::Message* msg) { |
case MSG_RUN_PROCESS: |
ProcessFrameP(); |
break; |
- case MSG_STOP_PROCESS: |
- StopProcessP(); |
- break; |
default: |
// All existing messages should be caught. Getting here should never |
// happen. |
@@ -652,7 +648,8 @@ void FakeAudioCaptureModule::UpdateProcessing(bool start) { |
if (start) { |
process_thread_->Post(this, MSG_START_PROCESS); |
} else { |
- process_thread_->Send(this, MSG_STOP_PROCESS); |
+ process_thread_->Clear(this); |
+ started_ = false; |
} |
} |
@@ -747,8 +744,3 @@ void FakeAudioCaptureModule::SendFrameP() { |
SetMicrophoneVolume(current_mic_level); |
} |
-void FakeAudioCaptureModule::StopProcessP() { |
- ASSERT(rtc::Thread::Current() == process_thread_); |
- started_ = false; |
- process_thread_->Clear(this); |
-} |