From cbbc870ba85fa9dda5a31749e6d8afe36e00494c Mon Sep 17 00:00:00 2001 From: Bharatt Kukreja Date: Thu, 15 Sep 2022 20:24:36 +0000 Subject: [PATCH] Camera: Add autoframing API The new API can be used to keep objects in the frame's fov. Auto-generated file from changes in metadata_definitions.xml Bug: 234004829 Test: Successful build Change-Id: I68b1c38a67427aba3fa0ef9f21fb526199953682 --- .../camera/metadata/CameraMetadataTag.aidl | 3 ++ .../camera/metadata/ControlAutoframing.aidl | 44 +++++++++++++++++++ .../metadata/ControlAutoframingAvailable.aidl | 43 ++++++++++++++++++ .../metadata/ControlAutoframingState.aidl | 44 +++++++++++++++++++ .../camera/metadata/CameraMetadataTag.aidl | 20 +++++++++ .../camera/metadata/ControlAutoframing.aidl | 35 +++++++++++++++ .../metadata/ControlAutoframingAvailable.aidl | 34 ++++++++++++++ .../metadata/ControlAutoframingState.aidl | 35 +++++++++++++++ 8 files changed, 258 insertions(+) create mode 100644 camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframing.aidl create mode 100644 camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl create mode 100644 camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingState.aidl create mode 100644 camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframing.aidl create mode 100644 camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl create mode 100644 camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingState.aidl diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl index af414b40bd..617979d957 100644 --- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl +++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl @@ -94,6 +94,9 @@ enum CameraMetadataTag { ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION = 65584, ANDROID_CONTROL_SETTINGS_OVERRIDE = 65588, ANDROID_CONTROL_AVAILABLE_SETTINGS_OVERRIDES = 65589, + ANDROID_CONTROL_AUTOFRAMING = 65590, + ANDROID_CONTROL_AUTOFRAMING_AVAILABLE = 65591, + ANDROID_CONTROL_AUTOFRAMING_STATE = 65592, ANDROID_DEMOSAIC_MODE = 131072, ANDROID_EDGE_MODE = 196608, ANDROID_EDGE_STRENGTH = 196609, diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframing.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframing.aidl new file mode 100644 index 0000000000..eeb7bcd512 --- /dev/null +++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframing.aidl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//* + * Autogenerated from camera metadata definitions in + * /system/media/camera/docs/metadata_definitions.xml + * *** DO NOT EDIT BY HAND *** + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.camera.metadata; +@Backing(type="int") @VintfStability +enum ControlAutoframing { + ANDROID_CONTROL_AUTOFRAMING_OFF = 0, + ANDROID_CONTROL_AUTOFRAMING_ON = 1, + ANDROID_CONTROL_AUTOFRAMING_AUTO = 2, +} diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl new file mode 100644 index 0000000000..b075c325f9 --- /dev/null +++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//* + * Autogenerated from camera metadata definitions in + * /system/media/camera/docs/metadata_definitions.xml + * *** DO NOT EDIT BY HAND *** + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.camera.metadata; +@Backing(type="int") @VintfStability +enum ControlAutoframingAvailable { + ANDROID_CONTROL_AUTOFRAMING_AVAILABLE_FALSE = 0, + ANDROID_CONTROL_AUTOFRAMING_AVAILABLE_TRUE = 1, +} diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingState.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingState.aidl new file mode 100644 index 0000000000..60df0d4d44 --- /dev/null +++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingState.aidl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//* + * Autogenerated from camera metadata definitions in + * /system/media/camera/docs/metadata_definitions.xml + * *** DO NOT EDIT BY HAND *** + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.camera.metadata; +@Backing(type="int") @VintfStability +enum ControlAutoframingState { + ANDROID_CONTROL_AUTOFRAMING_STATE_INACTIVE = 0, + ANDROID_CONTROL_AUTOFRAMING_STATE_FRAMING = 1, + ANDROID_CONTROL_AUTOFRAMING_STATE_CONVERGED = 2, +} diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl index cc98ff07c3..85e56bce77 100644 --- a/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl +++ b/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl @@ -463,6 +463,26 @@ enum CameraMetadataTag { * be used to speed up certain controls.

*/ ANDROID_CONTROL_AVAILABLE_SETTINGS_OVERRIDES, + /** + * android.control.autoframing [dynamic, enum, public] + * + *

Automatic crop, pan and zoom to keep objects in the center of the frame.

+ */ + ANDROID_CONTROL_AUTOFRAMING, + /** + * android.control.autoframingAvailable [static, enum, public] + * + *

Whether the camera device supports ANDROID_CONTROL_AUTOFRAMING.

+ * + * @see ANDROID_CONTROL_AUTOFRAMING + */ + ANDROID_CONTROL_AUTOFRAMING_AVAILABLE, + /** + * android.control.autoframingState [dynamic, enum, public] + * + *

Current state of auto-framing.

+ */ + ANDROID_CONTROL_AUTOFRAMING_STATE, /** * android.demosaic.mode [controls, enum, system] * diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframing.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframing.aidl new file mode 100644 index 0000000000..0fef3735b1 --- /dev/null +++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframing.aidl @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Autogenerated from camera metadata definitions in + * /system/media/camera/docs/metadata_definitions.xml + * *** DO NOT EDIT BY HAND *** + */ + +package android.hardware.camera.metadata; + +/** + * android.control.autoframing enumeration values + * @see ANDROID_CONTROL_AUTOFRAMING + */ +@VintfStability +@Backing(type="int") +enum ControlAutoframing { + ANDROID_CONTROL_AUTOFRAMING_OFF, + ANDROID_CONTROL_AUTOFRAMING_ON, + ANDROID_CONTROL_AUTOFRAMING_AUTO, +} diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl new file mode 100644 index 0000000000..da0d34894d --- /dev/null +++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Autogenerated from camera metadata definitions in + * /system/media/camera/docs/metadata_definitions.xml + * *** DO NOT EDIT BY HAND *** + */ + +package android.hardware.camera.metadata; + +/** + * android.control.autoframingAvailable enumeration values + * @see ANDROID_CONTROL_AUTOFRAMING_AVAILABLE + */ +@VintfStability +@Backing(type="int") +enum ControlAutoframingAvailable { + ANDROID_CONTROL_AUTOFRAMING_AVAILABLE_FALSE, + ANDROID_CONTROL_AUTOFRAMING_AVAILABLE_TRUE, +} diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingState.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingState.aidl new file mode 100644 index 0000000000..13183a5314 --- /dev/null +++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingState.aidl @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Autogenerated from camera metadata definitions in + * /system/media/camera/docs/metadata_definitions.xml + * *** DO NOT EDIT BY HAND *** + */ + +package android.hardware.camera.metadata; + +/** + * android.control.autoframingState enumeration values + * @see ANDROID_CONTROL_AUTOFRAMING_STATE + */ +@VintfStability +@Backing(type="int") +enum ControlAutoframingState { + ANDROID_CONTROL_AUTOFRAMING_STATE_INACTIVE, + ANDROID_CONTROL_AUTOFRAMING_STATE_FRAMING, + ANDROID_CONTROL_AUTOFRAMING_STATE_CONVERGED, +}