Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Checked for biggest range FPS from available AE ranges
  • Loading branch information
NickCullen committed Jan 5, 2019
commit 8cfa2708ace81878815e96b9a3f052d291c24e93
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,24 @@ private boolean hasAudioPermission() {
private void setBestAERange(CameraCharacteristics characteristics) {
Range<Integer>[] fpsRanges = characteristics.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES);

if(fpsRanges.length > 0) {
aeFPSRange = fpsRanges[0];
if(fpsRanges.length <= 0) {
return;
}

Integer idx = 0;
Integer biggestDiference = 0;

for(Integer i = 0; i < fpsRanges.length; i++) {
Integer currentDifference = fpsRanges[i].getUpper() - fpsRanges[i].getLower();

if(currentDifference > biggestDiference) {
idx = i;
biggestDiference = currentDifference;
}

}

aeFPSRange = fpsRanges[idx];
}

private void computeBestPreviewAndRecordingSize(
Expand Down