From db44c4123dec87d1632d27908787b2d1b49302b9 Mon Sep 17 00:00:00 2001 From: Shuzhen Wang Date: Fri, 25 Aug 2023 22:50:34 +0000 Subject: Camera: Improve session parameter documentation Strongly recommend the application to specify aeTargetFpsRange and videoStabilizationMode during session creation. Test: Read docs Bug: 294619809 Change-Id: Ide34b90efc93a67c88b2c23af6e79ae45475fcc1 --- core/java/android/hardware/camera2/CaptureRequest.java | 13 +++++++++++++ core/java/android/hardware/camera2/CaptureResult.java | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index 59408191cdf5..703f16553ddb 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -1468,6 +1468,13 @@ public final class CaptureRequest extends CameraMetadata> *

Only constrains auto-exposure (AE) algorithm, not * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.

+ *

To start a CaptureSession with a target FPS range different from the + * capture request template's default value, the application + * is strongly recommended to call + * {@link SessionConfiguration#setSessionParameters } + * with the target fps range before creating the capture session. The aeTargetFpsRange is + * typically a session parameter. Specifying it at session creation time helps avoid + * session reconfiguration delays in cases like 60fps or high speed recording.

*

Units: Frames per second (FPS)

*

Range of valid values:
* Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}

@@ -2140,6 +2147,12 @@ public final class CaptureRequest extends CameraMetadata> * {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} field will return * OFF if the recording output is not stabilized, or if there are no output * Surface types that can be stabilized.

+ *

The application is strongly recommended to call + * {@link SessionConfiguration#setSessionParameters } + * with the desired video stabilization mode before creating the capture session. + * Video stabilization mode is a session parameter on many devices. Specifying + * it at session creation time helps avoid reconfiguration delay caused by difference + * between the default value and the first CaptureRequest.

*

If a camera device supports both this mode and OIS * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may * produce undesirable interaction, so it is recommended not to enable diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 905f98de75ff..746648ba7ac5 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -887,6 +887,13 @@ public class CaptureResult extends CameraMetadata> { *

Only constrains auto-exposure (AE) algorithm, not * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.

+ *

To start a CaptureSession with a target FPS range different from the + * capture request template's default value, the application + * is strongly recommended to call + * {@link SessionConfiguration#setSessionParameters } + * with the target fps range before creating the capture session. The aeTargetFpsRange is + * typically a session parameter. Specifying it at session creation time helps avoid + * session reconfiguration delays in cases like 60fps or high speed recording.

*

Units: Frames per second (FPS)

*

Range of valid values:
* Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}

@@ -2365,6 +2372,12 @@ public class CaptureResult extends CameraMetadata> { * {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} field will return * OFF if the recording output is not stabilized, or if there are no output * Surface types that can be stabilized.

+ *

The application is strongly recommended to call + * {@link SessionConfiguration#setSessionParameters } + * with the desired video stabilization mode before creating the capture session. + * Video stabilization mode is a session parameter on many devices. Specifying + * it at session creation time helps avoid reconfiguration delay caused by difference + * between the default value and the first CaptureRequest.

*

If a camera device supports both this mode and OIS * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may * produce undesirable interaction, so it is recommended not to enable -- cgit v1.2.3-59-g8ed1b