Remove thread id from ThreadWrapper::Start().
Removes ThreadPosix::InitParams and a corresponding wait for an event.
This unblocks ThreadPosix::Start which had to wait for thread scheduling
for an event to trigger on the spawned thread, giving faster Start()
calls.
BUG=4413
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/43699004
Cr-Commit-Position: refs/heads/master@{#8709}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8709 4adac7df-926f-26a2-2b94-8c16560cd09d
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 8527767..17be285 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 @@
}
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 e299401..136e414 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 @@
}
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 cf21343..4f1aa03 100644
--- a/webrtc/modules/audio_coding/main/test/APITest.cc
+++ b/webrtc/modules/audio_coding/main/test/APITest.cc
@@ -38,8 +38,7 @@
#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 5a90416..359625b 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 @@
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 5b5cdfd..2cea3b4 100644
--- a/webrtc/modules/audio_device/android/opensles_input.cc
+++ b/webrtc/modules/audio_device/android/opensles_input.cc
@@ -475,8 +475,7 @@
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 8b33b22..c46aa84 100644
--- a/webrtc/modules/audio_device/android/opensles_output.cc
+++ b/webrtc/modules/audio_device/android/opensles_output.cc
@@ -520,8 +520,7 @@
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 28dc389..c3abcf9 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 @@
_playoutFramesIn10MS(0),
_ptrThreadRec(NULL),
_ptrThreadPlay(NULL),
- _recThreadID(0),
- _playThreadID(0),
_playing(false),
_recording(false),
_lastCallPlayoutMillis(0),
@@ -230,8 +228,7 @@
return -1;
}
- unsigned int threadID(0);
- if (!_ptrThreadPlay->Start(threadID)) {
+ if (!_ptrThreadPlay->Start()) {
_playing = false;
delete _ptrThreadPlay;
_ptrThreadPlay = NULL;
@@ -239,7 +236,6 @@
_playoutBuffer = NULL;
return -1;
}
- _playThreadID = threadID;
return 0;
}
@@ -307,8 +303,7 @@
return -1;
}
- unsigned int threadID(0);
- if (!_ptrThreadRec->Start(threadID)) {
+ if (!_ptrThreadRec->Start()) {
_recording = false;
delete _ptrThreadRec;
_ptrThreadRec = NULL;
@@ -316,7 +311,6 @@
_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 14936f5..c3e0bae 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 @@
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 2a48845..04e9340 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 @@
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 19dcfdf..ee4b4bb 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 @@
_ptrAudioBuffer(NULL),
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_captureWorkerThread(NULL),
- _captureWorkerThreadId(0),
_id(id),
_auVoiceProcessing(NULL),
_audioInterruptionObserver(NULL),
@@ -120,9 +119,7 @@
return -1;
}
- unsigned int threadID(0);
- bool res = _captureWorkerThread->Start(threadID);
- _captureWorkerThreadId = static_cast<uint32_t>(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 065adcf..deabe5e 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 @@
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_ptrThreadRec(NULL),
_ptrThreadPlay(NULL),
- _recThreadID(0),
- _playThreadID(0),
_id(id),
_mixerManager(id),
_inputDeviceIndex(0),
@@ -1401,8 +1399,7 @@
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 @@
_recordingBuffer = NULL;
return -1;
}
- _recThreadID = threadID;
errVal = LATE(snd_pcm_prepare)(_handleRecord);
if (errVal < 0)
@@ -1573,8 +1569,7 @@
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 @@
_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 d5be88c..f3e8f40 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 @@
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 7245a42..5504c1c 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 @@
_playStartEvent(*EventWrapper::Create()),
_ptrThreadPlay(NULL),
_ptrThreadRec(NULL),
- _recThreadID(0),
- _playThreadID(0),
_id(id),
_mixerManager(id),
_inputDeviceIndex(0),
@@ -221,8 +219,7 @@
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 @@
_ptrThreadRec = NULL;
return -1;
}
- _recThreadID = threadID;
// PLAYOUT
threadName = "webrtc_audio_module_play_thread";
@@ -244,8 +240,7 @@
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 @@
_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 1644df9..f1a3332 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 @@
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 4e4ea12..dba80db 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 @@
_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 @@
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 @@
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 7754f56..a1a292d 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 @@
// Only valid/running between calls to StartRecording and StopRecording.
rtc::scoped_ptr<ThreadWrapper> capture_worker_thread_;
- unsigned int capture_worker_thread_id_;
// Only valid/running between calls to StartPlayout and StopPlayout.
rtc::scoped_ptr<ThreadWrapper> 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 8fcb43f..429d7bd 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 @@
_hShutdownSetVolumeEvent(NULL),
_hSetCaptureVolumeEvent(NULL),
_ptrThread(NULL),
- _threadID(0),
_critSectCb(*CriticalSectionWrapper::CreateCriticalSection()),
_id(id),
_mixerManager(id),
@@ -242,8 +241,7 @@
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 @@
_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 1767b90..d23618e 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 @@
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 77eb6a1..446bbe9 100644
--- a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/MatlabPlot.cc
+++ b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/MatlabPlot.cc
@@ -907,9 +907,7 @@
_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 b22f64e..5057de0 100644
--- a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestLoadGenerator.cc
+++ b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestLoadGenerator.cc
@@ -87,8 +87,7 @@
_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 bf84e35..e87eaca 100644
--- a/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.cc
+++ b/webrtc/modules/rtp_rtcp/test/BWEStandAlone/TestSenderReceiver.cc
@@ -183,8 +183,7 @@
}
}
- 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 8268fff..42c5924 100644
--- a/webrtc/modules/utility/source/process_thread_impl.cc
+++ b/webrtc/modules/utility/source/process_thread_impl.cc
@@ -71,8 +71,7 @@
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 9e7a8f1..f3b0c16 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 @@
{
_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 e78fedc..cd0c5b7 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 @@
if (mainSenderThread != NULL)
{
- unsigned int tid;
- mainSenderThread->Start(tid);
+ mainSenderThread->Start();
}
else
{
@@ -286,8 +285,7 @@
if (intSenderThread != NULL)
{
- unsigned int tid;
- intSenderThread->Start(tid);
+ intSenderThread->Start();
}
else
{
@@ -303,8 +301,7 @@
if (processingThread != NULL)
{
- unsigned int tid;
- processingThread->Start(tid);
+ processingThread->Start();
}
else
{
@@ -314,8 +311,7 @@
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 41ae349..32faf70 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 @@
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 35f1f17..89a1ae7 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 @@
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 f6ee7e4..1fbd886 100644
--- a/webrtc/modules/video_render/incoming_video_stream.cc
+++ b/webrtc/modules/video_render/incoming_video_stream.cc
@@ -187,10 +187,9 @@
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 2e48c4f..ff5776a 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 @@
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 7a1dbed..72b57fa 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 @@
_currentViewBounds( ),
_lastViewBounds( ),
_renderingIsPaused( false),
-_threadID( )
{
//WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s");
@@ -511,7 +510,6 @@
_currentViewBounds( ),
_lastViewBounds( ),
_renderingIsPaused( false),
-_threadID( )
{
//WEBRTC_TRACE(kTraceDebug, "%s:%d Constructor", __FUNCTION__, __LINE__);
// _renderCritSec = CriticalSectionWrapper::CreateCriticalSection();
@@ -744,8 +742,7 @@
//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 @@
//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 @@
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 1520b1e..9846386 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 @@
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 66887f8..3fb438a 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 @@
int _windowHeight;
std::map<int, VideoChannelNSOpenGL*> _nsglChannels;
std::multimap<int, int> _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 fa2210d..ca9a79c 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 @@
_windowHeight( 0),
_nsglChannels( ),
_zOrderToChannel( ),
-_threadID (0),
_renderingIsPaused (FALSE),
_windowRefSuperView(NULL),
_windowRefSuperViewFrame(NSMakeRect(0,0,0,0))
@@ -431,7 +430,7 @@
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 @@
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 1d0ca56..1e8267a 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 @@
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;