diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc index 8527767221..17be285d7b 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc @@ -314,10 +314,9 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest { } void StartThreads() { - unsigned int thread_id = 0; - ASSERT_TRUE(send_thread_->Start(thread_id)); - ASSERT_TRUE(insert_packet_thread_->Start(thread_id)); - ASSERT_TRUE(pull_audio_thread_->Start(thread_id)); + ASSERT_TRUE(send_thread_->Start()); + ASSERT_TRUE(insert_packet_thread_->Start()); + ASSERT_TRUE(pull_audio_thread_->Start()); } void TearDown() override { diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc index e29940162c..136e414330 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc @@ -446,10 +446,9 @@ class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi { } void StartThreads() { - unsigned int thread_id = 0; - ASSERT_TRUE(send_thread_->Start(thread_id)); - ASSERT_TRUE(insert_packet_thread_->Start(thread_id)); - ASSERT_TRUE(pull_audio_thread_->Start(thread_id)); + ASSERT_TRUE(send_thread_->Start()); + ASSERT_TRUE(insert_packet_thread_->Start()); + ASSERT_TRUE(pull_audio_thread_->Start()); } void TearDown() { diff --git a/webrtc/modules/audio_coding/main/test/APITest.cc b/webrtc/modules/audio_coding/main/test/APITest.cc index cf213433d8..4f1aa03cfd 100644 --- a/webrtc/modules/audio_coding/main/test/APITest.cc +++ b/webrtc/modules/audio_coding/main/test/APITest.cc @@ -38,8 +38,7 @@ namespace webrtc { #define MAX_FILE_NAME_LENGTH_BYTE 500 #define CHECK_THREAD_NULLITY(myThread, S) \ if(myThread != NULL) { \ - unsigned int i; \ - (myThread)->Start(i); \ + (myThread)->Start(); \ } else { \ ADD_FAILURE() << S; \ } diff --git a/webrtc/modules/audio_device/android/low_latency_event_unittest.cc b/webrtc/modules/audio_device/android/low_latency_event_unittest.cc index 5a90416789..359625b016 100644 --- a/webrtc/modules/audio_device/android/low_latency_event_unittest.cc +++ b/webrtc/modules/audio_device/android/low_latency_event_unittest.cc @@ -45,8 +45,7 @@ class LowLatencyEventTest : public testing::Test { private: void Start() { - unsigned int thread_id = 0; - EXPECT_TRUE(process_thread_->Start(thread_id)); + EXPECT_TRUE(process_thread_->Start()); } void Stop() { terminated_ = true; diff --git a/webrtc/modules/audio_device/android/opensles_input.cc b/webrtc/modules/audio_device/android/opensles_input.cc index 5b5cdfd4be..2cea3b4152 100644 --- a/webrtc/modules/audio_device/android/opensles_input.cc +++ b/webrtc/modules/audio_device/android/opensles_input.cc @@ -475,8 +475,7 @@ bool OpenSlesInput::StartCbThreads() { kRealtimePriority, "opensl_rec_thread")); assert(rec_thread_.get()); - unsigned int thread_id = 0; - if (!rec_thread_->Start(thread_id)) { + if (!rec_thread_->Start()) { assert(false); return false; } diff --git a/webrtc/modules/audio_device/android/opensles_output.cc b/webrtc/modules/audio_device/android/opensles_output.cc index 8b33b22b43..c46aa84899 100644 --- a/webrtc/modules/audio_device/android/opensles_output.cc +++ b/webrtc/modules/audio_device/android/opensles_output.cc @@ -520,8 +520,7 @@ bool OpenSlesOutput::StartCbThreads() { SL_PLAYSTATE_PLAYING), false); - unsigned int thread_id = 0; - if (!play_thread_->Start(thread_id)) { + if (!play_thread_->Start()) { assert(false); return false; } diff --git a/webrtc/modules/audio_device/dummy/file_audio_device.cc b/webrtc/modules/audio_device/dummy/file_audio_device.cc index 28dc389ce6..c3abcf9a5c 100644 --- a/webrtc/modules/audio_device/dummy/file_audio_device.cc +++ b/webrtc/modules/audio_device/dummy/file_audio_device.cc @@ -37,8 +37,6 @@ FileAudioDevice::FileAudioDevice(const int32_t id, _playoutFramesIn10MS(0), _ptrThreadRec(NULL), _ptrThreadPlay(NULL), - _recThreadID(0), - _playThreadID(0), _playing(false), _recording(false), _lastCallPlayoutMillis(0), @@ -230,8 +228,7 @@ int32_t FileAudioDevice::StartPlayout() { return -1; } - unsigned int threadID(0); - if (!_ptrThreadPlay->Start(threadID)) { + if (!_ptrThreadPlay->Start()) { _playing = false; delete _ptrThreadPlay; _ptrThreadPlay = NULL; @@ -239,7 +236,6 @@ int32_t FileAudioDevice::StartPlayout() { _playoutBuffer = NULL; return -1; } - _playThreadID = threadID; return 0; } @@ -307,8 +303,7 @@ int32_t FileAudioDevice::StartRecording() { return -1; } - unsigned int threadID(0); - if (!_ptrThreadRec->Start(threadID)) { + if (!_ptrThreadRec->Start()) { _recording = false; delete _ptrThreadRec; _ptrThreadRec = NULL; @@ -316,7 +311,6 @@ int32_t FileAudioDevice::StartRecording() { _recordingBuffer = NULL; return -1; } - _recThreadID = threadID; return 0; } diff --git a/webrtc/modules/audio_device/dummy/file_audio_device.h b/webrtc/modules/audio_device/dummy/file_audio_device.h index 14936f522f..c3e0baeaaa 100644 --- a/webrtc/modules/audio_device/dummy/file_audio_device.h +++ b/webrtc/modules/audio_device/dummy/file_audio_device.h @@ -180,8 +180,6 @@ class FileAudioDevice : public AudioDeviceGeneric { ThreadWrapper* _ptrThreadRec; ThreadWrapper* _ptrThreadPlay; - uint32_t _recThreadID; - uint32_t _playThreadID; bool _playing; bool _recording; diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.h b/webrtc/modules/audio_device/ios/audio_device_ios.h index 2a48845e6e..04e9340f39 100644 --- a/webrtc/modules/audio_device/ios/audio_device_ios.h +++ b/webrtc/modules/audio_device/ios/audio_device_ios.h @@ -215,7 +215,6 @@ class AudioDeviceIOS : public AudioDeviceGeneric { CriticalSectionWrapper& _critSect; ThreadWrapper* _captureWorkerThread; - uint32_t _captureWorkerThreadId; int32_t _id; diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.mm b/webrtc/modules/audio_device/ios/audio_device_ios.mm index 19dcfdfb69..ee4b4bbbb8 100644 --- a/webrtc/modules/audio_device/ios/audio_device_ios.mm +++ b/webrtc/modules/audio_device/ios/audio_device_ios.mm @@ -22,7 +22,6 @@ AudioDeviceIOS::AudioDeviceIOS(const int32_t id) _ptrAudioBuffer(NULL), _critSect(*CriticalSectionWrapper::CreateCriticalSection()), _captureWorkerThread(NULL), - _captureWorkerThreadId(0), _id(id), _auVoiceProcessing(NULL), _audioInterruptionObserver(NULL), @@ -120,9 +119,7 @@ int32_t AudioDeviceIOS::Init() { return -1; } - unsigned int threadID(0); - bool res = _captureWorkerThread->Start(threadID); - _captureWorkerThreadId = static_cast(threadID); + bool res = _captureWorkerThread->Start(); WEBRTC_TRACE(kTraceDebug, kTraceAudioDevice, _id, "CaptureWorkerThread started (res=%d)", res); } else { diff --git a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc index 065adcfa71..deabe5e7c0 100644 --- a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc +++ b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc @@ -66,8 +66,6 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA(const int32_t id) : _critSect(*CriticalSectionWrapper::CreateCriticalSection()), _ptrThreadRec(NULL), _ptrThreadPlay(NULL), - _recThreadID(0), - _playThreadID(0), _id(id), _mixerManager(id), _inputDeviceIndex(0), @@ -1401,8 +1399,7 @@ int32_t AudioDeviceLinuxALSA::StartRecording() return -1; } - unsigned int threadID(0); - if (!_ptrThreadRec->Start(threadID)) + if (!_ptrThreadRec->Start()) { WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id, " failed to start the rec audio thread"); @@ -1413,7 +1410,6 @@ int32_t AudioDeviceLinuxALSA::StartRecording() _recordingBuffer = NULL; return -1; } - _recThreadID = threadID; errVal = LATE(snd_pcm_prepare)(_handleRecord); if (errVal < 0) @@ -1573,8 +1569,7 @@ int32_t AudioDeviceLinuxALSA::StartPlayout() return -1; } - unsigned int threadID(0); - if (!_ptrThreadPlay->Start(threadID)) + if (!_ptrThreadPlay->Start()) { WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id, " failed to start the play audio thread"); @@ -1585,7 +1580,6 @@ int32_t AudioDeviceLinuxALSA::StartPlayout() _playoutBuffer = NULL; return -1; } - _playThreadID = threadID; int errVal = LATE(snd_pcm_prepare)(_handlePlayout); if (errVal < 0) diff --git a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h index d5be88cf1d..f3e8f401a3 100644 --- a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h +++ b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h @@ -187,8 +187,6 @@ private: ThreadWrapper* _ptrThreadRec; ThreadWrapper* _ptrThreadPlay; - uint32_t _recThreadID; - uint32_t _playThreadID; int32_t _id; diff --git a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc index 7245a4208e..5504c1c5c9 100644 --- a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc +++ b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc @@ -42,8 +42,6 @@ AudioDeviceLinuxPulse::AudioDeviceLinuxPulse(const int32_t id) : _playStartEvent(*EventWrapper::Create()), _ptrThreadPlay(NULL), _ptrThreadRec(NULL), - _recThreadID(0), - _playThreadID(0), _id(id), _mixerManager(id), _inputDeviceIndex(0), @@ -221,8 +219,7 @@ int32_t AudioDeviceLinuxPulse::Init() return -1; } - unsigned int threadID(0); - if (!_ptrThreadRec->Start(threadID)) + if (!_ptrThreadRec->Start()) { WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id, " failed to start the rec audio thread"); @@ -231,7 +228,6 @@ int32_t AudioDeviceLinuxPulse::Init() _ptrThreadRec = NULL; return -1; } - _recThreadID = threadID; // PLAYOUT threadName = "webrtc_audio_module_play_thread"; @@ -244,8 +240,7 @@ int32_t AudioDeviceLinuxPulse::Init() return -1; } - threadID = 0; - if (!_ptrThreadPlay->Start(threadID)) + if (!_ptrThreadPlay->Start()) { WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id, " failed to start the play audio thread"); @@ -254,7 +249,6 @@ int32_t AudioDeviceLinuxPulse::Init() _ptrThreadPlay = NULL; return -1; } - _playThreadID = threadID; _initialized = true; diff --git a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h index 1644df90bb..f1a3332e87 100644 --- a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h +++ b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h @@ -290,8 +290,6 @@ private: ThreadWrapper* _ptrThreadPlay; ThreadWrapper* _ptrThreadRec; - uint32_t _recThreadID; - uint32_t _playThreadID; int32_t _id; AudioMixerManagerLinuxPulse _mixerManager; diff --git a/webrtc/modules/audio_device/mac/audio_device_mac.cc b/webrtc/modules/audio_device/mac/audio_device_mac.cc index 4e4ea122d3..dba80dbce0 100644 --- a/webrtc/modules/audio_device/mac/audio_device_mac.cc +++ b/webrtc/modules/audio_device/mac/audio_device_mac.cc @@ -109,8 +109,6 @@ AudioDeviceMac::AudioDeviceMac(const int32_t id) : _critSect(*CriticalSectionWrapper::CreateCriticalSection()), _stopEventRec(*EventWrapper::Create()), _stopEvent(*EventWrapper::Create()), - capture_worker_thread_id_(0), - render_worker_thread_id_(0), _id(id), _mixerManager(id), _inputDeviceIndex(0), @@ -1760,7 +1758,7 @@ int32_t AudioDeviceMac::StartRecording() ThreadWrapper::CreateThread(RunCapture, this, kRealtimePriority, "CaptureWorkerThread")); DCHECK(capture_worker_thread_.get()); - capture_worker_thread_->Start(capture_worker_thread_id_); + capture_worker_thread_->Start(); OSStatus err = noErr; if (_twoDevices) @@ -1914,7 +1912,7 @@ int32_t AudioDeviceMac::StartPlayout() render_worker_thread_.reset( ThreadWrapper::CreateThread(RunRender, this, kRealtimePriority, "RenderWorkerThread")); - render_worker_thread_->Start(render_worker_thread_id_); + render_worker_thread_->Start(); if (_twoDevices || !_recording) { diff --git a/webrtc/modules/audio_device/mac/audio_device_mac.h b/webrtc/modules/audio_device/mac/audio_device_mac.h index 7754f56794..a1a292d807 100644 --- a/webrtc/modules/audio_device/mac/audio_device_mac.h +++ b/webrtc/modules/audio_device/mac/audio_device_mac.h @@ -280,11 +280,9 @@ private: // Only valid/running between calls to StartRecording and StopRecording. rtc::scoped_ptr capture_worker_thread_; - unsigned int capture_worker_thread_id_; // Only valid/running between calls to StartPlayout and StopPlayout. rtc::scoped_ptr render_worker_thread_; - unsigned int render_worker_thread_id_; int32_t _id; 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 8fcb43f105..429d7bde37 100644 --- a/webrtc/modules/audio_device/win/audio_device_wave_win.cc +++ b/webrtc/modules/audio_device/win/audio_device_wave_win.cc @@ -57,7 +57,6 @@ AudioDeviceWindowsWave::AudioDeviceWindowsWave(const int32_t id) : _hShutdownSetVolumeEvent(NULL), _hSetCaptureVolumeEvent(NULL), _ptrThread(NULL), - _threadID(0), _critSectCb(*CriticalSectionWrapper::CreateCriticalSection()), _id(id), _mixerManager(id), @@ -242,8 +241,7 @@ int32_t AudioDeviceWindowsWave::Init() return -1; } - unsigned int threadID(0); - if (!_ptrThread->Start(threadID)) + if (!_ptrThread->Start()) { WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id, "failed to start the audio thread"); @@ -251,7 +249,6 @@ int32_t AudioDeviceWindowsWave::Init() _ptrThread = NULL; return -1; } - _threadID = threadID; const bool periodic(true); if (!_timeEvent.StartTimer(periodic, TIMER_PERIOD_MS)) diff --git a/webrtc/modules/audio_device/win/audio_device_wave_win.h b/webrtc/modules/audio_device/win/audio_device_wave_win.h index 1767b90a85..d23618e337 100644 --- a/webrtc/modules/audio_device/win/audio_device_wave_win.h +++ b/webrtc/modules/audio_device/win/audio_device_wave_win.h @@ -222,7 +222,6 @@ private: HANDLE _hSetCaptureVolumeEvent; ThreadWrapper* _ptrThread; - uint32_t _threadID; CriticalSectionWrapper& _critSectCb; diff --git a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/MatlabPlot.cc b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/MatlabPlot.cc index 77eb6a13a8..446bbe93bb 100644 --- a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/MatlabPlot.cc +++ b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/MatlabPlot.cc @@ -907,9 +907,7 @@ _numPlots(0) _running = true; - unsigned int tid; - _plotThread->Start(tid); - + _plotThread->Start(); } MatlabEngine::~MatlabEngine() diff --git a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestLoadGenerator.cc b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestLoadGenerator.cc index b22f64e520..5057de0039 100644 --- a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestLoadGenerator.cc +++ b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestLoadGenerator.cc @@ -87,8 +87,7 @@ int32_t TestLoadGenerator::Start (const char *threadName) _running = true; - unsigned int tid; - _genThread->Start(tid); + _genThread->Start(); return 0; } diff --git a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.cc b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.cc index bf84e3527a..e87eaca52b 100644 --- a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.cc +++ b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.cc @@ -183,8 +183,7 @@ int32_t TestSenderReceiver::Start() } } - unsigned int tid; - _procThread->Start(tid); + _procThread->Start(); return 0; diff --git a/webrtc/modules/utility/source/process_thread_impl.cc b/webrtc/modules/utility/source/process_thread_impl.cc index 8268fff802..42c59243a4 100644 --- a/webrtc/modules/utility/source/process_thread_impl.cc +++ b/webrtc/modules/utility/source/process_thread_impl.cc @@ -71,8 +71,7 @@ void ProcessThreadImpl::Start() { thread_.reset(ThreadWrapper::CreateThread( &ProcessThreadImpl::Run, this, kNormalPriority, "ProcessThread")); - unsigned int id; - CHECK(thread_->Start(id)); + CHECK(thread_->Start()); } void ProcessThreadImpl::Stop() { diff --git a/webrtc/modules/video_capture/linux/video_capture_linux.cc b/webrtc/modules/video_capture/linux/video_capture_linux.cc index 9e7a8f10a4..f3b0c16dd9 100644 --- a/webrtc/modules/video_capture/linux/video_capture_linux.cc +++ b/webrtc/modules/video_capture/linux/video_capture_linux.cc @@ -284,8 +284,7 @@ int32_t VideoCaptureModuleV4L2::StartCapture( { _captureThread = ThreadWrapper::CreateThread( VideoCaptureModuleV4L2::CaptureThread, this, kHighPriority); - unsigned int id; - _captureThread->Start(id); + _captureThread->Start(); } // Needed to start UVC camera - from the uvcview application diff --git a/webrtc/modules/video_coding/main/test/mt_rx_tx_test.cc b/webrtc/modules/video_coding/main/test/mt_rx_tx_test.cc index e78fedccdd..cd0c5b702c 100644 --- a/webrtc/modules/video_coding/main/test/mt_rx_tx_test.cc +++ b/webrtc/modules/video_coding/main/test/mt_rx_tx_test.cc @@ -275,8 +275,7 @@ int MTRxTxTest(CmdArgs& args) if (mainSenderThread != NULL) { - unsigned int tid; - mainSenderThread->Start(tid); + mainSenderThread->Start(); } else { @@ -286,8 +285,7 @@ int MTRxTxTest(CmdArgs& args) if (intSenderThread != NULL) { - unsigned int tid; - intSenderThread->Start(tid); + intSenderThread->Start(); } else { @@ -303,8 +301,7 @@ int MTRxTxTest(CmdArgs& args) if (processingThread != NULL) { - unsigned int tid; - processingThread->Start(tid); + processingThread->Start(); } else { @@ -314,8 +311,7 @@ int MTRxTxTest(CmdArgs& args) if (decodeThread != NULL) { - unsigned int tid; - decodeThread->Start(tid); + decodeThread->Start(); } else { diff --git a/webrtc/modules/video_coding/main/test/video_rtp_play_mt.cc b/webrtc/modules/video_coding/main/test/video_rtp_play_mt.cc index 41ae34998a..32faf704e3 100644 --- a/webrtc/modules/video_coding/main/test/video_rtp_play_mt.cc +++ b/webrtc/modules/video_coding/main/test/video_rtp_play_mt.cc @@ -123,10 +123,9 @@ int RtpPlayMT(const CmdArgs& args) { return -1; } - unsigned int dummy_thread_id; - player_thread->Start(dummy_thread_id); - processing_thread->Start(dummy_thread_id); - decode_thread->Start(dummy_thread_id); + player_thread->Start(); + processing_thread->Start(); + decode_thread->Start(); wait_event->Wait(kConfigMaxRuntimeMs); diff --git a/webrtc/modules/video_render/android/video_render_android_impl.cc b/webrtc/modules/video_render/android/video_render_android_impl.cc index 35f1f17844..89a1ae74da 100644 --- a/webrtc/modules/video_render/android/video_render_android_impl.cc +++ b/webrtc/modules/video_render/android/video_render_android_impl.cc @@ -152,10 +152,9 @@ int32_t VideoRenderAndroid::StartRender() { return -1; } - unsigned int tId = 0; - if (_javaRenderThread->Start(tId)) + if (_javaRenderThread->Start()) WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, - "%s: thread started: %u", __FUNCTION__, tId); + "%s: thread started", __FUNCTION__); else { WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, "%s: Could not start send thread", __FUNCTION__); diff --git a/webrtc/modules/video_render/incoming_video_stream.cc b/webrtc/modules/video_render/incoming_video_stream.cc index f6ee7e478f..1fbd886bfc 100644 --- a/webrtc/modules/video_render/incoming_video_stream.cc +++ b/webrtc/modules/video_render/incoming_video_stream.cc @@ -187,10 +187,9 @@ int32_t IncomingVideoStream::Start() { return -1; } - unsigned int t_id = 0; - if (incoming_render_thread_->Start(t_id)) { + if (incoming_render_thread_->Start()) { WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, module_id_, - "%s: thread started: %u", __FUNCTION__, t_id); + "%s: thread started", __FUNCTION__); } else { WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, module_id_, "%s: Could not start send thread", __FUNCTION__); diff --git a/webrtc/modules/video_render/ios/video_render_ios_gles20.mm b/webrtc/modules/video_render/ios/video_render_ios_gles20.mm index 2e48c4f56e..ff5776a824 100644 --- a/webrtc/modules/video_render/ios/video_render_ios_gles20.mm +++ b/webrtc/modules/video_render/ios/video_render_ios_gles20.mm @@ -90,8 +90,7 @@ int VideoRenderIosGles20::Init() { return -1; } - unsigned int thread_id; - screen_update_thread_->Start(thread_id); + screen_update_thread_->Start(); // Start the event triggering the render process unsigned int monitor_freq = 60; diff --git a/webrtc/modules/video_render/mac/video_render_agl.cc b/webrtc/modules/video_render/mac/video_render_agl.cc index 7a1dbed920..72b57fae0c 100644 --- a/webrtc/modules/video_render/mac/video_render_agl.cc +++ b/webrtc/modules/video_render/mac/video_render_agl.cc @@ -393,7 +393,6 @@ _windowEventHandlerRef( NULL), _currentViewBounds( ), _lastViewBounds( ), _renderingIsPaused( false), -_threadID( ) { //WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s"); @@ -511,7 +510,6 @@ _windowEventHandlerRef( NULL), _currentViewBounds( ), _lastViewBounds( ), _renderingIsPaused( false), -_threadID( ) { //WEBRTC_TRACE(kTraceDebug, "%s:%d Constructor", __FUNCTION__, __LINE__); // _renderCritSec = CriticalSectionWrapper::CreateCriticalSection(); @@ -744,8 +742,7 @@ int VideoRenderAGL::Init() //WEBRTC_TRACE(kTraceError, "%s:%d Thread not created", __FUNCTION__, __LINE__); return -1; } - unsigned int threadId; - _screenUpdateThread->Start(threadId); + _screenUpdateThread->Start(); // Start the event triggering the render process unsigned int monitorFreq = 60; @@ -1881,7 +1878,7 @@ int32_t VideoRenderAGL::StartRender() //WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s:%d Rendering is paused. Restarting now", __FUNCTION__, __LINE__); // we already have the thread. Most likely StopRender() was called and they were paused - if(FALSE == _screenUpdateThread->Start(_threadID)) + if(FALSE == _screenUpdateThread->Start()) { //WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, "%s:%d Failed to start screenUpdateThread", __FUNCTION__, __LINE__); UnlockAGLCntx(); @@ -1907,7 +1904,7 @@ int32_t VideoRenderAGL::StartRender() return -1; } - _screenUpdateThread->Start(_threadID); + _screenUpdateThread->Start(); _screenUpdateEvent->StartTimer(true, 1000/MONITOR_FREQ); //WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s:%d Started screenUpdateThread", __FUNCTION__, __LINE__); diff --git a/webrtc/modules/video_render/mac/video_render_agl.h b/webrtc/modules/video_render/mac/video_render_agl.h index 1520b1eb0f..9846386197 100644 --- a/webrtc/modules/video_render/mac/video_render_agl.h +++ b/webrtc/modules/video_render/mac/video_render_agl.h @@ -168,8 +168,6 @@ class VideoRenderAGL { HIRect _currentViewBounds; HIRect _lastViewBounds; bool _renderingIsPaused; - unsigned int _threadID; - }; } // namespace webrtc diff --git a/webrtc/modules/video_render/mac/video_render_nsopengl.h b/webrtc/modules/video_render/mac/video_render_nsopengl.h index 66887f8154..3fb438aa44 100644 --- a/webrtc/modules/video_render/mac/video_render_nsopengl.h +++ b/webrtc/modules/video_render/mac/video_render_nsopengl.h @@ -179,7 +179,6 @@ private: // variables int _windowHeight; std::map _nsglChannels; std::multimap _zOrderToChannel; - unsigned int _threadID; bool _renderingIsPaused; NSView* _windowRefSuperView; NSRect _windowRefSuperViewFrame; diff --git a/webrtc/modules/video_render/mac/video_render_nsopengl.mm b/webrtc/modules/video_render/mac/video_render_nsopengl.mm index fa2210d13c..ca9a79ca7a 100644 --- a/webrtc/modules/video_render/mac/video_render_nsopengl.mm +++ b/webrtc/modules/video_render/mac/video_render_nsopengl.mm @@ -377,7 +377,6 @@ _windowWidth( 0), _windowHeight( 0), _nsglChannels( ), _zOrderToChannel( ), -_threadID (0), _renderingIsPaused (FALSE), _windowRefSuperView(NULL), _windowRefSuperViewFrame(NSMakeRect(0,0,0,0)) @@ -431,7 +430,7 @@ int32_t VideoRenderNSOpenGL::StartRender() WEBRTC_TRACE(kTraceDebug, kTraceVideoRenderer, _id, "Restarting screenUpdateThread"); // we already have the thread. Most likely StopRender() was called and they were paused - if(FALSE == _screenUpdateThread->Start(_threadID) || + if(FALSE == _screenUpdateThread->Start() || FALSE == _screenUpdateEvent->StartTimer(true, 1000/MONITOR_FREQ)) { WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, "Failed to restart screenUpdateThread or screenUpdateEvent"); @@ -718,7 +717,7 @@ int VideoRenderNSOpenGL::Init() return -1; } - _screenUpdateThread->Start(_threadID); + _screenUpdateThread->Start(); // Start the event triggering the render process unsigned int monitorFreq = 60; diff --git a/webrtc/modules/video_render/windows/video_render_direct3d9.cc b/webrtc/modules/video_render/windows/video_render_direct3d9.cc index 1d0ca56f27..1e8267a8a5 100644 --- a/webrtc/modules/video_render/windows/video_render_direct3d9.cc +++ b/webrtc/modules/video_render/windows/video_render_direct3d9.cc @@ -551,8 +551,7 @@ int32_t VideoRenderDirect3D9::Init() WEBRTC_TRACE(kTraceError, kTraceVideo, -1, "Thread not created"); return -1; } - unsigned int threadId; - _screenUpdateThread->Start(threadId); + _screenUpdateThread->Start(); // Start the event triggering the render process unsigned int monitorFreq = 60; diff --git a/webrtc/system_wrappers/interface/thread_wrapper.h b/webrtc/system_wrappers/interface/thread_wrapper.h index 53a2c0a738..af1405d45e 100644 --- a/webrtc/system_wrappers/interface/thread_wrapper.h +++ b/webrtc/system_wrappers/interface/thread_wrapper.h @@ -73,8 +73,7 @@ class ThreadWrapper { // Additionally, it tries to set thread priority according to the priority // from when CreateThread was called. However, failure to set priority will // not result in a false return value. - // TODO(tommi): Remove the id parameter. - virtual bool Start(unsigned int& id) = 0; + virtual bool Start() = 0; // Stops the spawned thread and waits for it to be reclaimed with a timeout // of two seconds. Will return false if the thread was not reclaimed. diff --git a/webrtc/system_wrappers/source/condition_variable_unittest.cc b/webrtc/system_wrappers/source/condition_variable_unittest.cc index 9b8a6dd858..9ca4ca98e5 100644 --- a/webrtc/system_wrappers/source/condition_variable_unittest.cc +++ b/webrtc/system_wrappers/source/condition_variable_unittest.cc @@ -146,8 +146,7 @@ class CondVarTest : public ::testing::Test { virtual void SetUp() { thread_ = ThreadWrapper::CreateThread(&WaitingRunFunction, &baton_); - unsigned int id = 42; - ASSERT_TRUE(thread_->Start(id)); + ASSERT_TRUE(thread_->Start()); } virtual void TearDown() { diff --git a/webrtc/system_wrappers/source/critical_section_unittest.cc b/webrtc/system_wrappers/source/critical_section_unittest.cc index d876b131e4..b291d39601 100644 --- a/webrtc/system_wrappers/source/critical_section_unittest.cc +++ b/webrtc/system_wrappers/source/critical_section_unittest.cc @@ -80,9 +80,8 @@ TEST_F(CritSectTest, ThreadWakesOnce) NO_THREAD_SAFETY_ANALYSIS { ProtectedCount count(crit_sect); ThreadWrapper* thread = ThreadWrapper::CreateThread( &LockUnlockThenStopRunFunction, &count); - unsigned int id = 42; crit_sect->Enter(); - ASSERT_TRUE(thread->Start(id)); + ASSERT_TRUE(thread->Start()); SwitchProcess(); // The critical section is of reentrant mode, so this should not release // the lock, even though count.Count() locks and unlocks the critical section @@ -109,9 +108,8 @@ TEST_F(CritSectTest, ThreadWakesTwice) NO_THREAD_SAFETY_ANALYSIS { ProtectedCount count(crit_sect); ThreadWrapper* thread = ThreadWrapper::CreateThread(&LockUnlockRunFunction, &count); - unsigned int id = 42; crit_sect->Enter(); // Make sure counter stays 0 until we wait for it. - ASSERT_TRUE(thread->Start(id)); + ASSERT_TRUE(thread->Start()); crit_sect->Leave(); // The thread is capable of grabbing the lock multiple times, diff --git a/webrtc/system_wrappers/source/data_log.cc b/webrtc/system_wrappers/source/data_log.cc index bf6b7b3670..41da872ba5 100644 --- a/webrtc/system_wrappers/source/data_log.cc +++ b/webrtc/system_wrappers/source/data_log.cc @@ -358,8 +358,7 @@ int DataLogImpl::Init() { "DataLog"); if (file_writer_thread_ == NULL) return -1; - unsigned int thread_id = 0; - bool success = file_writer_thread_->Start(thread_id); + bool success = file_writer_thread_->Start(); if (!success) return -1; return 0; diff --git a/webrtc/system_wrappers/source/event_posix.cc b/webrtc/system_wrappers/source/event_posix.cc index ef85b01595..c873e3a9da 100644 --- a/webrtc/system_wrappers/source/event_posix.cc +++ b/webrtc/system_wrappers/source/event_posix.cc @@ -205,8 +205,7 @@ bool EventPosix::StartTimer(bool periodic, unsigned long time) { thread_name); periodic_ = periodic; time_ = time; - unsigned int id = 0; - bool started = timer_thread_->Start(id); + bool started = timer_thread_->Start(); pthread_mutex_unlock(&mutex_); return started; diff --git a/webrtc/system_wrappers/source/thread_posix.cc b/webrtc/system_wrappers/source/thread_posix.cc index fe928ef50f..84ed52d168 100644 --- a/webrtc/system_wrappers/source/thread_posix.cc +++ b/webrtc/system_wrappers/source/thread_posix.cc @@ -62,18 +62,8 @@ int ConvertToSystemPriority(ThreadPriority priority, int min_prio, return low_prio; } -struct ThreadPosix::InitParams { - InitParams(ThreadPosix* thread) - : me(thread), started(EventWrapper::Create()) { - } - ThreadPosix* me; - rtc::scoped_ptr started; -}; - -// static void* ThreadPosix::StartThread(void* param) { - auto params = static_cast(param); - params->me->Run(params); + static_cast(param)->Run(); return 0; } @@ -82,9 +72,9 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj, : run_function_(func), obj_(obj), prio_(prio), + started_(false), stop_event_(true, false), name_(thread_name ? thread_name : "webrtc"), - thread_id_(0), thread_(0) { DCHECK(name_.length() < kThreadMaxNameLength); } @@ -97,44 +87,34 @@ ThreadPosix::~ThreadPosix() { DCHECK(thread_checker_.CalledOnValidThread()); } -bool ThreadPosix::Start(unsigned int& thread_id) { +// TODO(pbos): Make Start void, calling code really doesn't support failures +// here. +bool ThreadPosix::Start() { DCHECK(thread_checker_.CalledOnValidThread()); - DCHECK(!thread_id_) << "Thread already started?"; ThreadAttributes attr; // Set the stack stack size to 1M. pthread_attr_setstacksize(&attr, 1024 * 1024); - InitParams params(this); - int result = pthread_create(&thread_, &attr, &StartThread, ¶ms); - if (result != 0) - return false; - - CHECK_EQ(kEventSignaled, params.started->Wait(WEBRTC_EVENT_INFINITE)); - DCHECK_NE(thread_id_, 0); - - thread_id = thread_id_; - + CHECK_EQ(0, pthread_create(&thread_, &attr, &StartThread, this)); + started_ = true; return true; } bool ThreadPosix::Stop() { DCHECK(thread_checker_.CalledOnValidThread()); - if (!thread_id_) + if (!started_) return true; stop_event_.Set(); CHECK_EQ(0, pthread_join(thread_, nullptr)); - thread_id_ = 0; + started_ = false; stop_event_.Reset(); return true; } -void ThreadPosix::Run(ThreadPosix::InitParams* params) { - thread_id_ = rtc::CurrentThreadId(); - params->started->Set(); - +void ThreadPosix::Run() { if (!name_.empty()) { // Setting the thread name may fail (harmlessly) if running inside a // sandbox. Ignore failures if they happen. diff --git a/webrtc/system_wrappers/source/thread_posix.h b/webrtc/system_wrappers/source/thread_posix.h index ec9c10e983..c1cf8b5815 100644 --- a/webrtc/system_wrappers/source/thread_posix.h +++ b/webrtc/system_wrappers/source/thread_posix.h @@ -30,23 +30,22 @@ class ThreadPosix : public ThreadWrapper { ~ThreadPosix() override; // From ThreadWrapper. - bool Start(unsigned int& id) override; + bool Start() override; bool Stop() override; private: static void* StartThread(void* param); - struct InitParams; - void Run(InitParams* params); + void Run(); rtc::ThreadChecker thread_checker_; ThreadRunFunction const run_function_; void* const obj_; ThreadPriority prio_; + bool started_; rtc::Event stop_event_; const std::string name_; - pid_t thread_id_; pthread_t thread_; }; diff --git a/webrtc/system_wrappers/source/thread_unittest.cc b/webrtc/system_wrappers/source/thread_unittest.cc index a2228e6d19..99832d436d 100644 --- a/webrtc/system_wrappers/source/thread_unittest.cc +++ b/webrtc/system_wrappers/source/thread_unittest.cc @@ -24,8 +24,7 @@ bool NullRunFunction(void* obj) { TEST(ThreadTest, StartStop) { ThreadWrapper* thread = ThreadWrapper::CreateThread(&NullRunFunction, NULL); - unsigned int id = 42; - ASSERT_TRUE(thread->Start(id)); + ASSERT_TRUE(thread->Start()); EXPECT_TRUE(thread->Stop()); delete thread; } @@ -42,8 +41,7 @@ TEST(ThreadTest, RunFunctionIsCalled) { bool flag = false; ThreadWrapper* thread = ThreadWrapper::CreateThread(&SetFlagRunFunction, &flag); - unsigned int id = 42; - ASSERT_TRUE(thread->Start(id)); + ASSERT_TRUE(thread->Start()); // At this point, the flag may be either true or false. EXPECT_TRUE(thread->Stop()); diff --git a/webrtc/system_wrappers/source/thread_win.cc b/webrtc/system_wrappers/source/thread_win.cc index 67312fadd1..716434ae7b 100644 --- a/webrtc/system_wrappers/source/thread_win.cc +++ b/webrtc/system_wrappers/source/thread_win.cc @@ -81,7 +81,7 @@ DWORD WINAPI ThreadWindows::StartThread(void* param) { return 0; } -bool ThreadWindows::Start(unsigned int& id) { +bool ThreadWindows::Start() { DCHECK(main_thread_.CalledOnValidThread()); DCHECK(!thread_); @@ -98,8 +98,6 @@ bool ThreadWindows::Start(unsigned int& id) { return false; } - id = thread_id; - if (prio_ != kNormalPriority) { int priority = THREAD_PRIORITY_NORMAL; switch (prio_) { diff --git a/webrtc/system_wrappers/source/thread_win.h b/webrtc/system_wrappers/source/thread_win.h index 0da8a53a0d..1652551a7b 100644 --- a/webrtc/system_wrappers/source/thread_win.h +++ b/webrtc/system_wrappers/source/thread_win.h @@ -25,7 +25,7 @@ class ThreadWindows : public ThreadWrapper { const char* thread_name); ~ThreadWindows() override; - bool Start(unsigned int& id) override; + bool Start() override; bool Stop() override; protected: diff --git a/webrtc/test/channel_transport/udp_socket2_manager_win.cc b/webrtc/test/channel_transport/udp_socket2_manager_win.cc index a327822b8f..a7ac516685 100644 --- a/webrtc/test/channel_transport/udp_socket2_manager_win.cc +++ b/webrtc/test/channel_transport/udp_socket2_manager_win.cc @@ -540,10 +540,9 @@ UdpSocket2WorkerWindows::~UdpSocket2WorkerWindows() bool UdpSocket2WorkerWindows::Start() { - unsigned int id = 0; WEBRTC_TRACE(kTraceStateInfo, kTraceTransport, -1, "Start UdpSocket2WorkerWindows"); - return _pThread->Start(id); + return _pThread->Start(); } bool UdpSocket2WorkerWindows::Stop() diff --git a/webrtc/test/channel_transport/udp_socket_manager_posix.cc b/webrtc/test/channel_transport/udp_socket_manager_posix.cc index ad6ffa4a5c..22bdfb0973 100644 --- a/webrtc/test/channel_transport/udp_socket_manager_posix.cc +++ b/webrtc/test/channel_transport/udp_socket_manager_posix.cc @@ -226,7 +226,6 @@ UdpSocketManagerPosixImpl::~UdpSocketManagerPosixImpl() bool UdpSocketManagerPosixImpl::Start() { - unsigned int id = 0; if (_thread == NULL) { return false; @@ -234,7 +233,7 @@ bool UdpSocketManagerPosixImpl::Start() WEBRTC_TRACE(kTraceStateInfo, kTraceTransport, -1, "Start UdpSocketManagerPosix"); - return _thread->Start(id); + return _thread->Start(); } bool UdpSocketManagerPosixImpl::Stop() diff --git a/webrtc/test/direct_transport.cc b/webrtc/test/direct_transport.cc index 7bab23904d..4e7b9d01ec 100644 --- a/webrtc/test/direct_transport.cc +++ b/webrtc/test/direct_transport.cc @@ -24,8 +24,7 @@ DirectTransport::DirectTransport() clock_(Clock::GetRealTimeClock()), shutting_down_(false), fake_network_(FakeNetworkPipe::Config()) { - unsigned int thread_id; - EXPECT_TRUE(thread_->Start(thread_id)); + EXPECT_TRUE(thread_->Start()); } DirectTransport::DirectTransport( @@ -36,8 +35,7 @@ DirectTransport::DirectTransport( clock_(Clock::GetRealTimeClock()), shutting_down_(false), fake_network_(config) { - unsigned int thread_id; - EXPECT_TRUE(thread_->Start(thread_id)); + EXPECT_TRUE(thread_->Start()); } DirectTransport::~DirectTransport() { StopSending(); } diff --git a/webrtc/test/fake_audio_device.cc b/webrtc/test/fake_audio_device.cc index 989c12b7fd..41e304f4b3 100644 --- a/webrtc/test/fake_audio_device.cc +++ b/webrtc/test/fake_audio_device.cc @@ -59,8 +59,7 @@ int32_t FakeAudioDevice::Init() { FakeAudioDevice::Run, this, webrtc::kHighPriority, "FakeAudioDevice")); if (thread_.get() == NULL) return -1; - unsigned int thread_id; - if (!thread_->Start(thread_id)) { + if (!thread_->Start()) { thread_.reset(); return -1; } diff --git a/webrtc/test/frame_generator_capturer.cc b/webrtc/test/frame_generator_capturer.cc index 721c29af41..9782da03e4 100644 --- a/webrtc/test/frame_generator_capturer.cc +++ b/webrtc/test/frame_generator_capturer.cc @@ -96,8 +96,7 @@ bool FrameGeneratorCapturer::Init() { "FrameGeneratorCapturer")); if (thread_.get() == NULL) return false; - unsigned int thread_id; - if (!thread_->Start(thread_id)) { + if (!thread_->Start()) { thread_.reset(); return false; } diff --git a/webrtc/video/full_stack.cc b/webrtc/video/full_stack.cc index 033bf4fc51..e728a00355 100644 --- a/webrtc/video/full_stack.cc +++ b/webrtc/video/full_stack.cc @@ -111,8 +111,7 @@ class VideoAnalyzer : public PacketReceiver, ThreadWrapper* thread = ThreadWrapper::CreateThread(&FrameComparisonThread, this); comparison_thread_pool_.push_back(thread); - unsigned int id; - EXPECT_TRUE(thread->Start(id)); + EXPECT_TRUE(thread->Start()); } } diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_win.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_win.cc index 2967e7e277..eaf38e60a7 100755 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_win.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_win.cc @@ -86,8 +86,7 @@ int ViEAutoTestWindowManager::CreateWindows(AutoTestRect window1Size, memcpy(_hwnd1Title, window1Title, TITLE_LENGTH); memcpy(_hwnd2Title, window2Title, TITLE_LENGTH); - unsigned int tId = 0; - _eventThread.Start(tId); + _eventThread.Start(); do { _crit.Enter(); diff --git a/webrtc/video_engine/test/libvietest/helpers/vie_fake_camera.cc b/webrtc/video_engine/test/libvietest/helpers/vie_fake_camera.cc index 8699f04aeb..a2d61c6d6a 100644 --- a/webrtc/video_engine/test/libvietest/helpers/vie_fake_camera.cc +++ b/webrtc/video_engine/test/libvietest/helpers/vie_fake_camera.cc @@ -64,8 +64,7 @@ bool ViEFakeCamera::StartCameraInNewThread( // thread-safe. camera_thread_ = webrtc::ThreadWrapper::CreateThread( StreamVideoFileRepeatedlyIntoCaptureDevice, file_capture_device_); - unsigned int id; - camera_thread_->Start(id); + camera_thread_->Start(); return true; } diff --git a/webrtc/video_engine/test/libvietest/helpers/vie_to_file_renderer.cc b/webrtc/video_engine/test/libvietest/helpers/vie_to_file_renderer.cc index 27fa3cc627..640d9c6938 100644 --- a/webrtc/video_engine/test/libvietest/helpers/vie_to_file_renderer.cc +++ b/webrtc/video_engine/test/libvietest/helpers/vie_to_file_renderer.cc @@ -65,8 +65,7 @@ bool ViEToFileRenderer::PrepareForRendering( output_filename_ = output_filename; output_path_ = output_path; - unsigned int tid; - return thread_->Start(tid); + return thread_->Start(); } void ViEToFileRenderer::StopRendering() { diff --git a/webrtc/video_engine/test/libvietest/testbed/tb_external_transport.cc b/webrtc/video_engine/test/libvietest/testbed/tb_external_transport.cc index 98f290ecb9..441b7664c7 100644 --- a/webrtc/video_engine/test/libvietest/testbed/tb_external_transport.cc +++ b/webrtc/video_engine/test/libvietest/testbed/tb_external_transport.cc @@ -76,9 +76,8 @@ TbExternalTransport::TbExternalTransport( previous_drop_(false) { srand((int) webrtc::TickTime::MicrosecondTimestamp()); - unsigned int tId = 0; memset(&network_parameters_, 0, sizeof(NetworkParameters)); - _thread.Start(tId); + _thread.Start(); } TbExternalTransport::~TbExternalTransport() diff --git a/webrtc/video_engine/vie_capturer.cc b/webrtc/video_engine/vie_capturer.cc index b35be3e763..75bb623980 100644 --- a/webrtc/video_engine/vie_capturer.cc +++ b/webrtc/video_engine/vie_capturer.cc @@ -88,8 +88,7 @@ ViECapturer::ViECapturer(int capture_id, overuse_detector_( new OveruseFrameDetector(Clock::GetRealTimeClock(), cpu_overuse_metrics_observer_.get())) { - unsigned int t_id = 0; - if (!capture_thread_.Start(t_id)) { + if (!capture_thread_.Start()) { assert(false); } module_process_thread_.RegisterModule(overuse_detector_.get()); diff --git a/webrtc/video_engine/vie_channel.cc b/webrtc/video_engine/vie_channel.cc index 1101213ca5..bbf5d535ad 100644 --- a/webrtc/video_engine/vie_channel.cc +++ b/webrtc/video_engine/vie_channel.cc @@ -1846,8 +1846,7 @@ int32_t ViEChannel::StartDecodeThread() { return -1; } - unsigned int thread_id; - if (decode_thread_->Start(thread_id) == false) { + if (decode_thread_->Start() == false) { delete decode_thread_; decode_thread_ = NULL; LOG(LS_ERROR) << "Could not start decode thread."; diff --git a/webrtc/voice_engine/test/android/android_test/jni/android_test.cc b/webrtc/voice_engine/test/android/android_test/jni/android_test.cc index 28eeef0a00..4f8d89e3e4 100644 --- a/webrtc/voice_engine/test/android/android_test/jni/android_test.cc +++ b/webrtc/voice_engine/test/android/android_test/jni/android_test.cc @@ -281,8 +281,7 @@ int ThreadTest::RunTest() { if (_thread) { - unsigned int id; - _thread->Start(id); + _thread->Start(); } return 0; } diff --git a/webrtc/voice_engine/test/auto_test/fakes/fake_external_transport.cc b/webrtc/voice_engine/test/auto_test/fakes/fake_external_transport.cc index ae387fe761..4008e71166 100644 --- a/webrtc/voice_engine/test/auto_test/fakes/fake_external_transport.cc +++ b/webrtc/voice_engine/test/auto_test/fakes/fake_external_transport.cc @@ -31,8 +31,7 @@ FakeExternalTransport::FakeExternalTransport(webrtc::VoENetwork* ptr) thread_ = webrtc::ThreadWrapper::CreateThread( Run, this, webrtc::kHighPriority, thread_name); if (thread_) { - unsigned int id; - thread_->Start(id); + thread_->Start(); } } diff --git a/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h b/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h index 67f5af3a70..3383a53bd2 100644 --- a/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h +++ b/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h @@ -31,8 +31,7 @@ class LoopBackTransport : public webrtc::Transport { packet_event_(webrtc::EventWrapper::Create()), thread_(webrtc::ThreadWrapper::CreateThread(NetworkProcess, this)), voe_network_(voe_network), transmitted_packets_(0) { - unsigned int id; - thread_->Start(id); + thread_->Start(); } ~LoopBackTransport() { thread_->Stop(); } diff --git a/webrtc/voice_engine/test/auto_test/voe_stress_test.cc b/webrtc/voice_engine/test/auto_test/voe_stress_test.cc index ec4e92b698..7376855cdc 100644 --- a/webrtc/voice_engine/test/auto_test/voe_stress_test.cc +++ b/webrtc/voice_engine/test/auto_test/voe_stress_test.cc @@ -338,8 +338,7 @@ int VoEStressTest::MultipleThreadsTest() { const char* threadName = "StressTest Extra API Thread"; _ptrExtraApiThread = ThreadWrapper::CreateThread(RunExtraApi, this, kNormalPriority, threadName); - unsigned int id(0); - VALIDATE_STRESS(!_ptrExtraApiThread->Start(id)); + VALIDATE_STRESS(!_ptrExtraApiThread->Start()); // Some possible extensions include: // Add more API calls to randomize