diff options
| author | 2010-06-16 14:11:40 -0700 | |
|---|---|---|
| committer | 2010-06-16 14:11:40 -0700 | |
| commit | 3242cc2719a4aeb64ac5ed273cf222d8d326d44b (patch) | |
| tree | b3b5c92ba703bc23bf534373a2bf7439cdb040ea | |
| parent | 821ca51857f4d21b231cd9ead786227b771fe759 (diff) | |
| parent | cad5726e3a0920d09cac391121314e0e40f38fd2 (diff) | |
Merge "TimedEventQueue is apparently important for glitch-free media playback, and so having it inherit its priority from the thread that created it is a bad idea. Instead, set the priority explicitly, and bump it to slightly higher than normal." into froyo
| -rw-r--r-- | media/libstagefright/TimedEventQueue.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp index 3de8c1d85971..0dacb53efa16 100644 --- a/media/libstagefright/TimedEventQueue.cpp +++ b/media/libstagefright/TimedEventQueue.cpp @@ -22,11 +22,13 @@ //#define LOG_NDEBUG 0 #define LOG_TAG "TimedEventQueue" #include <utils/Log.h> +#include <utils/threads.h> #include "include/TimedEventQueue.h" #include <sys/prctl.h> #include <sys/time.h> +#include <sys/resource.h> #include <media/stagefright/MediaDebug.h> @@ -206,6 +208,7 @@ void *TimedEventQueue::ThreadWrapper(void *me) { vm->AttachCurrentThread(&env, NULL); #endif + setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_FOREGROUND); static_cast<TimedEventQueue *>(me)->threadEntry(); #ifdef ANDROID_SIMULATOR |