MCPcopy Create free account
hub / github.com/cisco/openh264 / CloseDecoderThreads

Method CloseDecoderThreads

codec/decoder/plus/src/welsDecoderExt.cpp:326–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324 }
325}
326void 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
347void CWelsDecoder::UninitDecoderCtx (PWelsDecoderContext& pCtx) {
348 if (pCtx != NULL) {

Callers

nothing calls this directly

Calls 1

WelsMutexDestroyFunction · 0.85

Tested by

no test coverage detected