| 324 | } |
| 325 | } |
| 326 | void CWelsDecoder::CloseDecoderThreads() { |
| 327 | if (m_iThreadCount >= 1) { |
| 328 | SET_EVENT (&m_sReleaseBufferEvent); |
| 329 | for (int32_t i = 0; i < m_iThreadCount; i++) { //waiting the completion begun slices |
| 330 | WAIT_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle, WELS_DEC_THREAD_WAIT_INFINITE); |
| 331 | m_pDecThrCtx[i].sThreadInfo.uiCommand = WELS_DEC_THREAD_COMMAND_ABORT; |
| 332 | RELEASE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated); |
| 333 | WAIT_THREAD (&m_pDecThrCtx[i].sThreadInfo.sThrHandle); |
| 334 | CLOSE_EVENT (&m_pDecThrCtx[i].sImageReady); |
| 335 | CLOSE_EVENT (&m_pDecThrCtx[i].sSliceDecodeStart); |
| 336 | CLOSE_EVENT (&m_pDecThrCtx[i].sSliceDecodeFinish); |
| 337 | CLOSE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle); |
| 338 | CLOSE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated); |
| 339 | } |
| 340 | WelsMutexDestroy (&m_csDecoder); |
| 341 | CLOSE_EVENT (&m_sBufferingEvent); |
| 342 | CLOSE_EVENT (&m_sReleaseBufferEvent); |
| 343 | CLOSE_SEMAPHORE (&m_sIsBusy); |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | void CWelsDecoder::UninitDecoderCtx (PWelsDecoderContext& pCtx) { |
| 348 | if (pCtx != NULL) { |
nothing calls this directly
no test coverage detected