Ignore low-FPS ranges if not available
Do not report an error if the returned FPS ranges array is null. Refs #5669 <https://github.com/Genymobile/scrcpy/pull/5669>
This commit is contained in:
parent
2f44da76f4
commit
5387644160
@ -163,8 +163,10 @@ public final class LogUtils {
|
||||
try {
|
||||
// Capture frame rates for low-FPS mode are the same for every resolution
|
||||
Range<Integer>[] lowFpsRanges = characteristics.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES);
|
||||
if (lowFpsRanges != null) {
|
||||
SortedSet<Integer> uniqueLowFps = getUniqueSet(lowFpsRanges);
|
||||
builder.append(", fps=").append(uniqueLowFps);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Some devices may provide invalid ranges, causing an IllegalArgumentException "lower must be less than or equal to upper"
|
||||
Ln.w("Could not get available frame rates for camera " + id, e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user