am f3c6c982: am 3242cc27: 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 norm

Merge commit 'f3c6c982f68e6ada3cded6923301d2f6236f3c17' into gingerbread-plus-aosp

* commit 'f3c6c982f68e6ada3cded6923301d2f6236f3c17':
  TimedEventQueue is apparently important for glitch-free media playback, and so
This commit is contained in:
Dave Sparks
2010-06-17 12:42:24 -07:00
committed by Android Git Automerger

View File

@@ -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