History

[Encoder] add encoder tasks and task-management class https://rbcommons.com/s/OpenH264/r/1334/

Sijia Chen committed 11 years ago

Commit 819f6f51 parent 490098919 files · +904 −7Browse files

Showing the changes to codec/common/src/WelsThreadLib.cpp (1 of 19 files). Show all

Unified · Split

codec/common/src/WelsThreadLib.cpp+5−5
@@ -302,7 +302,7 @@ WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT* p_event, const char* event_ · 301 unmodified lines
302302 if (p_event == NULL) {
303303 return WELS_THREAD_ERROR_GENERAL;
304304 }
305− char strSuffix[16] = { 0 };
305+ char strSuffix[100] = { 0 };
306306 if (NULL == event_name) {
307307 sprintf (strSuffix, "WelsSem%ld_p%ld", (intptr_t)p_event, (long) (getpid()));
308308 event_name = &strSuffix[0];
@@ -341,6 +341,10 @@ WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_n · 32 unmodified lines
341341 #endif
342342 }
343343
344+void WelsSleep (uint32_t dwMilliSecond) {
345+ usleep (dwMilliSecond * 1000);
346+}
347+
344348 WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event) {
345349 WELS_THREAD_ERROR_CODE err = 0;
346350 // int32_t val = 0;
@@ -356,10 +360,6 @@ WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event) { · 9 unmodified lines
356360 return sem_wait (*event); // blocking until signaled
357361 }
358362
359−void WelsSleep (uint32_t dwMilliSecond) {
360− usleep (dwMilliSecond * 1000);
361−}
362−
363363 WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t dwMilliseconds) {
364364 if (dwMilliseconds != (uint32_t) - 1) {
365365 return sem_wait (*event);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t