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

Function SemWait

codec/decoder/core/src/wels_decoder_thread.cpp:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103int SemWait (SWelsDecSemphore* s, int32_t timeout) {
104 DWORD result;
105 if ((uint32_t)timeout == WELS_DEC_THREAD_WAIT_INFINITE || timeout < 0)
106 result = WaitForSingleObject (s->h, INFINITE);
107 else
108 result = WaitForSingleObject (s->h, timeout);
109
110 if (result == WAIT_OBJECT_0) {
111 return WELS_DEC_THREAD_WAIT_SIGNALED;
112 } else {
113 return WELS_DEC_THREAD_WAIT_TIMEDOUT;
114 }
115}
116
117void SemRelease (SWelsDecSemphore* s, long* prevcount) {
118 ReleaseSemaphore (s->h, 1, prevcount);

Callers

nothing calls this directly

Calls 1

getTimespecFromTimeoutFunction · 0.85

Tested by

no test coverage detected