Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 14 files). Show all
Unified · Split
| @@ -41,7 +41,7 @@ · 40 unmodified lines | |||
| 41 | #if defined(MT_ENABLED) | 41 | #if defined(MT_ENABLED) |
| 42 | 42 | ||
| 43 | #include <assert.h> | 43 | #include <assert.h> |
| 44 | #ifdef __GNUC__ | 44 | #if defined(__GNUC__) && !defined(_WIN32) |
| 45 | #include <semaphore.h> | 45 | #include <semaphore.h> |
| 46 | #ifndef SEM_NAME_MAX | 46 | #ifndef SEM_NAME_MAX |
| 47 | // length of semaphore name should be system constrained at least on mac 10.7 | 47 | // length of semaphore name should be system constrained at least on mac 10.7 |
| @@ -441,7 +441,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 393 unmodified lines | |||
| 441 | 441 | ||
| 442 | iIdx = 0; | 442 | iIdx = 0; |
| 443 | while (iIdx < iThreadNum) { | 443 | while (iIdx < iThreadNum) { |
| 444 | #ifdef __GNUC__ // for posix threading | 444 | #if defined(__GNUC__) && !defined(_WIN32) // for posix threading |
| 445 | str_t name[SEM_NAME_MAX] = {0}; | 445 | str_t name[SEM_NAME_MAX] = {0}; |
| 446 | int32_t used_len = 0; | 446 | int32_t used_len = 0; |
| 447 | WELS_THREAD_ERROR_CODE err = 0; | 447 | WELS_THREAD_ERROR_CODE err = 0; |
| @@ -852,7 +852,7 @@ int32_t WriteSliceBs (sWelsEncCtx* pCtx, uint8_t* pSliceBsBuf, const int32_t iSl · 404 unmodified lines | |||
| 852 | } | 852 | } |
| 853 | 853 | ||
| 854 | #if defined(DYNAMIC_SLICE_ASSIGN) && defined(TRY_SLICING_BALANCE) | 854 | #if defined(DYNAMIC_SLICE_ASSIGN) && defined(TRY_SLICING_BALANCE) |
| 855 | #if defined(__GNUC__) | 855 | #if defined(__GNUC__) && !defined(_WIN32) |
| 856 | WELS_THREAD_ROUTINE_TYPE UpdateMbListThreadProc (void* arg) { | 856 | WELS_THREAD_ROUTINE_TYPE UpdateMbListThreadProc (void* arg) { |
| 857 | SSliceThreadPrivateData* pPrivateData = (SSliceThreadPrivateData*)arg; | 857 | SSliceThreadPrivateData* pPrivateData = (SSliceThreadPrivateData*)arg; |
| 858 | sWelsEncCtx* pEncPEncCtx = NULL; | 858 | sWelsEncCtx* pEncPEncCtx = NULL; |
| @@ -1243,7 +1243,7 @@ int32_t CreateSliceThreads (sWelsEncCtx* pCtx) { · 384 unmodified lines | |||
| 1243 | // due to WelsMultipleEventsWaitSingleBlocking implememtation can not work well | 1243 | // due to WelsMultipleEventsWaitSingleBlocking implememtation can not work well |
| 1244 | // in case waiting pUpdateMbListEvent and pReadySliceCodingEvent events at the same time | 1244 | // in case waiting pUpdateMbListEvent and pReadySliceCodingEvent events at the same time |
| 1245 | #if defined(DYNAMIC_SLICE_ASSIGN) && defined(TRY_SLICING_BALANCE) | 1245 | #if defined(DYNAMIC_SLICE_ASSIGN) && defined(TRY_SLICING_BALANCE) |
| 1246 | #if defined(__GNUC__) | 1246 | #if defined(__GNUC__) && !defined(_WIN32) |
| 1247 | WelsThreadCreate (&pCtx->pSliceThreading->pUpdateMbListThrdHandles[iIdx], UpdateMbListThreadProc, | 1247 | WelsThreadCreate (&pCtx->pSliceThreading->pUpdateMbListThrdHandles[iIdx], UpdateMbListThreadProc, |
| 1248 | &pCtx->pSliceThreading->pThreadPEncCtx[iIdx], 0); | 1248 | &pCtx->pSliceThreading->pThreadPEncCtx[iIdx], 0); |
| 1249 | #endif//__GNUC__ | 1249 | #endif//__GNUC__ |