Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86106f8b authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Bug 4608375

Update priority and policy together for audio threads

Change-Id: Ib3b07b32586c222c4aacbf23414ae8b05db502be
parent afcedc9e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1946,7 +1946,7 @@ status_t MPEG4Writer::Track::threadEntry() {
    } else {
        prctl(PR_SET_NAME, (unsigned long)"VideoTrackEncoding", 0, 0, 0);
    }
    setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_AUDIO);
    androidSetThreadPriority(0, ANDROID_PRIORITY_AUDIO);

    sp<MetaData> meta_data;

+1 −2
Original line number Diff line number Diff line
@@ -210,8 +210,7 @@ void *TimedEventQueue::ThreadWrapper(void *me) {
    vm->AttachCurrentThread(&env, NULL);
#endif

    setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_FOREGROUND);
    set_sched_policy(androidGetTid(), SP_FOREGROUND);
    androidSetThreadPriority(0, ANDROID_PRIORITY_FOREGROUND);

    static_cast<TimedEventQueue *>(me)->threadEntry();

+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ void *OMX::CallbackDispatcher::ThreadWrapper(void *me) {
}

void OMX::CallbackDispatcher::threadEntry() {
    setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_AUDIO);
    androidSetThreadPriority(0, ANDROID_PRIORITY_AUDIO);
    prctl(PR_SET_NAME, (unsigned long)"OMXCallbackDisp", 0, 0, 0);

    for (;;) {