Skip to content
Merged
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
rename method
  • Loading branch information
davidmartos96 committed Mar 20, 2025
commit da5281b7b99c4a979496c47d1ab37c02124b9f29
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,12 @@ private void prepareMediaRecorder(String outputFilePath) throws IOException {
.build();
}

private void setFpsCameraFeature(CameraProperties cameraProperties) {
/**
* Updates the FpsRange camera features with the appropriate FPS range. It sets
* the minimum and maximum fps range to the same value, as that's what is recommended
* for video recording.
*/
private void setFpsCameraFeatureForRecording(CameraProperties cameraProperties) {
Integer recordingFps = null;

if (videoCaptureSettings.fps != null && videoCaptureSettings.fps.intValue() > 0) {
Expand Down Expand Up @@ -1258,7 +1263,7 @@ void prepareRecording() {
cameraFeatures.setAutoFocus(
cameraFeatureFactory.createAutoFocusFeature(cameraProperties, true));
// Update camera features with the desired fps range
setFpsCameraFeature(cameraProperties);
setFpsCameraFeatureForRecording(cameraProperties);
}

private void setStreamHandler(EventChannel imageStreamChannel) {
Expand Down Expand Up @@ -1382,7 +1387,7 @@ public void setDescriptionWhileRecording(CameraProperties properties) {
videoCaptureSettings.resolutionPreset);
cameraFeatures.setAutoFocus(
cameraFeatureFactory.createAutoFocusFeature(cameraProperties, true));
setFpsCameraFeature(cameraProperties);
setFpsCameraFeatureForRecording(cameraProperties);
try {
open(imageFormatGroup);
} catch (CameraAccessException e) {
Expand Down