[Mplayerplug-in-cvs] mplayerplug-in/Source plugin-threads.cpp, 1.228, 1.229
Brought to you by:
kdekorte
From: Kevin D. <kde...@us...> - 2006-06-08 01:45:11
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22278/Source Modified Files: plugin-threads.cpp Log Message: Change player FD from NON_BLOCK to ASYNC mode. Uses much less CPU Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.228 retrieving revision 1.229 diff -C2 -d -r1.228 -r1.229 *** plugin-threads.cpp 7 Jun 2006 03:21:52 -0000 1.228 --- plugin-threads.cpp 7 Jun 2006 13:18:35 -0000 1.229 *************** *** 236,243 **** retfd = fdopen(filedesr[0], "r"); flags = fcntl(fileno(retfd), F_GETFL, 0); ! flags |= O_NONBLOCK; ! #ifndef BSD ! flags |= O_NDELAY; ! #endif fcntl(fileno(retfd), F_SETFL, flags); --- 236,240 ---- retfd = fdopen(filedesr[0], "r"); flags = fcntl(fileno(retfd), F_GETFL, 0); ! flags |= O_ASYNC; fcntl(fileno(retfd), F_SETFL, flags); *************** *** 804,808 **** && (local_td->instance->player != NULL)) { // c = fgetc(local_td->instance->player); ! amt = fread(&c, 1, 1, local_td->instance->player); } else { c = EOF; --- 801,805 ---- && (local_td->instance->player != NULL)) { // c = fgetc(local_td->instance->player); ! amt = fread(&c, 1, 1, local_td->instance->player); } else { c = EOF; *************** *** 1414,1418 **** assert(local_td->instance->player != NULL); - } // end of READ LOOP --- 1411,1414 ---- |