From d71d1c7ff302236a5443187422a263b7b9ded6bc Mon Sep 17 00:00:00 2001 From: Chien-Yu Chen Date: Wed, 29 Nov 2017 14:30:07 -0800 Subject: [PATCH] camera: Add AF scene change key Test: CTS Bug: 64847201 Change-Id: I8e083180dd6065431ede1f5c6de8df57f7809a02 --- .../include/camera/NdkCameraMetadataTags.h | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/camera/ndk/include/camera/NdkCameraMetadataTags.h b/camera/ndk/include/camera/NdkCameraMetadataTags.h index 17938775ac..4f893f1d6a 100644 --- a/camera/ndk/include/camera/NdkCameraMetadataTags.h +++ b/camera/ndk/include/camera/NdkCameraMetadataTags.h @@ -1635,6 +1635,28 @@ typedef enum acamera_metadata_tag { */ ACAMERA_CONTROL_ENABLE_ZSL = // byte (acamera_metadata_enum_android_control_enable_zsl_t) ACAMERA_CONTROL_START + 41, + /** + *

Whether a significant scene change is detected within the currently-set AF + * region(s).

+ * + *

Type: int32 (acamera_metadata_enum_android_control_af_scene_change_t)

+ * + *

This tag may appear in: + *

+ * + *

When the camera focus routine detects a change in the scene it is looking at, + * such as a large shift in camera viewpoint, significant motion in the scene, or a + * significant illumination change, this value will be set to DETECTED for a single capture + * result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar + * to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.

+ *

afSceneChange may be DETECTED only if afMode is AF_MODE_CONTINUOUS_VIDEO or + * AF_MODE_CONTINUOUS_PICTURE. In other AF modes, afSceneChange must be NOT_DETECTED.

+ *

This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.

+ */ + ACAMERA_CONTROL_AF_SCENE_CHANGE = // int32 (acamera_metadata_enum_android_control_af_scene_change_t) + ACAMERA_CONTROL_START + 42, ACAMERA_CONTROL_END, /** @@ -6115,6 +6137,20 @@ typedef enum acamera_metadata_enum_acamera_control_enable_zsl { } acamera_metadata_enum_android_control_enable_zsl_t; +// ACAMERA_CONTROL_AF_SCENE_CHANGE +typedef enum acamera_metadata_enum_acamera_control_af_scene_change { + /** + *

Scene change is not detected within the AF region(s).

+ */ + ACAMERA_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED = 0, + + /** + *

Scene change is detected within the AF region(s).

+ */ + ACAMERA_CONTROL_AF_SCENE_CHANGE_DETECTED = 1, + +} acamera_metadata_enum_android_control_af_scene_change_t; + // ACAMERA_EDGE_MODE