Remove the timeout parameter from WelsMultipleEventsWaitSingleBlocking

All users of the function passed the value corresponding to
"infinite", and the (currently unused) unix implementation of it
only supported infinite wait as well.
This commit is contained in:
Martin Storsjö 2014-03-03 21:33:42 +02:00
parent 201ab42d7e
commit de32455d87
4 changed files with 6 additions and 11 deletions

View File

@ -118,9 +118,8 @@ WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t
}
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount,
WELS_EVENT* event_list,
uint32_t dwMilliseconds) {
return WaitForMultipleObjects (nCount, event_list, FALSE, dwMilliseconds);
WELS_EVENT* event_list) {
return WaitForMultipleObjects (nCount, event_list, FALSE, INFINITE);
}
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitAllBlocking (uint32_t nCount, WELS_EVENT* event_list) {
@ -339,8 +338,7 @@ WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t
}
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount,
WELS_EVENT* event_list,
uint32_t dwMilliseconds) {
WELS_EVENT* event_list) {
uint32_t nIdx = 0;
const uint32_t kuiAccessTime = 2; // 2 us once

View File

@ -110,8 +110,7 @@ WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_n
WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event);
WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event);
WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t dwMilliseconds);
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount, WELS_EVENT* event_list,
uint32_t dwMilliseconds);
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount, WELS_EVENT* event_list);
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitAllBlocking (uint32_t nCount, WELS_EVENT* event_list);
WELS_THREAD_ERROR_CODE WelsThreadCreate (WELS_THREAD_HANDLE* thread, LPWELS_THREAD_ROUTINE routine,

View File

@ -3271,8 +3271,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo * pFbi, const SSou
int32_t iEventId = -1;
lwait = WelsMultipleEventsWaitSingleBlocking (iNumThreadsScheduled,
&pCtx->pSliceThreading->pSliceCodedEvent[0],
(uint32_t) -1);
&pCtx->pSliceThreading->pSliceCodedEvent[0]);
iEventId = (int32_t) (lwait - WELS_THREAD_ERROR_WAIT_OBJECT_0);
if (iEventId >= 0 && iEventId < iNumThreadsScheduled) {
if (iIndexOfSliceToBeCoded < iSliceCount) {

View File

@ -749,8 +749,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) {
do {
#ifdef _WIN32
iWaitRet = WelsMultipleEventsWaitSingleBlocking (iEventCount,
&pEventsList[0],
(uint32_t) - 1); // blocking until at least one event is
&pEventsList[0]); // blocking until at least one event is
#else
MT_TRACE_LOG (pEncPEncCtx, WELS_LOG_INFO,
"[MT] CodingSliceThreadProc(), try to call WelsEventWait(pReadySliceCodingEvent[%d]= 0x%p), pEncPEncCtx= 0x%p!\n",