History

Unify ifdef conditions related to threading code

The two different variants of the threadlib basically are win32 and unix - use _WIN32 to check for this consistently, instead of occasionally using __GNUC__ to enable the unix codepath. (__GNUC__ is also defined on mingw, which still is a windows platform and should use the _WIN32 code.)

Martin Storsjö committed 12 years ago

Commit e0951591 parent c7d98a86 files · +19 −25Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+2−2
@@ -2171,7 +2171,7 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 2170 unmodified lines
2171 WelsMultipleEventsWaitAllBlocking (iThreadCount, & (*ppCtx)->pSliceThreading->pFinSliceCodingEvent[0]);2171 WelsMultipleEventsWaitAllBlocking (iThreadCount, & (*ppCtx)->pSliceThreading->pFinSliceCodingEvent[0]);
2172 2172
2173 }2173 }
2174#elif defined(__GNUC__)2174#else
2175 while (iThreadIdx < iThreadCount) {2175 while (iThreadIdx < iThreadCount) {
2176 int res = 0;2176 int res = 0;
2177 if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {2177 if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {
@@ -3300,7 +3300,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo * pFbi, const SSou · 1122 unmodified lines
3300 } else {3300 } else {
3301 WelsSleep (1);3301 WelsSleep (1);
3302 }3302 }
3303#else//__GNUC__3303#else
3304 // TODO for pthread platforms3304 // TODO for pthread platforms
3305 // alternate implementation using blocking due non-blocking with timeout mode not support at wels thread lib, tune back if available3305 // alternate implementation using blocking due non-blocking with timeout mode not support at wels thread lib, tune back if available
3306 WelsMultipleEventsWaitAllBlocking (iNumThreadsRunning, &pCtx->pSliceThreading->pSliceCodedEvent[0]);3306 WelsMultipleEventsWaitAllBlocking (iNumThreadsRunning, &pCtx->pSliceThreading->pSliceCodedEvent[0]);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t