mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Set latency only for API >= 26
Contrary to what the previous commit message says, KEY_LATENCY was introduced in API 26, not 23.
This commit is contained in:
parent
72d1aedcaa
commit
89b63f081f
1 changed files with 2 additions and 0 deletions
|
|
@ -267,6 +267,8 @@ public class SurfaceEncoder implements AsyncProcessor {
|
|||
if (Build.VERSION.SDK_INT >= AndroidVersions.API_23_ANDROID_6_0) {
|
||||
// real-time priority
|
||||
format.setInteger(MediaFormat.KEY_PRIORITY, 0);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= AndroidVersions.API_26_ANDROID_8_0) {
|
||||
// output 1 frame as soon as 1 frame is queued
|
||||
format.setInteger(MediaFormat.KEY_LATENCY, 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue