summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuman Mukherjee <sumam@codeaurora.org>2014-12-16 15:50:15 +0530
committerArne Coucheron <arco68@gmail.com>2018-01-27 00:41:42 +0100
commitcc4130a5923c70ba11c00146ec18c8766cb4e18e (patch)
treeaa6c0a80dfee895f9c513401fa25e3167c54bf2c
parenta465b967e9d056d4084533e54f187a38d8bc98af (diff)
downloadandroid_packages_apps_Snap-cc4130a5923c70ba11c00146ec18c8766cb4e18e.zip
android_packages_apps_Snap-cc4130a5923c70ba11c00146ec18c8766cb4e18e.tar.gz
android_packages_apps_Snap-cc4130a5923c70ba11c00146ec18c8766cb4e18e.tar.bz2
Camera: Set preview fps after recording.
4k DCI recorded FPS is getting picked up from profile and not getting reset to preview FPS after stop recording. Fix made to set the preview FPS range after stop recording. Change-Id: I4892e6fcee3eefbcbd6ca9426e56e2303cdad844
-rw-r--r--src/com/android/camera/VideoModule.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 5487bcf..9d335cf 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -2261,6 +2261,18 @@ public class VideoModule implements CameraModule,
mUI.hideSurfaceView();
// Switch back to use SurfaceTexture for preview.
startPreview();
+ } else {
+ if (is4KEnabled()) {
+ int[] fpsRange = CameraUtil.getMaxPreviewFpsRange(mParameters);
+ if (fpsRange.length > 0) {
+ mParameters.setPreviewFpsRange(
+ fpsRange[Parameters.PREVIEW_FPS_MIN_INDEX],
+ fpsRange[Parameters.PREVIEW_FPS_MAX_INDEX]);
+ } else {
+ mParameters.setPreviewFrameRate(30);
+ }
+ mCameraDevice.setParameters(mParameters);
+ }
}
}
// Update the parameters here because the parameters might have been altered