From 17e8ad9c4b8fbdebec4559702b82114fb6543b67 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Tue, 15 Jun 2010 12:34:50 -0700 Subject: 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. Change-Id: I01843f24905790ce2e2cde5d11a99346cfbf968d --- media/libstagefright/TimedEventQueue.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp index 3de8c1d..0dacb53 100644 --- a/media/libstagefright/TimedEventQueue.cpp +++ b/media/libstagefright/TimedEventQueue.cpp @@ -22,11 +22,13 @@ //#define LOG_NDEBUG 0 #define LOG_TAG "TimedEventQueue" #include +#include #include "include/TimedEventQueue.h" #include #include +#include #include @@ -206,6 +208,7 @@ void *TimedEventQueue::ThreadWrapper(void *me) { vm->AttachCurrentThread(&env, NULL); #endif + setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_FOREGROUND); static_cast(me)->threadEntry(); #ifdef ANDROID_SIMULATOR -- cgit v1.1