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

Unified Diff: webrtc/modules/audio_device/win/audio_device_wave_win.cc

Issue 1476453002: Clean up PlatformThread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: IsRunning DCHECK 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/win/audio_device_wave_win.cc
diff --git a/webrtc/modules/audio_device/win/audio_device_wave_win.cc b/webrtc/modules/audio_device/win/audio_device_wave_win.cc
index dec54015036b343a05cc3ded2c45245081c2e63e..6f4d7df397f06393d6fdd6b87ce39a4e1352a290 100644
--- a/webrtc/modules/audio_device/win/audio_device_wave_win.cc
+++ b/webrtc/modules/audio_device/win/audio_device_wave_win.cc
@@ -228,15 +228,9 @@ int32_t AudioDeviceWindowsWave::Init()
}
const char* threadName = "webrtc_audio_module_thread";
- _ptrThread = PlatformThread::CreateThread(ThreadFunc, this, threadName);
- if (!_ptrThread->Start())
- {
- WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id,
- "failed to start the audio thread");
- _ptrThread.reset();
- return -1;
- }
- _ptrThread->SetPriority(kRealtimePriority);
+ _ptrThread.reset(new rtc::PlatformThread(ThreadFunc, this, threadName));
+ _ptrThread->Start();
+ _ptrThread->SetPriority(rtc::kRealtimePriority);
const bool periodic(true);
if (!_timeEvent.StartTimer(periodic, TIMER_PERIOD_MS))
@@ -295,7 +289,7 @@ int32_t AudioDeviceWindowsWave::Terminate()
if (_ptrThread)
{
- PlatformThread* tmpThread = _ptrThread.release();
+ rtc::PlatformThread* tmpThread = _ptrThread.release();
_critSect.Leave();
_timeEvent.Set();

Powered by Google App Engine
This is Rietveld 408576698