mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-19 08:51:10 +00:00
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
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
SortedSet<Integer> uniqueLowFps = getUniqueSet(lowFpsRanges);
|
||||
builder.append(", fps=").append(uniqueLowFps);
|
||||
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…
Add table
Add a link
Reference in a new issue