mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 11:33:06 +00:00
Thread priority tweaks: Ensure renderer threads have higher priorities than the receive threads. Increase the priority of the resync thread to just below the video renderer so the control packet can be emitted ASAP. Lower the priority of the loss stats thread. Increase the priority of the input thread slightly above normal.
This commit is contained in:
parent
8dbb03114d
commit
7f587dc389
@ -142,6 +142,7 @@ public class AudioStream {
|
|||||||
};
|
};
|
||||||
threads.add(t);
|
threads.add(t);
|
||||||
t.setName("Audio - Player");
|
t.setName("Audio - Player");
|
||||||
|
t.setPriority(Thread.NORM_PRIORITY + 2);
|
||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,6 +206,7 @@ public class AudioStream {
|
|||||||
};
|
};
|
||||||
threads.add(t);
|
threads.add(t);
|
||||||
t.setName("Audio - Receive");
|
t.setName("Audio - Receive");
|
||||||
|
t.setPriority(Thread.NORM_PRIORITY + 1);
|
||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ public class VideoStream {
|
|||||||
};
|
};
|
||||||
threads.add(t);
|
threads.add(t);
|
||||||
t.setName("Video - Receive");
|
t.setName("Video - Receive");
|
||||||
t.setPriority(Thread.MAX_PRIORITY);
|
t.setPriority(Thread.MAX_PRIORITY - 1);
|
||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,6 +171,7 @@ public class ControlStream implements ConnectionStatusListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
lossStatsThread.setPriority(Thread.MIN_PRIORITY + 1);
|
||||||
lossStatsThread.setName("Control - Loss Stats Thread");
|
lossStatsThread.setName("Control - Loss Stats Thread");
|
||||||
lossStatsThread.start();
|
lossStatsThread.start();
|
||||||
|
|
||||||
@ -220,6 +221,7 @@ public class ControlStream implements ConnectionStatusListener {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
resyncThread.setName("Control - Resync Thread");
|
resyncThread.setName("Control - Resync Thread");
|
||||||
|
resyncThread.setPriority(Thread.MAX_PRIORITY - 1);
|
||||||
resyncThread.start();
|
resyncThread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,6 +186,7 @@ public class ControllerStream {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
inputThread.setName("Input - Queue");
|
inputThread.setName("Input - Queue");
|
||||||
|
inputThread.setPriority(Thread.NORM_PRIORITY + 1);
|
||||||
inputThread.start();
|
inputThread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user