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

Method Init

codec/common/src/WelsThreadPool.cpp:162–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162WELS_THREAD_ERROR_CODE CWelsThreadPool::Init() {
163 //fprintf(stdout, "Enter WelsThreadPool Init\n");
164
165 CWelsAutoLock cLock (m_cLockPool);
166
167 m_cWaitedTasks = new CWelsNonDuplicatedList<IWelsTask>();
168 m_cIdleThreads = new CWelsNonDuplicatedList<CWelsTaskThread>();
169 m_cBusyThreads = new CWelsList<CWelsTaskThread>();
170 if (NULL == m_cWaitedTasks || NULL == m_cIdleThreads || NULL == m_cBusyThreads) {
171 return WELS_THREAD_ERROR_GENERAL;
172 }
173
174 for (int32_t i = 0; i < m_iMaxThreadNum; i++) {
175 if (WELS_THREAD_ERROR_OK != CreateIdleThread()) {
176 return WELS_THREAD_ERROR_GENERAL;
177 }
178 }
179
180 if (WELS_THREAD_ERROR_OK != Start()) {
181 return WELS_THREAD_ERROR_GENERAL;
182 }
183
184 return WELS_THREAD_ERROR_OK;
185}
186
187WELS_THREAD_ERROR_CODE CWelsThreadPool::StopAllRunning() {
188 WELS_THREAD_ERROR_CODE iReturn = WELS_THREAD_ERROR_OK;

Callers 1

AddReferenceMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected