Merge changes from topic "aidlCameraHalInterfaces"

* changes:
  Add AIDL interface files for android.hardware.camera.common .
  Add AIDL interfaces for camera device hal functionality.
  Add AIDL interfaces for camera HAL provider.
  Add AIDL interfaces for camera metadata.
This commit is contained in:
TreeHugger Robot
2022-02-05 00:06:59 +00:00
committed by Android (Google) Code Review
268 changed files with 15762 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
aidl_interface {
name: "android.hardware.camera.common",
vendor_available: true,
srcs: ["android/hardware/camera/common/*.aidl"],
stability: "vintf",
backend: {
cpp: {
enabled: false,
},
java: {
enabled: false,
},
ndk: {
vndk: {
enabled: true,
},
},
},
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2021 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.common;
@Backing(type="int") @VintfStability
enum CameraDeviceStatus {
NOT_PRESENT = 0,
PRESENT = 1,
ENUMERATING = 2,
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (C) 2021 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.common;
@Backing(type="int") @VintfStability
enum CameraMetadataType {
BYTE = 0,
INT32 = 1,
FLOAT = 2,
INT64 = 3,
DOUBLE = 4,
RATIONAL = 5,
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (C) 2021 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.common;
@VintfStability
parcelable CameraResourceCost {
int resourceCost;
String[] conflictingDevices;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (C) 2021 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.common;
@Backing(type="int") @VintfStability
enum Status {
OK = 0,
ILLEGAL_ARGUMENT = 1,
CAMERA_IN_USE = 2,
MAX_CAMERAS_IN_USE = 3,
METHOD_NOT_SUPPORTED = 4,
OPERATION_NOT_SUPPORTED = 5,
CAMERA_DISCONNECTED = 6,
INTERNAL_ERROR = 7,
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (C) 2021 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.common;
@Backing(type="long") @VintfStability
enum TagBoundaryId {
AOSP = 0,
VENDOR = -2147483648,
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2021 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.common;
@Backing(type="int") @VintfStability
enum TorchModeStatus {
NOT_AVAILABLE = 0,
AVAILABLE_OFF = 1,
AVAILABLE_ON = 2,
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2021 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.common;
@VintfStability
parcelable VendorTag {
int tagId;
String tagName;
android.hardware.camera.common.CameraMetadataType tagType;
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (C) 2021 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.common;
@VintfStability
parcelable VendorTagSection {
String sectionName;
android.hardware.camera.common.VendorTag[] tags;
}

View File

@@ -0,0 +1,64 @@
/*
* Copyright (C) 2021 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.
*/
package android.hardware.camera.common;
/**
* CameraDeviceStatus
*
* The current status of a camera device, as sent by a camera provider HAL
* through the ICameraProviderCallback::cameraDeviceStatusChange() call.
*
* At startup, the camera service must assume all internal camera devices listed
* by ICameraProvider::getCameraIdList() are in the PRESENT state. The provider
* must invoke ICameraProviderCallback::cameraDeviceStatusChange to inform the
* service of any initially NOT_PRESENT internal devices, and of any PRESENT
* external camera devices, as soon as the camera service has called
* ICameraProvider::setCallback().
*
* Allowed state transitions:
* PRESENT -> NOT_PRESENT
* NOT_PRESENT -> ENUMERATING
* NOT_PRESENT -> PRESENT
* ENUMERATING -> PRESENT
* ENUMERATING -> NOT_PRESENT
*/
@VintfStability
@Backing(type="int")
enum CameraDeviceStatus {
/**
* The camera device is not currently connected, and trying to reference it
* in provider method calls must return status code ILLEGAL_ARGUMENT.
*
*/
NOT_PRESENT = 0,
/**
* The camera device is connected, and opening it is possible, as long as
* sufficient resources are available.
*
* By default, the framework must assume all devices returned by
* ICameraProvider::getCameraIdList() are in this state.
*/
PRESENT = 1,
/**
* The camera device is connected, but it is undergoing enumeration and
* startup, and so opening the device must return CAMERA_IN_USE.
*
* Attempting to call ICameraProvider::getCameraCharacteristics() must
* succeed, however.
*/
ENUMERATING = 2,
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2021 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.
*/
package android.hardware.camera.common;
/**
* Camera metadata type - duplicated from VNDK libcamera_metadata for vendor tag
* definitions.
*/
@VintfStability
@Backing(type="int")
enum CameraMetadataType {
BYTE = 0,
INT32 = 1,
FLOAT = 2,
INT64 = 3,
DOUBLE = 4,
RATIONAL = 5,
}

View File

@@ -0,0 +1,172 @@
/*
* Copyright (C) 2021 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.
*/
package android.hardware.camera.common;
/**
* CameraResourceCost:
*
* Structure defining the abstract resource cost of opening a camera device,
* and any usage conflicts between multiple camera devices.
*
* Obtainable via ICameraDevice::getResourceCost()
*/
@VintfStability
parcelable CameraResourceCost {
/**
* The total resource "cost" of using this camera, represented as an integer
* value in the range [0, 100] where 100 represents total usage of the
* shared resource that is the limiting bottleneck of the camera subsystem.
* This may be a very rough estimate, and is used as a hint to the camera
* service to determine when to disallow multiple applications from
* simultaneously opening different cameras advertised by the camera
* service.
*
* The camera service must be able to simultaneously open and use any
* combination of camera devices exposed by the HAL where the sum of
* the resource costs of these cameras is <= 100. For determining cost,
* each camera device must be assumed to be configured and operating at
* the maximally resource-consuming framerate and stream size settings
* available in the configuration settings exposed for that device through
* the camera metadata.
*
* The camera service may still attempt to simultaneously open combinations
* of camera devices with a total resource cost > 100. This may succeed or
* fail. If this succeeds, combinations of configurations that are not
* supported due to resource constraints from having multiple open devices
* must fail during the configure calls. If the total resource cost is <=
* 100, open and configure must never fail for any stream configuration
* settings or other device capabilities that would normally succeed for a
* device when it is the only open camera device.
*
* This field may be used to determine whether background applications are
* allowed to use this camera device while other applications are using
* other camera devices. Note: multiple applications must never be allowed
* by the camera service to simultaneously open the same camera device.
*
* Example use cases:
*
* Ex. 1: Camera Device 0 = Back Camera
* Camera Device 1 = Front Camera
* - Using both camera devices causes a large framerate slowdown due to
* limited ISP bandwidth.
*
* Configuration:
*
* Camera Device 0 - resourceCost = 51
* conflicting_devices = empty
* Camera Device 1 - resourceCost = 51
* conflicting_devices = empty
*
* Result:
*
* Since the sum of the resource costs is > 100, if a higher-priority
* application has either device open, no lower-priority applications must
* be allowed by the camera service to open either device. If a
* lower-priority application is using a device that a higher-priority
* subsequently attempts to open, the lower-priority application must be
* forced to disconnect the device.
*
* If the highest-priority application chooses, it may still attempt to
* open both devices (since these devices are not listed as conflicting in
* the conflicting_devices fields), but usage of these devices may fail in
* the open or configure calls.
*
* Ex. 2: Camera Device 0 = Left Back Camera
* Camera Device 1 = Right Back Camera
* Camera Device 2 = Combined stereo camera using both right and left
* back camera sensors used by devices 0, and 1
* Camera Device 3 = Front Camera
* - Due to do hardware constraints, up to two cameras may be open at
* once. The combined stereo camera may never be used at the same time
* as either of the two back camera devices (device 0, 1), and typically
* requires too much bandwidth to use at the same time as the front
* camera (device 3).
*
* Configuration:
*
* Camera Device 0 - resourceCost = 50
* conflicting_devices = { 2 }
* Camera Device 1 - resourceCost = 50
* conflicting_devices = { 2 }
* Camera Device 2 - resourceCost = 100
* conflicting_devices = { 0, 1 }
* Camera Device 3 - resourceCost = 50
* conflicting_devices = empty
*
* Result:
*
* Based on the conflicting_devices fields, the camera service guarantees
* that the following sets of open devices must never be allowed: { 1, 2
* }, { 0, 2 }.
*
* Based on the resourceCost fields, if a high-priority foreground
* application is using camera device 0, a background application would be
* allowed to open camera device 1 or 3 (but would be forced to disconnect
* it again if the foreground application opened another device).
*
* The highest priority application may still attempt to simultaneously
* open devices 0, 2, and 3, but the HAL may fail in open or configure
* calls for this combination.
*
* Ex. 3: Camera Device 0 = Back Camera
* Camera Device 1 = Front Camera
* Camera Device 2 = Low-power Front Camera that uses the same sensor
* as device 1, but only exposes image stream
* resolutions that can be used in low-power mode
* - Using both front cameras (device 1, 2) at the same time is impossible
* due a shared physical sensor. Using the back and "high-power" front
* camera (device 1) may be impossible for some stream configurations due
* to hardware limitations, but the "low-power" front camera option may
* always be used as it has special dedicated hardware.
*
* Configuration:
*
* Camera Device 0 - resourceCost = 100
* conflicting_devices = empty
* Camera Device 1 - resourceCost = 100
* conflicting_devices = { 2 }
* Camera Device 2 - resourceCost = 0
* conflicting_devices = { 1 }
* Result:
*
* Based on the conflicting_devices fields, the camera service guarantees
* that the following sets of open devices must never be allowed:
* { 1, 2 }.
*
* Based on the resourceCost fields, only the highest priority application
* may attempt to open both device 0 and 1 at the same time. If a
* higher-priority application is not using device 1 or 2, a low-priority
* background application may open device 2 (but must be forced to
* disconnect it if a higher-priority application subsequently opens
* device 1 or 2).
*/
int resourceCost;
/**
* An array of camera device IDs indicating other devices that cannot be
* simultaneously opened while this camera device is in use.
*
* This field is intended to be used to indicate that this camera device
* is a composite of several other camera devices, or otherwise has
* hardware dependencies that prohibit simultaneous usage. If there are no
* dependencies, an empty list may be returned to indicate this.
*
* The camera service must never simultaneously open any of the devices
* in this list while this camera device is open.
*
*/
String[] conflictingDevices;
}

View File

@@ -0,0 +1,64 @@
/*
* Copyright (C) 2021 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.
*/
package android.hardware.camera.common;
/**
* Common enumeration and structure definitions for all HALs under
* android.hardware.camera
*
*
* Status codes for camera HAL method service specific errors.
*
*/
@VintfStability
@Backing(type="int")
enum Status {
/**
* Method call succeeded
*/
OK = 0,
/**
* One of the arguments to the method call is invalid. For example,
* the camera ID is unknown.
*/
ILLEGAL_ARGUMENT = 1,
/**
* The specified camera device is already in use
*/
CAMERA_IN_USE = 2,
/**
* The HAL cannot support more simultaneous cameras in use.
*/
MAX_CAMERAS_IN_USE = 3,
/**
* This HAL does not support this method.
*/
METHOD_NOT_SUPPORTED = 4,
/**
* The specified camera device does not support this operation.
*/
OPERATION_NOT_SUPPORTED = 5,
/**
* This camera device is no longer connected or otherwise available for use
*/
CAMERA_DISCONNECTED = 6,
/**
* The HAL has encountered an internal error and cannot complete the
* request.
*/
INTERNAL_ERROR = 7,
}

View File

@@ -0,0 +1,24 @@
/*
* Copyright (C) 2021 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.
*/
package android.hardware.camera.common;
@VintfStability
@Backing(type="long")
enum TagBoundaryId {
AOSP = 0x0,
VENDOR = 0x80000000,
}

View File

@@ -0,0 +1,104 @@
/*
* Copyright (C) 2021 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.
*/
package android.hardware.camera.common;
/**
* TorchModeStatus:
*
* The current status of the torch mode on a given camera device, sent by a
* camera provider HAL via the ICameraProviderCallback::TorchModeStatusChange()
* call.
*
* The torch mode status of a camera device is applicable only when the camera
* device is present. The camera service must not call
* ICameraProvider::setTorchMode() to turn on torch mode of a camera device if
* the camera device is not present. At camera service startup time, the
* framework must assume torch modes are in the AVAILABLE_OFF state if the
* camera device is present and the camera characteristics entry
* android.flash.info.available is reported as true via
* ICameraProvider::getCameraCharacteristics() call. The same is assumed for
* external camera devices when they are initially connected.
*
* The camera service requires the following behaviors from the camera provider
* HAL when a camera device's status changes:
*
* 1. A previously-disconnected camera device becomes connected. After
* ICameraProviderCallback::CameraDeviceStatusChange() is invoked to inform
* the camera service that the camera device is present, the framework must
* assume the camera device's torch mode is in AVAILABLE_OFF state if it
* has a flash unit. The camera provider HAL does not need to invoke
* ICameraProviderCallback::TorchModeStatusChange() unless the flash unit
* is unavailable to use by ICameraProvider::setTorchMode().
*
* 2. A previously-connected camera becomes disconnected. After
* ICameraProviderCallback::CameraDeviceStatusChange() is invoked to inform
* the camera service that the camera device is not present, the framework
* must not call ICameraProvider::setTorchMode() for the disconnected camera
* device until it is connected again. The camera provider HAL does not
* need to invoke ICameraProviderCallback::TorchModeStatusChange()
* separately to inform that the flash unit has become NOT_AVAILABLE.
*
* 3. openCameraDevice() or openCameraDeviceVersion() is called to open a
* camera device. The camera provider HAL must invoke
* ICameraProviderCallback::TorchModeStatusChange() for all flash units
* that have entered NOT_AVAILABLE state and can not be turned on by
* calling ICameraProvider::setTorchMode() due to this open() call.
* openCameraDevice() must not trigger AVAILABLE_OFF before NOT_AVAILABLE
* for all flash units that have become unavailable.
*
* 4. ICameraDevice.close() is called to close a camera device. The camera
* provider HAL must call ICameraProviderCallback::torchModeStatusChange()
* for all flash units that have now entered the AVAILABLE_OFF state and
* can be turned on by calling ICameraProvider::setTorchMode() again because
* of sufficient new camera resources being freed up by this close() call.
*
* Note that the camera service calling ICameraProvider::setTorchMode()
* successfully must trigger AVAILABLE_OFF or AVAILABLE_ON callback for the
* given camera device. Additionally it must trigger AVAILABLE_OFF callbacks
* for other previously-on torch modes if HAL cannot keep multiple devices'
* flashlights on simultaneously.
*/
@VintfStability
@Backing(type="int")
enum TorchModeStatus {
/**
* The flash unit is no longer available and the torch mode can not be
* turned on by calling setTorchMode(). If the torch mode was AVAILABLE_ON,
* the flashlight must be turned off by the provider HAL before the provider
* HAL calls torchModeStatusChange().
*/
NOT_AVAILABLE = 0,
/**
* A torch mode has become off and is available to be turned on via
* ICameraProvider::setTorchMode(). This may happen in the following
* cases:
* 1. After the resources to turn on the torch mode have become available.
* 2. After ICameraProvider::setTorchMode() is called to turn off the torch
* mode.
* 3. After the camera service turned on the torch mode for some other
* camera device and the provider HAL had to turn off the torch modes
* of other camera device(s) that were previously on, due to lack of
* resources to keep them all on.
*/
AVAILABLE_OFF = 1,
/**
* A torch mode has become on and is available to be turned off via
* ICameraProvider::setTorchMode(). This can happen only after
* ICameraProvider::setTorchMode() has been called to turn on the torch mode.
*/
AVAILABLE_ON = 2,
}

View File

@@ -0,0 +1,30 @@
/*
* Copyright (C) 2021 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.
*/
package android.hardware.camera.common;
import android.hardware.camera.common.CameraMetadataType;
/**
* A single vendor-unique metadata tag.
* The full name of the tag is <sectionName>.<tagName>
*/
@VintfStability
parcelable VendorTag {
int tagId;
String tagName;
CameraMetadataType tagType;
}

View File

@@ -0,0 +1,28 @@
/*
* Copyright (C) 2021 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.
*/
package android.hardware.camera.common;
import android.hardware.camera.common.VendorTag;
/**
* A set of related vendor tags.
*/
@VintfStability
parcelable VendorTagSection {
String sectionName;
VendorTag[] tags;
}

View File

@@ -0,0 +1,27 @@
aidl_interface {
name: "android.hardware.camera.device",
vendor_available: true,
srcs: ["android/hardware/camera/device/*.aidl"],
stability: "vintf",
imports: [
"android.hardware.common-V2",
"android.hardware.common.fmq-V1",
"android.hardware.camera.common",
"android.hardware.camera.metadata",
"android.hardware.graphics.common"
],
backend: {
cpp: {
enabled: false,
},
java: {
sdk_version: "module_current",
enabled: false,
},
ndk: {
vndk: {
enabled: true,
},
},
},
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable BufferCache {
int streamId;
long bufferId;
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable BufferRequest {
int streamId;
int numBuffersRequested;
}

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum BufferRequestStatus {
OK = 0,
FAILED_PARTIAL = 1,
FAILED_CONFIGURING = 2,
FAILED_ILLEGAL_ARGUMENTS = 3,
FAILED_UNKNOWN = 4,
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum BufferStatus {
OK = 0,
ERROR = 1,
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable CameraBlob {
android.hardware.camera.device.CameraBlobId blobId;
int blobSizeBytes;
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum CameraBlobId {
JPEG = 255,
JPEG_APP_SEGMENTS = 256,
}

View File

@@ -0,0 +1,38 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable CameraMetadata {
byte[] metadata;
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable CameraOfflineSessionInfo {
android.hardware.camera.device.OfflineStream[] offlineStreams;
android.hardware.camera.device.OfflineRequest[] offlineRequests;
}

View File

@@ -0,0 +1,45 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable CaptureRequest {
int frameNumber;
long fmqSettingsSize;
android.hardware.camera.device.CameraMetadata settings;
android.hardware.camera.device.StreamBuffer inputBuffer;
int inputWidth;
int inputHeight;
android.hardware.camera.device.StreamBuffer[] outputBuffers;
android.hardware.camera.device.PhysicalCameraSetting[] physicalCameraSettings;
}

View File

@@ -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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable CaptureResult {
int frameNumber;
long fmqResultSize;
android.hardware.camera.device.CameraMetadata result;
android.hardware.camera.device.StreamBuffer[] outputBuffers;
android.hardware.camera.device.StreamBuffer inputBuffer;
int partialResult;
android.hardware.camera.device.PhysicalCameraMetadata[] physicalCameraMetadata;
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum ErrorCode {
ERROR_DEVICE = 1,
ERROR_REQUEST = 2,
ERROR_RESULT = 3,
ERROR_BUFFER = 4,
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable ErrorMsg {
int frameNumber;
int errorStreamId;
android.hardware.camera.device.ErrorCode errorCode;
}

View File

@@ -0,0 +1,45 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable HalStream {
int id;
android.hardware.graphics.common.PixelFormat overrideFormat;
android.hardware.graphics.common.BufferUsage producerUsage;
android.hardware.graphics.common.BufferUsage consumerUsage;
int maxBuffers;
android.hardware.graphics.common.Dataspace overrideDataSpace;
String physicalCameraId;
boolean supportOffline;
}

View File

@@ -0,0 +1,47 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
interface ICameraDevice {
void dumpState(in ParcelFileDescriptor fd);
android.hardware.camera.device.CameraMetadata getCameraCharacteristics();
android.hardware.camera.device.CameraMetadata getPhysicalCameraCharacteristics(in String physicalCameraId);
android.hardware.camera.common.CameraResourceCost getResourceCost();
boolean isStreamCombinationSupported(in android.hardware.camera.device.StreamConfiguration streams);
android.hardware.camera.device.ICameraDeviceSession open(in android.hardware.camera.device.ICameraDeviceCallback callback);
android.hardware.camera.device.ICameraInjectionSession openInjectionSession(in android.hardware.camera.device.ICameraDeviceCallback callback);
void setTorchMode(boolean on);
void turnOnTorchWithStrengthLevel(int torchStrength);
int getTorchStrengthLevel();
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
interface ICameraDeviceCallback {
void notify(in android.hardware.camera.device.NotifyMsg[] msgs);
void processCaptureResult(in android.hardware.camera.device.CaptureResult[] results);
android.hardware.camera.device.BufferRequestStatus requestStreamBuffers(in android.hardware.camera.device.BufferRequest[] bufReqs, out android.hardware.camera.device.StreamBufferRet[] buffers);
void returnStreamBuffers(in android.hardware.camera.device.StreamBuffer[] buffers);
}

View File

@@ -0,0 +1,48 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
interface ICameraDeviceSession {
void close();
android.hardware.camera.device.HalStream[] configureStreams(in android.hardware.camera.device.StreamConfiguration requestedConfiguration);
android.hardware.camera.device.CameraMetadata constructDefaultRequestSettings(in android.hardware.camera.device.RequestTemplate type);
void flush();
android.hardware.common.fmq.MQDescriptor<byte,android.hardware.common.fmq.SynchronizedReadWrite> getCaptureRequestMetadataQueue();
android.hardware.common.fmq.MQDescriptor<byte,android.hardware.common.fmq.SynchronizedReadWrite> getCaptureResultMetadataQueue();
boolean isReconfigurationRequired(in android.hardware.camera.device.CameraMetadata oldSessionParams, in android.hardware.camera.device.CameraMetadata newSessionParams);
int processCaptureRequest(in android.hardware.camera.device.CaptureRequest[] requests, in android.hardware.camera.device.BufferCache[] cachesToRemove);
oneway void signalStreamFlush(in int[] streamIds, in int streamConfigCounter);
android.hardware.camera.device.ICameraOfflineSession switchToOffline(in int[] streamsToKeep, out android.hardware.camera.device.CameraOfflineSessionInfo offlineSessionInfo);
void repeatingRequestEnd(in int frameNumber, in int[] streamIds);
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
interface ICameraInjectionSession {
void configureInjectionStreams(in android.hardware.camera.device.StreamConfiguration requestedConfiguration, in android.hardware.camera.device.CameraMetadata characteristics);
android.hardware.camera.device.ICameraDeviceSession getCameraDeviceSession();
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
interface ICameraOfflineSession {
void close();
android.hardware.common.fmq.MQDescriptor<byte,android.hardware.common.fmq.SynchronizedReadWrite> getCaptureResultMetadataQueue();
void setCallback(in android.hardware.camera.device.ICameraDeviceCallback cb);
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
union NotifyMsg {
android.hardware.camera.device.ErrorMsg error;
android.hardware.camera.device.ShutterMsg shutter;
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable OfflineRequest {
int frameNumber;
int[] pendingStreams;
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable OfflineStream {
int id;
int numOutstandingBuffers;
long[] circulatingBufferIds;
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable PhysicalCameraMetadata {
long fmqMetadataSize;
String physicalCameraId;
android.hardware.camera.device.CameraMetadata metadata;
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable PhysicalCameraSetting {
long fmqSettingsSize;
String physicalCameraId;
android.hardware.camera.device.CameraMetadata settings;
}

View File

@@ -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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum RequestTemplate {
PREVIEW = 1,
STILL_CAPTURE = 2,
VIDEO_RECORD = 3,
VIDEO_SNAPSHOT = 4,
ZERO_SHUTTER_LAG = 5,
MANUAL = 6,
VENDOR_TEMPLATE_START = 1073741824,
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable ShutterMsg {
int frameNumber;
long timestamp;
long readoutTimestamp;
}

View File

@@ -0,0 +1,50 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable Stream {
int id;
android.hardware.camera.device.StreamType streamType;
int width;
int height;
android.hardware.graphics.common.PixelFormat format;
android.hardware.graphics.common.BufferUsage usage;
android.hardware.graphics.common.Dataspace dataSpace;
android.hardware.camera.device.StreamRotation rotation;
String physicalCameraId;
int bufferSize;
int groupId;
android.hardware.camera.metadata.SensorPixelMode[] sensorPixelModesUsed;
android.hardware.camera.metadata.RequestAvailableDynamicRangeProfilesMap dynamicRangeProfile;
}

View File

@@ -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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable StreamBuffer {
int streamId;
long bufferId;
android.hardware.common.NativeHandle buffer;
android.hardware.camera.device.BufferStatus status;
android.hardware.common.NativeHandle acquireFence;
android.hardware.common.NativeHandle releaseFence;
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum StreamBufferRequestError {
NO_BUFFER_AVAILABLE = 1,
MAX_BUFFER_EXCEEDED = 2,
STREAM_DISCONNECTED = 3,
UNKNOWN_ERROR = 4,
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable StreamBufferRet {
int streamId;
android.hardware.camera.device.StreamBuffersVal val;
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
union StreamBuffersVal {
android.hardware.camera.device.StreamBufferRequestError error = android.hardware.camera.device.StreamBufferRequestError.UNKNOWN_ERROR;
android.hardware.camera.device.StreamBuffer[] buffers;
}

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@VintfStability
parcelable StreamConfiguration {
android.hardware.camera.device.Stream[] streams;
android.hardware.camera.device.StreamConfigurationMode operationMode;
android.hardware.camera.device.CameraMetadata sessionParams;
int streamConfigCounter;
boolean multiResolutionInputImage;
}

View File

@@ -0,0 +1,47 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum StreamConfigurationMode {
NORMAL_MODE = 0,
CONSTRAINED_HIGH_SPEED_MODE = 1,
VENDOR_MODE_0 = 32768,
VENDOR_MODE_1 = 32769,
VENDOR_MODE_2 = 32770,
VENDOR_MODE_3 = 32771,
VENDOR_MODE_4 = 32772,
VENDOR_MODE_5 = 32773,
VENDOR_MODE_6 = 32774,
VENDOR_MODE_7 = 32775,
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum StreamRotation {
ROTATION_0 = 0,
ROTATION_90 = 1,
ROTATION_180 = 2,
ROTATION_270 = 3,
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 <name>-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.device;
@Backing(type="int") @VintfStability
enum StreamType {
OUTPUT = 0,
INPUT = 1,
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* BufferCache:
*
* A bufferId associated with a certain stream.
* Buffers are passed between camera service and camera HAL via bufferId except
* the first time a new buffer is being passed to HAL in CaptureRequest. Camera
* service and camera HAL therefore need to maintain a cached map of bufferId
* and corresponing native handle.
*
*/
@VintfStability
parcelable BufferCache {
/**
* The ID of the stream this list is associated with.
*/
int streamId;
/**
* A cached buffer ID associated with streamId.
*/
long bufferId;
}

View File

@@ -0,0 +1,24 @@
/*
* 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.
*/
package android.hardware.camera.device;
@VintfStability
parcelable BufferRequest {
int streamId;
int numBuffersRequested;
}

View File

@@ -0,0 +1,51 @@
/*
* 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.
*/
package android.hardware.camera.device;
@VintfStability
@Backing(type="int")
enum BufferRequestStatus {
/**
* Method call succeeded and all requested buffers are returned.
*/
OK = 0,
/**
* Method call failed for some streams. Check per stream status for each
* returned StreamBufferRet.
*/
FAILED_PARTIAL = 1,
/**
* Method call failed for all streams and no buffers are returned at all.
* Camera service is about to or is performing configureStreams. HAL must
* wait until next configureStreams call is finished before requesting
* buffers again.
*/
FAILED_CONFIGURING = 2,
/**
* Method call failed for all streams and no buffers are returned at all.
* Failure due to bad BufferRequest input, eg: unknown streamId or repeated
* streamId.
*/
FAILED_ILLEGAL_ARGUMENTS = 3,
/**
* Method call failed for all streams and no buffers are returned at all.
* Failure due to unknown reason, or all streams has individual failing
* reason. For the latter case, check per stream status for each returned
* StreamBufferRet.
*/
FAILED_UNKNOWN = 4,
}

View File

@@ -0,0 +1,38 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* BufferStatus:
*
* The current status of a single stream buffer.
*/
@VintfStability
@Backing(type="int")
enum BufferStatus {
/**
* The buffer is in a normal state, and can be used after waiting on its
* sync fence.
*/
OK = 0,
/**
* The buffer does not contain valid data, and the data in it must not be
* used. The sync fence must still be waited on before reusing the buffer.
*/
ERROR = 1,
}

View File

@@ -0,0 +1,26 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.CameraBlobId;
@VintfStability
parcelable CameraBlob {
CameraBlobId blobId;
int blobSizeBytes;
}

View File

@@ -0,0 +1,67 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* CameraBlob:
*
* Transport header for camera blob types; generally compressed JPEG buffers in
* output streams.
*
* To capture JPEG images, a stream is created using the pixel format
* HAL_PIXEL_FORMAT_BLOB and dataspace HAL_DATASPACE_V0_JFIF. The buffer size
* for the stream is calculated by the framework, based on the static metadata
* field android.jpeg.maxSize. Since compressed JPEG images are of variable
* size, the HAL needs to include the final size of the compressed image using
* this structure inside the output stream buffer. The camera blob ID field must
* be set to CameraBlobId::JPEG.
*
* The transport header must be at the end of the JPEG output stream
* buffer. That means the jpegBlobId must start at byte[buffer_size -
* sizeof(CameraBlob)], where the buffer_size is the size of gralloc
* buffer. Any HAL using this transport header must account for it in
* android.jpeg.maxSize. The JPEG data itself starts at the beginning of the
* buffer and must be blobSize bytes long.
*
* It also supports transport of JPEG APP segments blob, which contains JPEG APP1 to
* APPn (Application Marker) segments as specified in JEITA CP-3451.
*
* To capture a JPEG APP segments blob, a stream is created using the pixel format
* HAL_PIXEL_FORMAT_BLOB and dataspace HAL_DATASPACE_JPEG_APP_SEGMENTS. The buffer
* size for the stream is calculated by the framework, based on the static
* metadata field android.heic.maxAppSegmentsCount, and is assigned to both
* Stream width and Stream bufferSize. Camera framework sets
* Stream height to 1.
*
* Similar to JPEG image, the JPEG APP segment images can be of variable size,
* so the HAL needs to include the final size of all APP segments using this
* structure inside the output stream buffer. The camera blob ID field must be
* set to CameraBlobId::JPEG_APP_SEGMENTS.
*
* The transport header must be at the end of the JPEG APP segments output stream
* buffer. That means the blobId must start at byte[buffer_size -
* sizeof(CameraBlob)], where the buffer_size is the size of gralloc
* buffer. The JPEG APP segments data itself starts at the beginning of the
* buffer and must be blobSize bytes long.
*/
@VintfStability
@Backing(type="int")
enum CameraBlobId {
JPEG = 0x00FF,
JPEG_APP_SEGMENTS = 0x100,
}

View File

@@ -0,0 +1,29 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* Wrapper parcelable for CameraMetadata
*/
@VintfStability
parcelable CameraMetadata {
/**
* A serialized metadata buffer created by libcamera_metadata.
* Access by casting to a camera_metadata* and using libcamera_metadata methods
*/
byte[] metadata;
}

View File

@@ -0,0 +1,45 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.OfflineRequest;
import android.hardware.camera.device.OfflineStream;
/**
* CameraOfflineSessionInfo:
*
* Information about pending outputs that's being transferred to an offline
* session from an active session using the
* ICameraDeviceSession#switchToOffline method.
*
*/
@VintfStability
parcelable CameraOfflineSessionInfo {
/**
* Information on what streams will be preserved in offline session.
* Streams not listed here will be removed by camera service after
* switchToOffline call returns.
*/
OfflineStream[] offlineStreams;
/**
* Information for requests that will be handled by offline session
* Camera service will validate this matches what camera service has on
* record.
*/
OfflineRequest[] offlineRequests;
}

View File

@@ -0,0 +1,128 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.CameraMetadata;
import android.hardware.camera.device.PhysicalCameraSetting;
import android.hardware.camera.device.StreamBuffer;
/**
* CaptureRequest:
*
* A single request for image capture/buffer reprocessing, sent to the Camera
* HAL device by the framework in processCaptureRequest().
*
* The request contains the settings to be used for this capture, and the set of
* output buffers to write the resulting image data in. It may optionally
* contain an input buffer, in which case the request is for reprocessing that
* input buffer instead of capturing a new image with the camera sensor. The
* capture is identified by the frameNumber.
*
* In response, the camera HAL device must send a CaptureResult
* structure asynchronously to the framework, using the processCaptureResult()
* callback.
*/
@VintfStability
parcelable CaptureRequest {
/**
* The frame number is an incrementing integer set by the framework to
* uniquely identify this capture. It needs to be returned in the result
* call, and is also used to identify the request in asynchronous
* notifications sent to ICameraDevice3Callback::notify().
*/
int frameNumber;
/**
* If non-zero, read settings from request queue instead
* (see ICameraDeviceSession.getCaptureRequestMetadataQueue).
* If zero, read settings from .settings field.
*/
long fmqSettingsSize;
/**
* If fmqSettingsSize is zero,
* the settings buffer contains the capture and processing parameters for
* the request. As a special case, an empty settings buffer indicates that
* the settings are identical to the most-recently submitted capture
* request. A empty buffer cannot be used as the first submitted request
* after a configureStreams() call.
*
* This field must be used if fmqSettingsSize is zero. It must not be used
* if fmqSettingsSize is non-zero.
*/
CameraMetadata settings;
/**
* The input stream buffer to use for this request, if any.
*
* An invalid inputBuffer is signified by a null inputBuffer::buffer, in
* which case the value of all other members of inputBuffer must be ignored.
*
* If inputBuffer is invalid, then the request is for a new capture from the
* imager. If inputBuffer is valid, the request is for reprocessing the
* image contained in inputBuffer, and the HAL must release the inputBuffer
* back to the client in a subsequent processCaptureResult call.
*
* The HAL is required to wait on the acquire sync fence of the input buffer
* before accessing it.
*
*/
StreamBuffer inputBuffer;
/**
* The width and height of the input buffer for this capture request.
*
* These fields will be [0, 0] if no input buffer exists in the capture
* request.
*
* If the stream configuration contains an input stream and has the
* multiResolutionInputImage flag set to true, the camera client may submit a
* reprocessing request with input buffer size different than the
* configured input stream size. In that case, the inputWith and inputHeight
* fields will be the actual size of the input image.
*
* If the stream configuration contains an input stream and the
* multiResolutionInputImage flag is false, the inputWidth and inputHeight must
* match the input stream size.
*/
int inputWidth;
int inputHeight;
/**
* An array of at least 1 stream buffers, to be filled with image
* data from this capture/reprocess. The HAL must wait on the acquire fences
* of each stream buffer before writing to them.
*
* The HAL takes ownership of the handles in outputBuffers; the client
* must not access them until they are returned in a CaptureResult.
*
* Any or all of the buffers included here may be brand new in this
* request (having never before seen by the HAL).
*/
StreamBuffer[] outputBuffers;
/**
* A vector containing individual camera settings for logical camera backed by multiple physical
* devices. In case the vector is empty, Hal should use the settings field. The
* individual settings should only be honored for physical devices that have respective Hal
* stream. Physical devices that have a corresponding Hal stream but don't have attached
* settings here should use the settings field.
* If any of the physical settings in the array are applied on one or more devices, then the
* visual effect on any Hal streams attached to the logical camera is undefined.
*/
PhysicalCameraSetting[] physicalCameraSettings;
}

View File

@@ -0,0 +1,209 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.CameraMetadata;
import android.hardware.camera.device.PhysicalCameraMetadata;
import android.hardware.camera.device.StreamBuffer;
/**
* CaptureResult:
*
* The result of a single capture/reprocess by the camera HAL device. This is
* sent to the framework asynchronously with processCaptureResult(), in
* response to a single capture request sent to the HAL with
* processCaptureRequest(). Multiple processCaptureResult() calls may be
* performed by the HAL for each request.
*
* Each call, all with the same frame
* number, may contain some subset of the output buffers, and/or the result
* metadata.
*
* The result structure contains the output metadata from this capture, and the
* set of output buffers that have been/will be filled for this capture. Each
* output buffer may come with a release sync fence that the framework must wait
* on before reading, in case the buffer has not yet been filled by the HAL.
*
* The metadata may be provided multiple times for a single frame number. The
* framework must accumulate together the final result set by combining each
* partial result together into the total result set.
*
* If an input buffer is given in a request, the HAL must return it in one of
* the processCaptureResult calls, and the call may be to just return the
* input buffer, without metadata and output buffers; the sync fences must be
* handled the same way they are done for output buffers.
*
* Performance considerations:
*
* Applications receive these partial results immediately, so sending partial
* results is a highly recommended performance optimization to avoid the total
* pipeline latency before sending the results for what is known very early on
* in the pipeline.
*
* A typical use case might be calculating the AF state halfway through the
* pipeline; by sending the state back to the framework immediately, we get a
* 50% performance increase and perceived responsiveness of the auto-focus.
*
* Physical camera metadata needs to be generated if and only if a
* request is pending on a stream from that physical camera. For example,
* if the processCaptureRequest call doesn't request on physical camera
* streams, the physicalCameraMetadata field of the CaptureResult being returned
* should be an 0-size vector. If the processCaptureRequest call requests on
* streams from one of the physical camera, the physicalCameraMetadata field
* should contain one metadata describing the capture from that physical camera.
*
* For a CaptureResult that contains physical camera metadata, its
* partialResult field must be android.request.partialResultCount. In other
* words, the physicalCameraMetadata must only be contained in a final capture
* result.
*/
@VintfStability
parcelable CaptureResult {
/**
* The frame number is an incrementing integer set by the framework in the
* submitted request to uniquely identify this capture. It is also used to
* identify the request in asynchronous notifications sent to
* ICameraDevice3Callback::notify().
*/
int frameNumber;
/**
* If non-zero, read result from result queue instead
* (see ICameraDeviceSession.getCaptureResultMetadataQueue).
* If zero, read result from .result field.
*/
long fmqResultSize;
/**
* The result metadata for this capture. This contains information about the
* final capture parameters, the state of the capture and post-processing
* hardware, the state of the 3A algorithms, if enabled, and the output of
* any enabled statistics units.
*
* If there was an error producing the result metadata, result must be an
* empty metadata buffer, and notify() must be called with
* ErrorCode::ERROR_RESULT.
*
* Multiple calls to processCaptureResult() with a given frameNumber
* may include (partial) result metadata.
*
* Partial metadata submitted must not include any metadata key returned
* in a previous partial result for a given frame. Each new partial result
* for that frame must also set a distinct partialResult value.
*
* If notify has been called with ErrorCode::ERROR_RESULT, all further
* partial results for that frame are ignored by the framework.
*/
CameraMetadata result;
/**
* The completed output stream buffers for this capture.
*
* They may not yet be filled at the time the HAL calls
* processCaptureResult(); the framework must wait on the release sync
* fences provided by the HAL before reading the buffers.
*
* The StreamBuffer::buffer handle must be null for all returned buffers;
* the client must cache the handle and look it up via the combination of
* frame number and stream ID.
*
* The number of output buffers returned must be less than or equal to the
* matching capture request's count. If this is less than the buffer count
* in the capture request, at least one more call to processCaptureResult
* with the same frameNumber must be made, to return the remaining output
* buffers to the framework. This may only be zero if the structure includes
* valid result metadata or an input buffer is returned in this result.
*
* The HAL must set the stream buffer's release sync fence to a valid sync
* fd, or to null if the buffer has already been filled.
*
* If the HAL encounters an error while processing the buffer, and the
* buffer is not filled, the buffer's status field must be set to ERROR. If
* the HAL did not wait on the acquire fence before encountering the error,
* the acquire fence must be copied into the release fence, to allow the
* framework to wait on the fence before reusing the buffer.
*
* The acquire fence must be set to null for all output buffers.
*
* This vector may be empty; if so, at least one other processCaptureResult
* call must be made (or have been made) by the HAL to provide the filled
* output buffers.
*
* When processCaptureResult is called with a new buffer for a frame,
* all previous frames' buffers for that corresponding stream must have been
* already delivered (the fences need not have yet been signaled).
*
* Buffers for a frame may be sent to framework before the corresponding
* SHUTTER-notify call is made by the HAL.
*
* Performance considerations:
*
* Buffers delivered to the framework are not dispatched to the
* application layer until a start of exposure timestamp has been received
* via a SHUTTER notify() call. It is highly recommended to
* dispatch that call as early as possible.
*/
StreamBuffer[] outputBuffers;
/**
* The handle for the input stream buffer for this capture, if any.
*
* It may not yet be consumed at the time the HAL calls
* processCaptureResult(); the framework must wait on the release sync fence
* provided by the HAL before reusing the buffer.
*
* The HAL must handle the sync fences the same way they are done for
* outputBuffers.
*
* Only one input buffer is allowed to be sent per request. Similarly to
* output buffers, the ordering of returned input buffers must be
* maintained by the HAL.
*
* Performance considerations:
*
* The input buffer should be returned as early as possible. If the HAL
* supports sync fences, it can call processCaptureResult to hand it back
* with sync fences being set appropriately. If the sync fences are not
* supported, the buffer can only be returned when it is consumed, which
* may take long time; the HAL may choose to copy this input buffer to make
* the buffer return sooner.
*/
StreamBuffer inputBuffer;
/**
* In order to take advantage of partial results, the HAL must set the
* static metadata android.request.partialResultCount to the number of
* partial results it sends for each frame.
*
* Each new capture result with a partial result must set
* this field to a distinct inclusive value between
* 1 and android.request.partialResultCount.
*
* HALs not wishing to take advantage of this feature must not
* set an android.request.partialResultCount or partial_result to a value
* other than 1.
*
* This value must be set to 0 when a capture result contains buffers only
* and no metadata.
*/
int partialResult;
/**
* The physical metadata for logical multi-camera.
*/
PhysicalCameraMetadata[] physicalCameraMetadata;
}

View File

@@ -0,0 +1,59 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* Defined error codes for the NotifyMsg union in ICameraDeviceCallback.notify callbacks.
*/
@VintfStability
@Backing(type="int")
enum ErrorCode {
/**
* A serious failure occurred. No further frames or buffer streams must
* be produced by the device. Device must be treated as closed. The
* client must reopen the device to use it again. The frameNumber field
* is unused.
*/
ERROR_DEVICE = 1,
/**
* An error has occurred in processing a request. No output (metadata or
* buffers) must be produced for this request. The frameNumber field
* specifies which request has been dropped. Subsequent requests are
* unaffected, and the device remains operational.
*/
ERROR_REQUEST = 2,
/**
* An error has occurred in producing an output result metadata buffer
* for a request, but output stream buffers for it must still be
* available. Subsequent requests are unaffected, and the device remains
* operational. The frameNumber field specifies the request for which
* result metadata won't be available.
*/
ERROR_RESULT = 3,
/**
* An error has occurred in placing an output buffer into a stream for a
* request. The frame metadata and other buffers may still be
* available. Subsequent requests are unaffected, and the device remains
* operational. The frameNumber field specifies the request for which the
* buffer was dropped, and errorStreamId indicates the stream
* that dropped the frame.
*/
ERROR_BUFFER = 4,
}

View File

@@ -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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.ErrorCode;
/**
* ErrorMsg:
*
* Message contents for MsgType::ERROR
*/
@VintfStability
parcelable ErrorMsg {
/**
* Frame number of the request the error applies to. 0 if the frame number
* isn't applicable to the error.
*/
int frameNumber;
/**
* Pointer to the stream that had a failure. -1 if the stream isn't
* applicable to the error.
*/
int errorStreamId;
/**
* The code for this error.
*/
ErrorCode errorCode;
}

View File

@@ -0,0 +1,127 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* HalStream:
*
* The camera HAL's response to each requested stream configuration.
*
* The HAL may specify the desired format, maximum buffers, usage flags, physical camera id for
* each stream.
*
*/
@VintfStability
parcelable HalStream {
/**
* Stream ID - a nonnegative integer identifier for a stream.
*
* The ID must be one of the stream IDs passed into configureStreams.
*/
int id;
/**
* An override pixel format for the buffers in this stream.
*
* The HAL must respect the requested format in Stream unless it is
* IMPLEMENTATION_DEFINED, in which case the override format here must be
* used by the client instead, for this stream. This allows cross-platform
* HALs to use a standard format since IMPLEMENTATION_DEFINED formats often
* require device-specific information. In all other cases, the
* overrideFormat must match the requested format.
*
* When HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is used, then the platform
* gralloc module must select a format based on the usage flags provided by
* the camera device and the other endpoint of the stream.
*/
android.hardware.graphics.common.PixelFormat overrideFormat;
/**
* The bitfield gralloc usage flags for this stream, as needed by the HAL.
*
* For output streams, these are the HAL's producer usage flags. For input
* streams, these are the HAL's consumer usage flags. The usage flags from
* the producer and the consumer must be combined together and then passed
* to the platform graphics allocator HAL for allocating the gralloc buffers
* for each stream.
*
* If the stream's type is INPUT, then producerUsage must be 0, and
* consumerUsage must be set. For other types, producerUsage must be set,
* and consumerUsage must be 0.
*/
android.hardware.graphics.common.BufferUsage producerUsage;
android.hardware.graphics.common.BufferUsage consumerUsage;
/**
* The maximum number of buffers the HAL device may need to have dequeued at
* the same time. The HAL device may not have more buffers in-flight from
* this stream than this value.
*/
int maxBuffers;
/**
* A bitfield override dataSpace for the buffers in this stream.
*
* The HAL must respect the requested dataSpace in Stream unless it is
* IMPLEMENTATION_DEFINED, in which case the override dataSpace here must be
* used by the client instead, for this stream. This allows cross-platform
* HALs to use a specific dataSpace since IMPLEMENTATION_DEFINED formats often
* require device-specific information for correct selection. In all other cases, the
* overrideFormat must match the requested format.
*/
android.hardware.graphics.common.Dataspace overrideDataSpace;
/**
* The physical camera id the current Hal stream belongs to.
*
* If current camera device isn't a logical camera, or the Hal stream isn't
* from a physical camera of the logical camera, this must be an empty
* string.
*
* A logical camera is a camera device backed by multiple physical camera
* devices.
*
* When not empty, this field is the <id> field of one of the full-qualified device
* instance names returned by getCameraIdList().
*/
String physicalCameraId;
/**
* Whether this stream can be switch to offline mode.
*
* For devices that does not support the OFFLINE_PROCESSING capability, this
* fields will always be false.
*
* For backward compatible camera devices that support the
* OFFLINE_PROCESSING capability: any input stream and any output stream
* that can be output of the input stream must set this field to true. Also
* any stream of YUV420_888 format or JPEG format, with CPU_READ usage flag,
* must set this field to true.
*
* For depth only camera devices that support the OFFLINE_PROCESSING
* capability: any DEPTH16 output stream must set this field to true.
*
* All other streams are up to camera HAL to advertise support or not,
* though it is not recommended to list support for streams with
* hardware composer or video encoder usage flags as these streams tend
* to be targeted continuously and can lead to long latency when trying to
* switch to offline.
*
*/
boolean supportOffline;
}

View File

@@ -0,0 +1,372 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.common.CameraResourceCost;
import android.hardware.camera.device.CameraMetadata;
import android.hardware.camera.device.ICameraDeviceCallback;
import android.hardware.camera.device.ICameraDeviceSession;
import android.hardware.camera.device.ICameraInjectionSession;
import android.hardware.camera.device.StreamConfiguration;
import android.os.ParcelFileDescriptor;
/**
* Camera device interface
*
* Supports the android.hardware.Camera API, and the android.hardware.camera2
* API at LIMITED or better hardware level.
*
*/
@VintfStability
interface ICameraDevice {
/**
* dumpState:
*
* Print out debugging state for the camera device. This may be called by
* the framework when the camera service is asked for a debug dump, which
* happens when using the dumpsys tool, or when capturing a bugreport.
*
* The passed-in file descriptor can be used to write debugging text using
* dprintf() or write().
*
* In case this camera device has been disconnected, the dump must not fail,
* but may simply print out 'Device disconnected' or equivalent.
*
* Performance requirements:
*
* This must be a non-blocking call. The HAL should return from this call
* in 1ms, must return from this call in 10ms. This call must avoid
* deadlocks, as it may be called at any point during camera operation.
* Any synchronization primitives used (such as mutex locks or semaphores)
* must be acquired with a timeout.
*
* @param fd The file descriptor to which the camera HAL must write any dumpState information.
*/
void dumpState(in ParcelFileDescriptor fd);
/**
* getCameraCharacteristics:
*
* Return the static camera information for this camera device. This
* information may not change between consecutive calls.
*
* When an external camera is disconnected, its camera id becomes
* invalid. Calling this method with this invalid camera id must result in an
* ILLEGAL_ARGUMENT ServiceSpecificException on returning; this may happen even before the
* device status callback is invoked by the HAL.
*
* A service specific error will be returned on the following conditions
* INTERNAL_ERROR:
* The camera device cannot be opened due to an internal
* error.
* CAMERA_DISCONNECTED:
* An external camera device has been disconnected, and is no longer
* available. This camera device interface is now stale, and a new
* instance must be acquired if the device is reconnected. All
* subsequent calls on this interface must return
* CAMERA_DISCONNECTED.
*
* @return The static metadata for this camera device, or an empty metadata
* structure if status is not OK.
*
*/
CameraMetadata getCameraCharacteristics();
/**
* getPhysicalCameraCharacteristics:
*
* Return the static camera information for a physical camera ID backing
* this logical camera device. This information may not change between consecutive calls.
*
* The characteristics of all cameras returned by
* ICameraProvider::getCameraIdList() must be queried via
* getCameraCharacteristics(). Calling getPhysicalCameraCharacteristics() on
* those cameras must return ILLEGAL_ARGUMENT ServiceSpecificException.
*
* @param physicalCameraId The physical camera id parsed from the logical
* camera's ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS static metadata
* key. The framework assumes that this ID is just the <id> part of fully
* qualified camera device name "device@<major>.<minor>/<type>/<id>". And
* the physical camera must be of the same version and type as the parent
* logical camera device.
*
* A service specific error will be returned on the following conditions
* INTERNAL_ERROR:
* The camera device cannot be opened due to an internal
* error.
* CAMERA_DISCONNECTED:
* An external camera device has been disconnected, and is no longer
* available. This camera device interface is now stale, and a new
* instance must be acquired if the device is reconnected. All
* subsequent calls on this interface must return
* CAMERA_DISCONNECTED.
* ILLEGAL_ARGUMENT:
* If the physicalCameraId is not a valid physical camera Id outside
* of ICameraProvider::getCameraIdList().
*
* @return The static metadata for this logical camera device's physical device, or an empty
* metadata structure if a service specific error is returned.
*
*/
CameraMetadata getPhysicalCameraCharacteristics(in String physicalCameraId);
/**
* Get camera device resource cost information.
*
* A service specific error will be returned on the following conditions
* INTERNAL_ERROR:
* An unexpected internal camera HAL error occurred, and the
* resource cost is not available.
* CAMERA_DISCONNECTED:
* An external camera device has been disconnected, and is no longer
* available. This camera device interface is now stale, and a new
* instance must be acquired if the device is reconnected. All
* subsequent calls on this interface must return
* CAMERA_DISCONNECTED.
* @return resourceCost
* The resources required to open this camera device, or unspecified
* values if status is not OK.
*/
CameraResourceCost getResourceCost();
/**
* isStreamCombinationSupported:
*
* Check for device support of specific camera stream combination.
*
* The streamList must contain at least one output-capable stream, and may
* not contain more than one input-capable stream.
* In contrast to regular stream configuration the framework does not create
* or initialize any actual streams. This means that Hal must not use or
* consider the stream "id" value.
*
* ------------------------------------------------------------------------
*
* Preconditions:
*
* The framework can call this method at any time before, during and
* after active session configuration. This means that calls must not
* impact the performance of pending camera requests in any way. In
* particular there must not be any glitches or delays during normal
* camera streaming.
*
* Performance requirements:
* This call is expected to be significantly faster than stream
* configuration. In general HW and SW camera settings must not be
* changed and there must not be a user-visible impact on camera performance.
*
*
* A service specific error will be returned on the following conditions
*
* INTERNAL_ERROR:
* The stream combination query cannot complete due to internal
* error.
* @param streams The StreamConfiguration to be tested for support.
* @return true in case the stream combination is supported, false otherwise.
*
*/
boolean isStreamCombinationSupported(in StreamConfiguration streams);
/**
* open:
*
* Power on and initialize this camera device for active use, returning a
* session handle for active operations.
*
* @param callback Interface to invoke by the HAL for device asynchronous
* events.
*
* A service specific error will be returned on the following conditions
* INTERNAL_ERROR:
* The camera device cannot be opened due to an internal
* error.
* ILLEGAL_ARGUMENT:
* The callbacks handle is invalid (for example, it is null).
* CAMERA_IN_USE:
* This camera device is already open.
* MAX_CAMERAS_IN_USE:
* The maximal number of camera devices that can be
* opened concurrently were opened already.
* CAMERA_DISCONNECTED:
* This external camera device has been disconnected, and is no
* longer available. This interface is now stale, and a new instance
* must be acquired if the device is reconnected. All subsequent
* calls on this interface must return CAMERA_DISCONNECTED.
* @return The interface to the newly-opened camera session,
* or null if status is not OK.
*/
ICameraDeviceSession open(in ICameraDeviceCallback callback);
/**
* openInjection:
*
* Similar to open, except that this return an ICameraInjectionSession instead.
* Details about ICameraInjectionSession can be found in ICameraInjectionSession.aidl
*
* @param callback Interface to invoke by the HAL for device asynchronous
* events.
*
* A service specific error will be returned on the following conditions
* INTERNAL_ERROR:
* The camera device cannot be opened due to an internal
* error.
* ILLEGAL_ARGUMENT:
* The callbacks handle is invalid (for example, it is null).
* CAMERA_IN_USE:
* This camera device is already open.
* MAX_CAMERAS_IN_USE:
* The maximal number of camera devices that can be
* opened concurrently were opened already.
* CAMERA_DISCONNECTED:
* This external camera device has been disconnected, and is no
* longer available. This interface is now stale, and a new instance
* must be acquired if the device is reconnected. All subsequent
* calls on this interface must return CAMERA_DISCONNECTED.
* @return The interface to the newly-opened camera session,
* or null if status is not OK.
*/
ICameraInjectionSession openInjectionSession(in ICameraDeviceCallback callback);
/**
* setTorchMode:
*
* Turn on or off the torch mode of the flash unit associated with this
* camera device. If the operation is successful, HAL must notify the
* framework torch state by invoking
* ICameraProviderCallback::torchModeStatusChange() with the new state.
*
* An active camera session has a higher priority accessing the flash
* unit. When there are any resource conflicts, such as when open() is
* called to fully activate a camera device, the provider must notify the
* framework through ICameraProviderCallback::torchModeStatusChange() that
* the torch mode has been turned off and the torch mode state has become
* TORCH_MODE_STATUS_NOT_AVAILABLE. When resources to turn on torch mode
* become available again, the provider must notify the framework through
* ICameraProviderCallback::torchModeStatusChange() that the torch mode
* state has become TORCH_MODE_STATUS_AVAILABLE_OFF for set_torch_mode() to
* be called.
*
* When the client calls setTorchMode() to turn on the torch mode of a flash
* unit, if the HAL cannot keep multiple torch modes on simultaneously, the
* HAL must turn off the torch mode(s) that were turned on by previous
* setTorchMode() calls and notify the framework that the torch mode state
* of those flash unit(s) has become TORCH_MODE_STATUS_AVAILABLE_OFF.
*
* @param on Whether to turn the turn mode ON - specified by true or OFF, specified by false
*
* A service specific error will be returned on the following conditions
*
* INTERNAL_ERROR:
* The flash unit cannot be operated due to an unexpected internal
* error.
* ILLEGAL_ARGUMENT:
* The camera ID is unknown.
* CAMERA_IN_USE:
* This camera device has been opened, so the torch cannot be
* controlled until it is closed.
* MAX_CAMERAS_IN_USE:
* Due to other camera devices being open, or due to other
* resource constraints, the torch cannot be controlled currently.
* OPERATION_NOT_SUPPORTED:
* This camera device does not have a flash unit. This can
* be returned if and only if android.flash.info.available is
* false.
* CAMERA_DISCONNECTED:
* An external camera device has been disconnected, and is no longer
* available. This camera device interface is now stale, and a new
* instance must be acquired if the device is reconnected. All
* subsequent calls on this interface must return
* CAMERA_DISCONNECTED.
*
*/
void setTorchMode(boolean on);
/**
* turnOnTorchWithStrengthLevel:
*
* Change the brightness level of the flash unit associated with this camera device
* and set it to value in torchStrength. This function also turns ON the torch
* with specified torchStrength if the torch is OFF.
*
* The torchStrength value must be within the valid range i.e. >=1 and
* <= FLASH_INFO_STRENGTH_MAXIMUM_LEVEL. Whenever the torch is turned OFF,
* the brightness level will reset to FLASH_INFO_STRENGTH_DEFAULT_LEVEL.
* When the client calls setTorchMode(ON) after turnOnTorchWithStrengthLevel(N),
* the flash unit will have brightness level equal to N. This level does not
* represent the real brightness units. It is linear in nature i.e. flashlight
* at level 10 is twice as bright as at level 5.
*
* @param torchStrength Brightness level to be set for the flashlight.
*
* A service specific error will be returned on the following conditions
* INTERNAL_ERROR:
* The flash unit cannot be operated due to an unexpected internal
* error.
* CAMERA_IN_USE:
* This status code is returned when:
* - This camera device has been opened, so the torch cannot be
* controlled until it is closed.
* - Due to other camera devices being open, or due to other
* resource constraints, the torch cannot be controlled currently.
* ILLEGAL_ARGUMENT:
* If the torchStrength value is not within the range i.e. < 1 or
* > FLASH_INFO_STRENGTH_MAXIMUM_LEVEL.
* OPERATION_NOT_SUPPORTED:
* This status code is returned when:
* - This camera device does not support direct operation of flashlight
* torch mode. The framework must open the camera device and turn
* the torch on through the device interface.
* - This camera device does not have a flash unit.
* - This camera device has flash unit but does not support torch
* strength control.
* CAMERA_DISCONNECTED:
* An external camera device has been disconnected, and is no longer
* available. This camera device interface is now stale, and a new
* instance must be acquired if the device is reconnected. All
* subsequent calls on this interface must return
* CAMERA_DISCONNECTED.
*
*/
void turnOnTorchWithStrengthLevel(int torchStrength);
/**
* getTorchStrengthLevel:
*
* Get current torch strength level.
* If the device supports torch strength control, when the torch is OFF the
* strength level will reset to default level, so the return
* value in this case will be equal to FLASH_INFO_STRENGTH_DEFAULT_LEVEL.
*
* A service specific error will be returned on the following conditions
* INTERNAL_ERROR:
* An unexpected error occurred and the information is not
* available.
* OPERATION_NOT_SUPPORTED:
* This status code is returned when:
* - This camera device does not support direct operation of flashlight
* torch mode. The framework must open the camera device and turn
* the torch on through the device interface.
* - This camera device does not have a flash unit.
* - This camera device has flash unit but does not support torch
* strength control.
*
* @return torchStrength Current torch strength level.
*
*/
int getTorchStrengthLevel();
}

View File

@@ -0,0 +1,202 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.BufferRequest;
import android.hardware.camera.device.BufferRequestStatus;
import android.hardware.camera.device.CaptureResult;
import android.hardware.camera.device.NotifyMsg;
import android.hardware.camera.device.StreamBuffer;
import android.hardware.camera.device.StreamBufferRet;
/**
* Callback methods for the HAL to call into the framework.
*/
@VintfStability
interface ICameraDeviceCallback {
/**
* notify:
*
* Asynchronous notification callback from the HAL, fired for various
* reasons. Only for information independent of frame capture, or that
* require specific timing. Multiple messages may be sent in one call; a
* message with a higher index must be considered to have occurred after a
* message with a lower index.
*
* Multiple threads may call notify() simultaneously.
*
* Buffers delivered to the framework must not be dispatched to the
* application layer until a start of exposure timestamp (or input image's
* start of exposure timestamp for a reprocess request) has been received
* via a SHUTTER notify() call. It is highly recommended to dispatch this
* call as early as possible.
*
* The SHUTTER notify calls for requests with android.control.enableZsl
* set to TRUE and ANDROID_CONTROL_CAPTURE_INTENT == STILL_CAPTURE may be
* out-of-order compared to SHUTTER notify for other kinds of requests
* (including regular, reprocess, or zero-shutter-lag requests with
* different capture intents).
*
* As a result, the capture results of zero-shutter-lag requests with
* ANDROID_CONTROL_CAPTURE_INTENT == STILL_CAPTURE may be out-of-order
* compared to capture results for other kinds of requests.
*
* Different SHUTTER notify calls for zero-shutter-lag requests with
* ANDROID_CONTROL_CAPTURE_INTENT == STILL_CAPTURE must be in order between
* them, as is for other kinds of requests. SHUTTER notify calls for
* zero-shutter-lag requests with non STILL_CAPTURE intent must be in order
* with SHUTTER notify calls for regular requests.
* ------------------------------------------------------------------------
* Performance requirements:
*
* This is a non-blocking call. The framework must handle each message in 5ms.
* @param msgs List of notification msgs to be processed by camera framework
*/
void notify(in NotifyMsg[] msgs);
/**
* processCaptureResult:
*
* Send results from one or more completed or partially completed captures
* to the framework.
* processCaptureResult() may be invoked multiple times by the HAL in
* response to a single capture request. This allows, for example, the
* metadata and low-resolution buffers to be returned in one call, and
* post-processed JPEG buffers in a later call, once it is available. Each
* call must include the frame number of the request it is returning
* metadata or buffers for. Only one call to processCaptureResult
* may be made at a time by the HAL although the calls may come from
* different threads in the HAL.
*
* A component (buffer or metadata) of the complete result may only be
* included in one process_capture_result call. A buffer for each stream,
* and the result metadata, must be returned by the HAL for each request in
* one of the processCaptureResult calls, even in case of errors producing
* some of the output. A call to processCaptureResult() with neither
* output buffers or result metadata is not allowed.
*
* The order of returning metadata and buffers for a single result does not
* matter, but buffers for a given stream must be returned in FIFO order. So
* the buffer for request 5 for stream A must always be returned before the
* buffer for request 6 for stream A. This also applies to the result
* metadata; the metadata for request 5 must be returned before the metadata
* for request 6.
*
* However, different streams are independent of each other, so it is
* acceptable and expected that the buffer for request 5 for stream A may be
* returned after the buffer for request 6 for stream B is. And it is
* acceptable that the result metadata for request 6 for stream B is
* returned before the buffer for request 5 for stream A is. If multiple
* capture results are included in a single call, camera framework must
* process results sequentially from lower index to higher index, as if
* these results were sent to camera framework one by one, from lower index
* to higher index.
*
* The HAL retains ownership of result structure, which only needs to be
* valid to access during this call.
*
* The output buffers do not need to be filled yet; the framework must wait
* on the stream buffer release sync fence before reading the buffer
* data. Therefore, this method should be called by the HAL as soon as
* possible, even if some or all of the output buffers are still in
* being filled. The HAL must include valid release sync fences into each
* output_buffers stream buffer entry, or -1 if that stream buffer is
* already filled.
*
* If the result buffer cannot be constructed for a request, the HAL must
* return an empty metadata buffer, but still provide the output buffers and
* their sync fences. In addition, notify() must be called with an
* ERROR_RESULT message.
*
* If an output buffer cannot be filled, its status field must be set to
* STATUS_ERROR. In this case, notify() isn't required to be called with
* an ERROR_BUFFER message. The framework will simply treat the notify()
* call with ERROR_BUFFER as a no-op, and derive whether and when to notify
* the application of buffer loss based on the buffer status and whether or not
* the entire capture has failed.
*
* If the entire capture has failed, then this method still needs to be
* called to return the output buffers to the framework. All the buffer
* statuses must be STATUS_ERROR, and the result metadata must be an
* empty buffer. In addition, notify() must be called with a ERROR_REQUEST
* message. In this case, individual ERROR_RESULT/ERROR_BUFFER messages
* must not be sent. Note that valid partial results are still allowed
* as long as the final result metadata fails to be generated.
*
* Performance requirements:
*
* This is a non-blocking call. The framework must handle each CaptureResult
* within 5ms.
*
* The pipeline latency (see ICameraDeviceSession for definition) should be less than or equal
* to 4 frame intervals, and must be less than or equal to 8 frame intervals.
*
* @param results to be processed by the camera framework
*
*/
void processCaptureResult(in CaptureResult[] results);
/**
* requestStreamBuffers:
*
* Synchronous callback for HAL to ask for output buffers from camera service.
*
* This call may be serialized in camera service so it is strongly
* recommended to only call this method from one thread.
*
* When camera device advertises
* InfoSupportedBufferManagementVersion ==
* ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_HIDL_DEVICE_3_5), HAL
* can use this method to request buffers from camera service.
*
* A BufferRequestStatus will be returned
* OK: All the requests succeeded
* FAILED_PARTIAL: some streams failed while some succeeds. Check
* individual StreamBufferRet for details.
* FAILED_CONFIGURING: the request failed because camera servicve is
* performing configureStreams and no buffers are returned.
* FAILED_UNKNOWN: the request failed for unknown reason and no buffers
* are returned.
* A service specific exception will be returned in the following case:
*
* ILLEGAL_ARGUMENT: If the buffer requests through bufReqs are not legal, do not correspond
* to a configured stream.
*
* Performance requirements:
* This is a blocking call that takes more time with more buffers requested.
* HAL must not request large amount of buffers on a latency critical code
* path. It is highly recommended to use a dedicated thread to perform
* all requestStreamBuffers calls, and adjust the thread priority and/or
* timing of making the call in order for buffers to arrive before HAL is
* ready to fill the buffer.
* @param bufReqs Buffers requested by the camera HAL
* @param buffers the buffers returned to the camera HAL by the camera framework
*/
BufferRequestStatus requestStreamBuffers(
in BufferRequest[] bufReqs, out StreamBufferRet[] buffers);
/**
* returnStreamBuffers:
*
* Synchronous callback for HAL to return output buffers to camera service.
*
* If this method is called during a configureStreams call, it must be blocked
* until camera service finishes the ongoing configureStreams call.
* @param buffers The stream buffers returned to the camera framework
*/
void returnStreamBuffers(in StreamBuffer[] buffers);
}

View File

@@ -0,0 +1,579 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.BufferCache;
import android.hardware.camera.device.CameraMetadata;
import android.hardware.camera.device.CameraOfflineSessionInfo;
import android.hardware.camera.device.CaptureRequest;
import android.hardware.camera.device.HalStream;
import android.hardware.camera.device.ICameraOfflineSession;
import android.hardware.camera.device.RequestTemplate;
import android.hardware.camera.device.StreamConfiguration;
import android.hardware.common.fmq.MQDescriptor;
import android.hardware.common.fmq.SynchronizedReadWrite;
/**
* Camera device active session interface.
*
* Obtained via ICameraDevice::open(), this interface contains the methods to
* configure and request captures from an active camera device.
*/
@VintfStability
interface ICameraDeviceSession {
/**
* close:
*
* Shut down the camera device.
*
* After this call, all calls to this session instance must set a
* INTERNAL_ERROR ServiceSpecificException.
*
* This method must always succeed, even if the device has encountered a
* serious error.
*/
void close();
/**
*
* configureStreams:
*
* Reset the HAL camera device processing pipeline and set up new input and
* output streams. This call replaces any existing stream configuration with
* the streams defined in the streamList. This method must be called at
* least once before a request is submitted with processCaptureRequest().
*
* The streamList must contain at least one output-capable stream, and may
* not contain more than one input-capable stream.
*
* The streamList may contain streams that are also in the currently-active
* set of streams (from the previous call to configureStreams()). These
* streams must already have valid values for usage, maxBuffers, and the
* private pointer.
*
* If the HAL needs to change the stream configuration for an existing
* stream due to the new configuration, it may rewrite the values of usage
* and/or maxBuffers during the configure call.
*
* The framework must detect such a change, and may then reallocate the
* stream buffers before using buffers from that stream in a request.
*
* If a currently-active stream is not included in streamList, the HAL may
* safely remove any references to that stream. It must not be reused in a
* later configureStreams() call by the framework, and all the gralloc
* buffers for it must be freed after the configureStreams() call returns.
*
* If the stream is new, the client must set the consumer usage flags in
* requestedConfiguration. Upon return, the HAL device must set producerUsage,
* maxBuffers, and other fields in the configureStreams() return values. These
* fields are then used by the framework and the platform gralloc module to
* allocate the gralloc buffers for each stream.
*
* Newly allocated buffers may be included in a capture request at any time
* by the framework. Once a gralloc buffer is returned to the framework
* with processCaptureResult (and its respective releaseFence has been
* signaled) the framework may free or reuse it at any time.
*
* ------------------------------------------------------------------------
*
* Preconditions:
*
* The framework must only call this method when no captures are being
* processed. That is, all results have been returned to the framework, and
* all in-flight input and output buffers have been returned and their
* release sync fences have been signaled by the HAL. The framework must not
* submit new requests for capture while the configureStreams() call is
* underway.
*
* Postconditions:
*
* The HAL device must configure itself to provide maximum possible output
* frame rate given the sizes and formats of the output streams, as
* documented in the camera device's static metadata.
*
* Performance requirements:
*
* This call is expected to be heavyweight and possibly take several hundred
* milliseconds to complete, since it may require resetting and
* reconfiguring the image sensor and the camera processing pipeline.
* Nevertheless, the HAL device should attempt to minimize the
* reconfiguration delay to minimize the user-visible pauses during
* application operational mode changes (such as switching from still
* capture to video recording).
*
* The HAL should return from this call in 500ms, and must return from this
* call in 1000ms.
*
* A service specific error will be returned on the following conditions
*
* INTERNAL_ERROR:
* If there has been a fatal error and the device is no longer
* operational. Only close() can be called successfully by the
* framework after this error is returned.
* ILLEGAL_ARGUMENT:
* If the requested stream configuration is invalid. Some examples
* of invalid stream configurations include:
* - Including more than 1 INPUT stream
* - Not including any OUTPUT streams
* - Including streams with unsupported formats, or an unsupported
* size for that format.
* - Including too many output streams of a certain format.
* - Unsupported rotation configuration
* - Stream sizes/formats don't satisfy the
* StreamConfigurationMode requirements for non-NORMAL mode, or
* the requested operation_mode is not supported by the HAL.
* - Unsupported usage flag
* The camera service cannot filter out all possible illegal stream
* configurations, since some devices may support more simultaneous
* streams or larger stream resolutions than the minimum required
* for a given camera device hardware level. The HAL must return an
* ILLEGAL_ARGUMENT for any unsupported stream set, and then be
* ready to accept a future valid stream configuration in a later
* configureStreams call.
* @param requestedConfiguration The stream configuration requested by the camera framework to
* be configured by the camera HAL.
* @return A list of the stream parameters desired by the HAL for
* each stream, including maximum buffers, the usage flags, and the
* override format.
*
*/
HalStream[] configureStreams(in StreamConfiguration requestedConfiguration);
/**
* constructDefaultRequestSettings:
*
* Create capture settings for standard camera use cases.
*
* The device must return a settings buffer that is configured to meet the
* requested use case, which must be one of the RequestTemplate enums.
* All request control fields must be included.
*
* Performance requirements:
*
* This must be a non-blocking call. The HAL should return from this call
* in 1ms, and must return from this call in 5ms.
*
* A service specific error will be returned on the following conditions
* Return values:
*
* INTERNAL_ERROR:
* An unexpected internal error occurred, and the default settings
* are not available.
* ILLEGAL_ARGUMENT:
* The camera HAL does not support the input template type
* CAMERA_DISCONNECTED:
* An external camera device has been disconnected, and is no longer
* available. This camera device interface is now stale, and a new
* instance must be acquired if the device is reconnected. All
* subsequent calls on this interface must return
* CAMERA_DISCONNECTED.
* @param type The requested template CaptureRequest type to create the default settings for.
*
* @return capture settings for the requested use case.
*
*/
CameraMetadata constructDefaultRequestSettings(in RequestTemplate type);
/**
* flush:
*
* Flush all currently in-process captures and all buffers in the pipeline
* on the given device. Generally, this method is used to dump all state as
* quickly as possible in order to prepare for a configure_streams() call.
*
* No buffers are required to be successfully returned, so every buffer
* held at the time of flush() (whether successfully filled or not) may be
* returned with BufferStatus.ERROR. Note the HAL is still allowed
* to return valid (BufferStatus.OK) buffers during this call,
* provided they are successfully filled.
*
* All requests currently in the HAL are expected to be returned as soon as
* possible. Not-in-process requests must return errors immediately. Any
* interruptible hardware blocks must be stopped, and any uninterruptible
* blocks must be waited on.
*
* flush() may be called concurrently to processCaptureRequest(), with the
* expectation that processCaptureRequest returns quickly and the
* request submitted in that processCaptureRequest call is treated like
* all other in-flight requests. Due to concurrency issues, it is possible
* that from the HAL's point of view, a processCaptureRequest() call may
* be started after flush has been invoked but has not returned yet. If such
* a call happens before flush() returns, the HAL must treat the new
* capture request like other in-flight pending requests (see #4 below).
*
* More specifically, the HAL must follow below requirements for various
* cases:
*
* 1. For captures that are too late for the HAL to cancel/stop, and must be
* completed normally by the HAL; i.e. the HAL can send shutter/notify
* and processCaptureResult and buffers as normal.
*
* 2. For pending requests that have not done any processing, the HAL must
* call notify with ErrorMsg set, and return all the output
* buffers with processCaptureResult in the error state
* (BufferStatus.ERROR). The HAL must not place the release
* fence into an error state, instead, the release fences must be set to
* the acquire fences passed by the framework, or -1 if they have been
* waited on by the HAL already. This is also the path to follow for any
* captures for which the HAL already called notify() with
* ShutterMsg set, but won't be producing any metadata/valid buffers
* for. After ErrorMsg is set, for a given frame, only
* processCaptureResults with buffers in BufferStatus.ERROR
* are allowed. No further notifys or processCaptureResult with
* non-empty metadata is allowed.
*
* 3. For partially completed pending requests that do not have all the
* output buffers or perhaps missing metadata, the HAL must follow
* below:
*
* 3.1. Call notify with ErrorMsg set with ErrorCode.ERROR_RESULT if some of the expected
* result metadata (i.e. one or more partial metadata) won't be
* available for the capture.
*
* 3.2. Call notify with ErrorMsg set with ErrorCode.ERROR_BUFFER for every buffer that
* won't be produced for the capture.
*
* 3.3. Call notify with ShutterMsg with the capture timestamp
* before any buffers/metadata are returned with
* processCaptureResult.
*
* 3.4. For captures that will produce some results, the HAL must not
* call notify with ErrorCode.ERROR_REQUEST, since that indicates complete
* failure.
*
* 3.5. Valid buffers/metadata must be passed to the framework as
* normal.
*
* 3.6. Failed buffers must be returned to the framework as described
* for case 2. But failed buffers do not have to follow the strict
* ordering valid buffers do, and may be out-of-order with respect
* to valid buffers. For example, if buffers A, B, C, D, E are sent,
* D and E are failed, then A, E, B, D, C is an acceptable return
* order.
*
* 3.7. For fully-missing metadata, calling ErrorCode.ERROR_RESULT is
* sufficient, no need to call processCaptureResult with empty
* metadata or equivalent.
*
* 4. If a flush() is invoked while a processCaptureRequest() invocation
* is active, that process call must return as soon as possible. In
* addition, if a processCaptureRequest() call is made after flush()
* has been invoked but before flush() has returned, the capture request
* provided by the late processCaptureRequest call must be treated
* like a pending request in case #2 above.
*
* flush() must only return when there are no more outstanding buffers or
* requests left in the HAL. The framework may call configure_streams (as
* the HAL state is now quiesced) or may issue new requests.
*
* Note that it's sufficient to only support fully-succeeded and
* fully-failed result cases. However, it is highly desirable to support
* the partial failure cases as well, as it could help improve the flush
* call overall performance.
*
* Performance requirements:
*
* The HAL should return from this call in 100ms, and must return from this
* call in 1000ms. And this call must not be blocked longer than pipeline
* latency (see below for definition).
*
* Pipeline Latency:
* For a given capture request, the duration from the framework calling
* process_capture_request to the HAL sending capture result and all buffers
* back by process_capture_result call. To make the Pipeline Latency measure
* independent of frame rate, it is measured by frame count.
*
* For example, when frame rate is 30 (fps), the frame duration (time interval
* between adjacent frame capture time) is 33 (ms).
* If it takes 5 frames for framework to get the result and buffers back for
* a given request, then the Pipeline Latency is 5 (frames), instead of
* 5 x 33 = 165 (ms).
*
* The Pipeline Latency is determined by android.request.pipelineDepth and
* android.request.pipelineMaxDepth, see their definitions for more details.
*
* A service specific error will be returned on the following conditions
* INTERNAL_ERROR:
* If the camera device has encountered a serious error. After this
* error is returned, only the close() method can be successfully
* called by the framework.
*/
void flush();
/**
* getCaptureRequestMetadataQueue:
*
* Retrieves the queue used along with processCaptureRequest. If
* client decides to use fast message queue to pass request metadata,
* it must:
* - Call getCaptureRequestMetadataQueue to retrieve the fast message queue;
* - In each of the requests sent in processCaptureRequest, set
* fmqSettingsSize field of CaptureRequest to be the size to read from the
* fast message queue; leave settings field of CaptureRequest empty.
*
* @return the queue that client writes request metadata to.
*/
MQDescriptor<byte, SynchronizedReadWrite> getCaptureRequestMetadataQueue();
/**
* getCaptureResultMetadataQueue:
*
* Retrieves the queue used along with
* ICameraDeviceCallback.processCaptureResult.
*
* Clients to ICameraDeviceSession must:
* - Call getCaptureRequestMetadataQueue to retrieve the fast message queue;
* - In implementation of ICameraDeviceCallback, test whether
* .fmqResultSize field is zero.
* - If .fmqResultSize != 0, read result metadata from the fast message
* queue;
* - otherwise, read result metadata in CaptureResult.result.
*
* @return the queue that implementation writes result metadata to.
*/
MQDescriptor<byte, SynchronizedReadWrite> getCaptureResultMetadataQueue();
/**
* isReconfigurationRequired:
*
* Check whether complete stream reconfiguration is required for possible new session
* parameter values.
*
* This method must be called by the camera framework in case the client changes
* the value of any advertised session parameters. Depending on the specific values
* the HAL can decide whether a complete stream reconfiguration is required. In case
* the HAL returns false, the camera framework must skip the internal reconfiguration.
* In case Hal returns true, the framework must reconfigure the streams and pass the
* new session parameter values accordingly.
* This call may be done by the framework some time before the request with new parameters
* is submitted to the HAL, and the request may be cancelled before it ever gets submitted.
* Therefore, the HAL must not use this query as an indication to change its behavior in any
* way.
* ------------------------------------------------------------------------
*
* Preconditions:
*
* The framework can call this method at any time after active
* session configuration. There must be no impact on the performance of
* pending camera requests in any way. In particular there must not be
* any glitches or delays during normal camera streaming.
*
* Performance requirements:
* HW and SW camera settings must not be changed and there must not be
* a user-visible impact on camera performance.
*
* @param oldSessionParams Before session parameters, usually the current session parameters.
* @param newSessionParams The new session parameters which may be set by client.
* A service specific error will be returned in the following case:
*
* INTERNAL_ERROR:
* The reconfiguration query cannot complete due to internal
* error.
* @return true in case the stream reconfiguration is required, false otherwise.
*/
boolean isReconfigurationRequired(in CameraMetadata oldSessionParams,
in CameraMetadata newSessionParams);
/**
* processCaptureRequest:
*
* Send a list of capture requests to the HAL. The HAL must not return from
* this call until it is ready to accept the next set of requests to
* process. Only one call to processCaptureRequest() must be made at a time
* by the framework, and the calls must all be from the same thread. The
* next call to processCaptureRequest() must be made as soon as a new
* request and its associated buffers are available. In a normal preview
* scenario, this means the function is generally called again by the
* framework almost instantly. If more than one request is provided by the
* client, the HAL must process the requests in order of lowest index to
* highest index.
*
* The cachesToRemove argument contains a list of buffer caches (see
* StreamBuffer document for more information on buffer cache) to be removed
* by camera HAL. Camera HAL must remove these cache entries whether or not
* this method returns OK.
*
* The actual request processing is asynchronous, with the results of
* capture being returned by the HAL through the processCaptureResult()
* call. This call requires the result metadata to be available, but output
* buffers may simply provide sync fences to wait on. Multiple requests are
* expected to be in flight at once, to maintain full output frame rate.
*
* The framework retains ownership of the request structure. It is only
* guaranteed to be valid during this call. The HAL device must make copies
* of the information it needs to retain for the capture processing. The HAL
* is responsible for waiting on and closing the buffers' fences and
* returning the buffer handles to the framework.
*
* The HAL must write the file descriptor for the input buffer's release
* sync fence into input_buffer->release_fence, if input_buffer is not
* valid. If the HAL returns -1 for the input buffer release sync fence, the
* framework is free to immediately reuse the input buffer. Otherwise, the
* framework must wait on the sync fence before refilling and reusing the
* input buffer.
*
* The input/output buffers provided by the framework in each request
* may be brand new (having never before seen by the HAL).
*
* ------------------------------------------------------------------------
* Performance considerations:
*
* Handling a new buffer should be extremely lightweight and there must be
* no frame rate degradation or frame jitter introduced.
*
* This call must return fast enough to ensure that the requested frame
* rate can be sustained, especially for streaming cases (post-processing
* quality settings set to FAST). The HAL should return this call in 1
* frame interval, and must return from this call in 4 frame intervals.
*
* - The capture request can include individual settings for physical camera devices
* backing a logical multi-camera.
*
* - The capture request can include width and height of the input buffer for
* a reprocessing request.
*
* A service specific error will be returned on the following conditions
* ILLEGAL_ARGUMENT:
* If the input is malformed (the settings are empty when not
* allowed, the physical camera settings are invalid, there are 0
* output buffers, etc) and capture processing
* cannot start. Failures during request processing must be
* handled by calling ICameraDeviceCallback::notify(). In case of
* this error, the framework retains responsibility for the
* stream buffers' fences and the buffer handles; the HAL must not
* close the fences or return these buffers with
* ICameraDeviceCallback::processCaptureResult().
* In case of multi-resolution input image, this error must be returned
* if the caller passes in a CaptureRequest with an invalid
* [inputWith, inputHeight].
* INTERNAL_ERROR:
* If the camera device has encountered a serious error. After this
* error is returned, only the close() method can be successfully
* called by the framework.
*
* @param requests The capture requests to be processed by the camera HAL
* @param cachesToRemove list of buffer caches to be removed by the camera HAL
* @return Number of requests successfully processed by
* camera HAL. On success, this must be equal to the size of
* requests. When the call fails, this number is the number of requests
* that HAL processed successfully before HAL runs into an error and a service specific
* error is also set.
*
*/
int processCaptureRequest(in CaptureRequest[] requests, in BufferCache[] cachesToRemove);
/**
* signalStreamFlush:
*
* Signaling to the HAL, camera service is about to perform configureStreams and
* HAL must return all buffers of designated streams. HAL must finish
* inflight requests normally and return all buffers that belongs to the
* designated streams through processCaptureResult or returnStreamBuffer
* API in a timely manner, or camera service will run into a fatal error.
*
* Note that this call serves as an optional hint and camera service may
* skip sending this call if all buffers are already returned.
*
* @param streamIds The ID of streams camera service need all of its
* buffers returned.
*
* @param streamConfigCounter Note that due to concurrency nature, it is
* possible the signalStreamFlush call arrives later than the
* corresponding configureStreams() call, HAL must check
* streamConfigCounter for such race condition. If the counter is less
* than the counter in the last configureStreams() call HAL last
* received, the call is stale and HAL should just return this call.
*/
oneway void signalStreamFlush(in int[] streamIds, in int streamConfigCounter);
/**
* switchToOffline:
*
* Switch the current running session from actively streaming mode to the
* offline mode. See ICameraOfflineSession for more details.
*
* The streamsToKeep argument contains list of streams IDs where application
* still needs its output. For all streams application does not need anymore,
* camera HAL can send ERROR_BUFFER to speed up the transition, or even send
* ERROR_REQUEST if all output targets of a request is not needed. By the
* time this call returns, camera HAL must have returned all buffers coming
* from streams no longer needed and have erased buffer caches of such streams.
*
* For all requests that are going to be transferred to offline session,
* the ICameraDeviceSession is responsible to capture all input buffers from
* the image sensor before the switchToOffline call returns. Before
* switchToOffline returns, camera HAL must have completed all requests not
* switching to offline mode, and collected information on what streams and
* requests are going to continue in the offline session, in the
* offlineSessionInfo output argument.
*
* If there are no requests qualified to be transferred to offline session,
* the camera HAL must return a null ICameraOfflineSession object with OK
* status. In this scenario, the camera HAL still must flush all inflight
* requests and unconfigure all streams before returning this call.
*
* After switchToOffline returns, the ICameraDeviceSession must be back to
* unconfigured state as if it is just created and no streams are configured.
* Also, camera HAL must not call any methods in ICameraDeviceCallback since
* all unfinished requests are now transferred to the offline session.
* After the call returns, camera service may then call close to close
* the camera device, or call configureStream* again to reconfigure the
* camera and then send new capture requests with processCaptureRequest. In
* the latter case, it is legitimate for camera HAL to call methods in
* ICameraDeviceCallback again in response to the newly submitted capture
* requests.
*
* A service specific error will be returned on the following conditions
* ILLEGAL_ARGUMENT:
* If camera does not support offline mode in any one of streams
* in streamsToKeep argument. Note that the camera HAL must report
* if a stream supports offline mode in HalStreamConfiguration
* output of configureStreams_3_6 method. If all streams in
* streamsToKeep argument support offline mode, then the camera HAL
* must not return this error.
*
* @param in streamsToKeep The streamIds of the streams that will continue in the offline
* session
* @param out offlineSessionInfo Information on what streams and requests will
* be transferred to offline session to continue processing.
*
* @return offlineSession The offline session object camera service will use
* to interact with.
*/
ICameraOfflineSession switchToOffline(
in int[] streamsToKeep, out CameraOfflineSessionInfo offlineSessionInfo);
/**
* repeatingRequestEnd:
*
* Notification about the last frame number in a repeating request along with the
* ids of all streams included in the repeating request.
*
* This can be called at any point after 'processCaptureRequest' in response
* to camera clients disabling an active repeating request.
*
* Performance requirements:
* The call must not be blocked for extensive periods and should be extremely lightweight. There
* must be no frame rate degradation or frame jitter introduced.
*
* This method must always succeed, even if the device has encountered a
* serious error.
*/
void repeatingRequestEnd(in int frameNumber, in int[] streamIds);
}

View File

@@ -0,0 +1,81 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.CameraMetadata;
import android.hardware.camera.device.ICameraDeviceSession;
import android.hardware.camera.device.StreamConfiguration;
/**
* Camera device active session interface.
*
* Obtained via ICameraDevice::open(), this interface contains the methods to
* configure and request captures from an active camera device.
*/
@VintfStability
interface ICameraInjectionSession {
/**
* configureInjectionStreams:
*
* Identical to ICameraDeviceSession.configureStreams, except that:
*
* @param requestedConfiguration
* The current stream configuration of the internal camera session and
* the injection camera must follow the configuration without overriding
* any part of it.
* @param characteristics
* The characteristics of internal camera contains a list of keys so that
* the stream continuity can be maintained after the external camera is
* injected.
*
* A service specific error will be returned on the following conditions
*
* INTERNAL_ERROR:
* If there has been a fatal error and the device is no longer
* operational. Only close() can be called successfully by the
* framework after this error is returned.
* ILLEGAL_ARGUMENT:
* If the requested stream configuration is invalid. Some examples
* of invalid stream configurations include:
* - Not including any OUTPUT streams
* - Including streams with unsupported formats, or an unsupported
* size for that format.
* - Including too many output streams of a certain format.
* - Unsupported rotation configuration
* - Stream sizes/formats don't satisfy the
* StreamConfigurationMode requirements
* for non-NORMAL mode, or the requested operation_mode is not
* supported by the HAL.
* - Unsupported usage flag
* The camera service cannot filter out all possible illegal stream
* configurations, since some devices may support more simultaneous
* streams or larger stream resolutions than the minimum required
* for a given camera device hardware level. The HAL must return an
* ILLEGAL_ARGUMENT for any unsupported stream set, and then be
* ready to accept a future valid stream configuration in a later
* configureInjectionStreams call.
*/
void configureInjectionStreams(
in StreamConfiguration requestedConfiguration, in CameraMetadata characteristics);
/**
* Retrieves the ICameraDeviceSession interface in order for the camera framework to be able
* to use the injection session for all of the operations that a non-injected
* ICameraDeviceSession would be able to perform.
*/
ICameraDeviceSession getCameraDeviceSession();
}

View File

@@ -0,0 +1,83 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.ICameraDeviceCallback;
import android.hardware.common.fmq.MQDescriptor;
import android.hardware.common.fmq.SynchronizedReadWrite;
/**
* Camera device offline session interface.
*
* Obtained via ICameraDeviceSession::switchToOffline(), this interface contains
* the methods and callback interfaces that define how camera service interacts
* with an offline session.
*
* An offline session contains some unfinished capture requests that were submitted
* to the parent ICameraDeviceSession before calling switchToOffline, and is
* responsible for delivering these capture results back to camera service regardless
* of whether the parent camera device is still opened or not. An offline session must
* not have access to the camera device's image sensor. During switchToOffline
* call, camera HAL must capture all necessary frames from the image sensor that
* is needed for completing the requests offline later.
*/
@VintfStability
interface ICameraOfflineSession {
/**
* Close the offline session and release all resources.
*
* Camera service may call this method before or after the offline session
* has finished all requests it needs to handle. If there are still unfinished
* requests when close is called, camera HAL must send ERROR_REQUEST for
* all unfinished requests and return all buffers via
* ICameraDeviceCallback#processCaptureResult or
* ICameraDeviceCallback#returnStreamBuffers.
* Also, all buffer caches maintained by the offline session must be erased
* before the close call returns.
*/
void close();
/**
* getCaptureResultMetadataQueue:
*
* Retrieves the queue used along with
* ICameraDeviceCallback#processCaptureResult.
*
* Clients to ICameraOfflineSession must:
* - Call getCaptureRequestMetadataQueue to retrieve the fast message queue;
* - In implementation of ICameraDeviceCallback, test whether
* .fmqResultSize field is zero.
* - If .fmqResultSize != 0, read result metadata from the fast message
* queue;
* - otherwise, read result metadata in CaptureResult.result.
*
* @return the queue that implementation writes result metadata to.
*/
MQDescriptor<byte, SynchronizedReadWrite> getCaptureResultMetadataQueue();
/**
* Set the callbacks for offline session to communicate with camera service.
*
* Offline session is responsible to store all callbacks the camera HAL
* generated after the return of ICameraDeviceSession::switchToOffline, and
* send them to camera service once this method is called.
*
* Camera service must not call this method more than once, so these
* callbacks can be assumed to be constant after the first setCallback call.
*/
void setCallback(in ICameraDeviceCallback cb);
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.ErrorMsg;
import android.hardware.camera.device.ShutterMsg;
/**
* NotifyMsg:
*
* The message structure sent to ICameraDeviceCallback::notify()
*/
@VintfStability
union NotifyMsg {
/**
* Error message contents.
*/
ErrorMsg error;
/**
* Shutter message contents.
*/
ShutterMsg shutter;
}

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* OfflineRequest:
*
* Information about a capture request being switched to offline mode via the
* ICameraDeviceSession#switchToOffline method.
*
*/
@VintfStability
parcelable OfflineRequest {
/**
* Must match a inflight CaptureRequest sent by camera service
*/
int frameNumber;
/**
* Stream IDs for outputs that will be returned via ICameraDeviceCallback.
* The stream ID must be within one of offline stream listed in
* CameraOfflineSessionInfo.
* Camera service will validate these pending buffers are matching camera
* service's record to make sure no buffers are leaked during the
* switchToOffline call.
*/
int[] pendingStreams;
}

View File

@@ -0,0 +1,50 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* OfflineStream:
*
* Information about a stream being switched to offline mode via the
* ICameraDeviceSession#switchToOffline method.
*
*/
@VintfStability
parcelable OfflineStream {
/**
* IDs of a stream to be transferred to offline session.
*
* For devices that do not support HAL buffer management, this must be
* one of stream ID listed in streamsToKeep argument of the
* switchToOffline call.
* For devices that support HAL buffer management, this could be any stream
* that was configured right before calling switchToOffline.
*/
int id;
/**
* Number of outstanding buffers that will be returned via offline session
*/
int numOutstandingBuffers;
/**
* Buffer ID of buffers currently cached between camera service and this
* stream, which may or may not be owned by the camera HAL right now.
* See StreamBuffer#bufferId for more details.
*/
long[] circulatingBufferIds;
}

View File

@@ -0,0 +1,53 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.CameraMetadata;
/**
* PhysicalCameraMetadata:
*
* Individual camera metadata for a physical camera as part of a logical
* multi-camera. Camera HAL should return one such metadata for each physical
* camera being requested on.
*/
@VintfStability
parcelable PhysicalCameraMetadata {
/**
* If non-zero, read metadata from result metadata queue instead
* (see ICameraDeviceSession.getCaptureResultMetadataQueue).
* If zero, read metadata from .metadata field.
*
* The logical CaptureResult metadata is read first from the FMQ, followed by
* the physical cameras' metadata starting from index 0.
*/
long fmqMetadataSize;
/**
* Contains the physical device camera id. As long as the corresponding
* processCaptureRequest requests on a particular physical camera stream,
* the metadata for that physical camera should be generated for the capture
* result.
*/
String physicalCameraId;
/**
* If fmqMetadataSize is zero, the metadata buffer contains the metadata
* for the physical device with physicalCameraId.
*/
CameraMetadata metadata;
}

View File

@@ -0,0 +1,61 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.CameraMetadata;
/**
* PhysicalCameraSetting:
*
* Individual camera settings for logical camera backed by multiple physical devices.
* Clients are allowed to pass separate settings for each physical device that has
* corresponding configured HalStream and the respective stream id is present in the
* output buffers of the capture request.
*/
@VintfStability
parcelable PhysicalCameraSetting {
/**
* If non-zero, read settings from request queue instead
* (see ICameraDeviceSession.getCaptureRequestMetadataQueue).
* If zero, read settings from .settings field.
*
* The logical settings metadata is read first from the FMQ, followed by
* the physical cameras' settings metadata starting from index 0.
*/
long fmqSettingsSize;
/**
* Contains the physical device camera id. Any settings passed by client here
* should be applied for this physical device. In case the physical id is invalid or
* it is not present among the last configured streams, Hal should fail the process
* request and return Status::ILLEGAL_ARGUMENT.
*/
String physicalCameraId;
/**
* If fmqSettingsSize is zero, the settings buffer contains the capture and
* processing parameters for the physical device with id 'physicalCameraId'.
* As a special case, an empty settings buffer indicates that the
* settings are identical to the most-recently submitted capture request.
* An empty buffer cannot be used as the first submitted request after
* a configureStreams() call.
*
* This field must be used if fmqSettingsSize is zero. It must not be used
* if fmqSettingsSize is non-zero.
*/
CameraMetadata settings;
}

View File

@@ -0,0 +1,73 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* RequestTemplate:
*
* Available template types for
* ICameraDevice::constructDefaultRequestSettings()
*/
@VintfStability
@Backing(type="int")
enum RequestTemplate {
/**
* Standard camera preview operation with 3A on auto.
*/
PREVIEW = 1,
/**
* Standard camera high-quality still capture with 3A and flash on auto.
*/
STILL_CAPTURE = 2,
/**
* Standard video recording plus preview with 3A on auto, torch off.
*/
VIDEO_RECORD = 3,
/**
* High-quality still capture while recording video. Applications typically
* include preview, video record, and full-resolution YUV or JPEG streams in
* request. Must not cause stuttering on video stream. 3A on auto.
*/
VIDEO_SNAPSHOT = 4,
/**
* Zero-shutter-lag mode. Application typically request preview and
* full-resolution data for each frame, and reprocess it to JPEG when a
* still image is requested by user. Settings must provide highest-quality
* full-resolution images without compromising preview frame rate. 3A on
* auto.
*/
ZERO_SHUTTER_LAG = 5,
/**
* A basic template for direct application control of capture
* parameters. All automatic control is disabled (auto-exposure, auto-white
* balance, auto-focus), and post-processing parameters are set to preview
* quality. The manual capture parameters (exposure, sensitivity, etc.)
* are set to reasonable defaults, but may be overridden by the
* application depending on the intended use case.
*/
MANUAL = 6,
/**
* First value for vendor-defined request templates
*/
VENDOR_TEMPLATE_START = 0x40000000,
}

View File

@@ -0,0 +1,45 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* ShutterMsg:
*
* Message contents for MsgType::SHUTTER
*/
@VintfStability
parcelable ShutterMsg {
/**
* Frame number of the request that has begun exposure or reprocessing.
*/
int frameNumber;
/**
* Timestamp for the start of capture. For a reprocess request, this must
* be input image's start of capture. This must match the capture result
* metadata's sensor exposure start timestamp.
*/
long timestamp;
/**
* Timestamp for the capture readout. This must be in the same time domain
* as timestamp, and for a rolling shutter sensor, the value must be
* timestamp + exposureTime + t_crop_top where t_crop_top is the exposure time
* skew of the cropped lines on the top.
*/
long readoutTimestamp;
}

View File

@@ -0,0 +1,206 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.StreamRotation;
import android.hardware.camera.device.StreamType;
/**
* Stream:
*
* A descriptor for a single camera input or output stream. A stream is defined
* by the framework by its buffer resolution and format, and additionally by the
* HAL with the gralloc usage flags and the maximum in-flight buffer count.
*
* Also contains the multi-resolution output surface group Id field, sensor pixel modes and
* dynamic range profile.
*/
@VintfStability
parcelable Stream {
/**
* Stream ID - a nonnegative integer identifier for a stream.
*
* The identical stream ID must reference the same stream, with the same
* width/height/format, across consecutive calls to configureStreams.
*
* If previously-used stream ID is not used in a new call to
* configureStreams, then that stream is no longer active. Such a stream ID
* may be reused in a future configureStreams with a new
* width/height/format.
*
*/
int id;
/**
* The type of the stream (input vs output, etc).
*/
StreamType streamType;
/**
* The width in pixels of the buffers in this stream
*/
int width;
/**
* The height in pixels of the buffers in this stream
*/
int height;
/**
* The pixel format for the buffers in this stream.
*
* If IMPLEMENTATION_DEFINED is used, then the platform
* gralloc module must select a format based on the usage flags provided by
* the camera device and the other endpoint of the stream.
*
*/
android.hardware.graphics.common.PixelFormat format;
/**
* The bitfield of gralloc usage flags for this stream, as needed by the consumer of
* the stream.
*
* The usage flags from the producer and the consumer must be combined
* together and then passed to the platform gralloc HAL module for
* allocating the gralloc buffers for each stream.
*
* The HAL may use these consumer flags to decide stream configuration. For
* streamType INPUT, the value of this field is always 0. For all streams
* passed via configureStreams(), the HAL must set its own
* additional usage flags in its output HalStreamConfiguration.
*
* The usage flag for an output stream may be bitwise combination of usage
* flags for multiple consumers, for the purpose of sharing one camera
* stream between those consumers. The HAL must fail configureStreams call
* with ILLEGAL_ARGUMENT if the combined flags cannot be supported due to
* imcompatible buffer format, dataSpace, or other hardware limitations.
*/
android.hardware.graphics.common.BufferUsage usage;
/**
* A bitfield that describes the contents of the buffer. The format and buffer
* dimensions define the memory layout and structure of the stream buffers,
* while dataSpace defines the meaning of the data within the buffer.
*
* For most formats, dataSpace defines the color space of the image data.
* In addition, for some formats, dataSpace indicates whether image- or
* depth-based data is requested. See
* android.hardware.graphics.common@1.0::types for details of formats and
* valid dataSpace values for each format.
*
* The HAL must use this dataSpace to configure the stream to the correct
* colorspace, or to select between color and depth outputs if
* supported. The dataspace values are set using the V0 dataspace
* definitions.
*/
android.hardware.graphics.common.Dataspace dataSpace;
/**
* The required output rotation of the stream.
*
* This must be inspected by HAL along with stream width and height. For
* example, if the rotation is 90 degree and the stream width and height is
* 720 and 1280 respectively, camera service must supply buffers of size
* 720x1280, and HAL must capture a 1280x720 image and rotate the image by
* 90 degree counterclockwise. The rotation field must be ignored when the
* stream type is input.
*
* The HAL must inspect this field during stream configuration and return
* IllegalArgument if HAL cannot perform such rotation. HAL must always
* support ROTATION_0, so a configureStreams() call must not fail for
* unsupported rotation if rotation field of all streams is ROTATION_0.
*
*/
StreamRotation rotation;
/**
* The physical camera id this stream belongs to.
*
* If the camera device is not a logical multi camera, or if the camera is a logical
* multi camera but the stream is not a physical output stream, this field will point to a
* 0-length string.
*
* A logical multi camera is a camera device backed by multiple physical cameras that
* are also exposed to the application. And for a logical multi camera, a physical output
* stream is an output stream specifically requested on an underlying physical camera.
*
* A logical camera is a camera device backed by multiple physical camera
* devices. And a physical stream is a stream specifically requested on a
* underlying physical camera device.
*
* For an input stream, this field is guaranteed to be a 0-length string.
*
* When not empty, this field is the <id> field of one of the full-qualified device
* instance names returned by getCameraIdList().
*/
String physicalCameraId;
/**
* The size of a buffer from this Stream, in bytes.
*
* For non PixelFormat::BLOB formats, this entry must be 0 and HAL should use
* android.hardware.graphics.mapper lockYCbCr API to get buffer layout.
*
* For BLOB format with dataSpace Dataspace::DEPTH, this must be zero and HAL must
* determine the buffer size based on ANDROID_DEPTH_MAX_DEPTH_SAMPLES.
*
* For BLOB format with dataSpace Dataspace::JFIF, this must be non-zero and represent the
* maximal size HAL can lock using android.hardware.graphics.mapper lock API.
*
*/
int bufferSize;
/**
* The surface group id used for multi-resolution output streams.
*
* This works similar to the surfaceGroupId of OutputConfiguration in the
* public API, with the exception that this is for multi-resolution image
* reader and is used by the camera HAL to choose a target stream within
* the same group to which images are written. All streams in the same group
* will have the same image format, data space, and usage flag.
*
* The framework must only call processCaptureRequest on at most one of the
* streams within a surface group. Depending on current active physical
* camera backing the logical multi-camera, or the pixel mode the camera is
* running in, the HAL can choose to request and return a buffer from any
* stream within the same group. -1 means that this stream is an input
* stream, or is an output stream which doesn't belong to any group.
*
* Streams with the same non-negative group id must have the same format and
* usage flag.
*/
int groupId;
/**
* The sensor pixel modes used by this stream. This can assist the camera
* HAL in decision making about stream combination support.
* If this is empty, the HAL must assume that this stream will only be used
* with ANDROID_SENSOR_PIXEL_MODE set to ANDROID_SENSOR_PIXEL_MODE_DEFAULT.
*/
android.hardware.camera.metadata.SensorPixelMode[] sensorPixelModesUsed;
/**
* The dynamic range profile for this stream.
*
* This field is valid and must only be considered for streams with format
* android.hardware.graphics.common.PixelFormat.YCBCR_P010 or
* android.hardware.graphics.common.PixelFormat.IMPLEMENTATION_DEFINED on devices supporting the
* ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_10_BIT capability.
*
*/
android.hardware.camera.metadata.RequestAvailableDynamicRangeProfilesMap dynamicRangeProfile;
}

View File

@@ -0,0 +1,114 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.BufferStatus;
import android.hardware.common.NativeHandle;
/**
* StreamBuffer:
*
* A single buffer from a camera HAL stream. It includes a handle to its parent
* stream, the handle to the gralloc buffer itself, and sync fences
*
* The buffer does not specify whether it is to be used for input or output;
* that is determined by its parent stream type and how the buffer is passed to
* the HAL device.
*/
@VintfStability
parcelable StreamBuffer {
/**
* The ID of the stream this buffer is associated with. -1 indicates an
* invalid (empty) StreamBuffer, in which case buffer must also point to
* null and bufferId must be 0.
*/
int streamId;
/**
* The unique ID of the buffer within this StreamBuffer. 0 indicates this
* StreamBuffer contains no buffer.
* For StreamBuffers sent to the HAL in a CaptureRequest, this ID uniquely
* identifies a buffer. When a buffer is sent to HAL for the first time,
* both bufferId and buffer handle must be filled. HAL must keep track of
* the mapping between bufferId and corresponding buffer until the
* corresponding stream is removed from stream configuration or until camera
* device session is closed. After the first time a buffer is introduced to
* HAL, in the future camera service must refer to the same buffer using
* only bufferId, and keep the buffer handle null.
*/
long bufferId;
/**
* The graphics buffer handle to the buffer.
*
* For StreamBuffers sent to the HAL in a CaptureRequest, if the bufferId
* is not seen by the HAL before, this buffer handle is guaranteed to be a
* valid handle to a graphics buffer, with dimensions and format matching
* that of the stream. If the bufferId has been sent to the HAL before, this
* buffer handle must be null and HAL must look up the actual buffer handle
* to use from its own bufferId to buffer handle map.
*
* For StreamBuffers returned in a CaptureResult, this must be null, since
* the handle to the buffer is already known to the client (since the client
* sent it in the matching CaptureRequest), and the handle can be identified
* by the combination of frame number and stream ID.
*/
NativeHandle buffer;
/**
* Current state of the buffer. The framework must not pass buffers to the
* HAL that are in an error state. In case a buffer could not be filled by
* the HAL, it must have its status set to ERROR when returned to the
* framework with processCaptureResult().
*/
BufferStatus status;
/**
* The acquire sync fence for this buffer. The HAL must wait on this fence
* fd before attempting to read from or write to this buffer.
*
* In a buffer included in a CaptureRequest, the client may set this to null
* to indicate that no waiting is necessary for this buffer.
*
* When the HAL returns an input or output buffer to the framework with
* processCaptureResult(), the acquireFence must be set to null. If the HAL
* never waits on the acquireFence due to an error in filling or reading a
* buffer, when calling processCaptureResult() the HAL must set the
* releaseFence of the buffer to be the acquireFence passed to it by the
* client. This allows the client to wait on the fence before reusing the
* buffer.
*/
NativeHandle acquireFence;
/**
* The release sync fence for this buffer. The HAL must set this to a valid
* fence fd when returning the input buffer or output buffers to the client
* in a CaptureResult, or set it to null to indicate that no waiting is
* required for this buffer.
*
* The client must set this to be null for all buffers included in a
* processCaptureRequest call.
*
* After signaling the releaseFence for this buffer, the HAL
* must not make any further attempts to access this buffer as the
* ownership has been fully transferred back to the client.
*
* If this is null, then the ownership of this buffer is transferred back
* immediately upon the call of processCaptureResult.
*/
NativeHandle releaseFence;
}

View File

@@ -0,0 +1,54 @@
/*
* 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.
*/
package android.hardware.camera.device;
@VintfStability
@Backing(type="int")
enum StreamBufferRequestError {
/**
* Get buffer failed due to timeout waiting for an available buffer. This is
* likely due to the client application holding too many buffers, or the
* system is under memory pressure.
* This is not a fatal error. HAL may try to request buffer for this stream
* later. If HAL cannot get a buffer for certain capture request in time
* due to this error, HAL can send an ERROR_REQUEST to camera service and
* drop processing that request.
*/
NO_BUFFER_AVAILABLE = 1,
/**
* Get buffer failed due to HAL has reached its maxBuffer count. This is not
* a fatal error. HAL may try to request buffer for this stream again after
* it returns at least one buffer of that stream to camera service.
*/
MAX_BUFFER_EXCEEDED = 2,
/**
* Get buffer failed due to the stream is disconnected by client
* application, has been removed, or not recognized by camera service.
* This means application is no longer interested in this stream.
* Requesting buffer for this stream must never succeed after this error is
* returned. HAL must safely return all buffers of this stream after
* getting this error. If HAL gets another capture request later targeting
* a disconnected stream, HAL must send an ERROR_REQUEST to camera service
* and drop processing that request.
*/
STREAM_DISCONNECTED = 3,
/**
* Get buffer failed for unknown reasons. This is a fatal error and HAL must
* send ERROR_DEVICE to camera service and be ready to be closed.
*/
UNKNOWN_ERROR = 4,
}

View File

@@ -0,0 +1,26 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.StreamBuffersVal;
@VintfStability
parcelable StreamBufferRet {
int streamId;
StreamBuffersVal val;
}

View File

@@ -0,0 +1,33 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.StreamBuffer;
import android.hardware.camera.device.StreamBufferRequestError;
/**
* Per-stream return value for requestStreamBuffers.
* For each stream, either an StreamBufferRequestError error code, or all
* requested buffers for this stream is returned, so buffers.size() must be
* equal to BufferRequest::numBuffersRequested of corresponding stream.
*/
@VintfStability
union StreamBuffersVal {
StreamBufferRequestError error = StreamBufferRequestError.UNKNOWN_ERROR;
StreamBuffer[] buffers;
}

View File

@@ -0,0 +1,86 @@
/*
* 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.
*/
package android.hardware.camera.device;
import android.hardware.camera.device.CameraMetadata;
import android.hardware.camera.device.Stream;
import android.hardware.camera.device.StreamConfigurationMode;
/**
* StreamConfiguration:
*
* A structure of stream definitions, used by configureStreams(). This
* structure defines all the output streams and the reprocessing input
* stream for the current camera use case.
*/
@VintfStability
parcelable StreamConfiguration {
/**
* An array of camera stream pointers, defining the input/output
* configuration for the camera HAL device.
*/
Stream[] streams;
/**
* The operation mode of streams in this configuration. The HAL can use this
* mode as an indicator to set the stream property (e.g.,
* HalStream.maxBuffers) appropriately. For example, if the
* configuration is
* CONSTRAINED_HIGH_SPEED_MODE, the HAL may
* want to set aside more buffers for batch mode operation (see
* android.control.availableHighSpeedVideoConfigurations for batch mode
* definition).
*
*/
StreamConfigurationMode operationMode;
/**
* Session wide camera parameters.
*
* The session parameters contain the initial values of any request keys that were
* made available via ANDROID_REQUEST_AVAILABLE_SESSION_KEYS. The Hal implementation
* can advertise any settings that can potentially introduce unexpected delays when
* their value changes during active process requests. Typical examples are
* parameters that trigger time-consuming HW re-configurations or internal camera
* pipeline updates. The field is optional, clients can choose to ignore it and avoid
* including any initial settings. If parameters are present, then hal must examine
* their values and configure the internal camera pipeline accordingly.
*/
CameraMetadata sessionParams;
/**
* An incrementing counter used for HAL to keep track of the stream
* configuration and the paired oneway signalStreamFlush call. When the
* counter in signalStreamFlush call is less than the counter here, that
* signalStreamFlush call is stale.
*/
int streamConfigCounter;
/**
* If an input stream is configured, whether the input stream is expected to
* receive variable resolution images.
*
* This flag can only be set to true if the camera device supports
* multi-resolution input streams by advertising input stream configurations in
* physicalCameraMultiResolutionStreamConfigurations in its physical cameras'
* characteristics.
*
* When this flag is set to true, the input stream's width and height can be
* any one of the supported multi-resolution input stream sizes.
*/
boolean multiResolutionInputImage;
}

View File

@@ -0,0 +1,122 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* StreamConfigurationMode:
*
* This defines the general operation mode for the HAL (for a given stream
* configuration) where modes besides NORMAL have different semantics, and
* usually limit the generality of the API in exchange for higher performance in
* some particular area.
*/
@VintfStability
@Backing(type="int")
enum StreamConfigurationMode {
/**
* Normal stream configuration operation mode. This is the default camera
* operation mode, where all semantics of HAL APIs and metadata controls
* apply.
*/
NORMAL_MODE = 0,
/**
* Special constrained high speed operation mode for devices that can not
* support high speed output in NORMAL mode. All streams in this
* configuration are operating at high speed mode and have different
* characteristics and limitations to achieve high speed output. The NORMAL
* mode can still be used for high speed output if the HAL can support high
* speed output while satisfying all the semantics of HAL APIs and metadata
* controls. It is recommended for the HAL to support high speed output in
* NORMAL mode (by advertising the high speed FPS ranges in
* android.control.aeAvailableTargetFpsRanges) if possible.
*
* This mode has below limitations/requirements:
*
* 1. The HAL must support up to 2 streams with sizes reported by
* android.control.availableHighSpeedVideoConfigurations.
* 2. In this mode, the HAL is expected to output up to 120fps or
* higher. This mode must support the targeted FPS range and size
* configurations reported by
* android.control.availableHighSpeedVideoConfigurations.
* 3. The HAL must support IMPLEMENTATION_DEFINED output
* stream format.
* 4. To achieve efficient high speed streaming, the HAL may have to
* aggregate multiple frames together and send to camera device for
* processing where the request controls are same for all the frames in
* this batch (batch mode). The HAL must support max batch size and the
* max batch size requirements defined by
* android.control.availableHighSpeedVideoConfigurations.
* 5. In this mode, the HAL must override aeMode, awbMode, and afMode to
* ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing
* block mode controls must be overridden to be FAST. Therefore, no
* manual control of capture and post-processing parameters is
* possible. All other controls operate the same as when
* android.control.mode == AUTO. This means that all other
* android.control.* fields must continue to work, such as
*
* android.control.aeTargetFpsRange
* android.control.aeExposureCompensation
* android.control.aeLock
* android.control.awbLock
* android.control.effectMode
* android.control.aeRegions
* android.control.afRegions
* android.control.awbRegions
* android.control.afTrigger
* android.control.aePrecaptureTrigger
*
* Outside of android.control.*, the following controls must work:
*
* android.flash.mode (TORCH mode only, automatic flash for still
* capture must not work since aeMode is ON)
* android.lens.opticalStabilizationMode (if it is supported)
* android.scaler.cropRegion
* android.statistics.faceDetectMode (if it is supported)
* 6. To reduce the amount of data passed across process boundaries at
* high frame rate, within one batch, camera framework only propagates
* the last shutter notify and the last capture results (including partial
* results and final result) to the app. The shutter notifies and capture
* results for the other requests in the batch are derived by
* the camera framework. As a result, the HAL can return empty metadata
* except for the last result in the batch.
*
* For more details about high speed stream requirements, see
* android.control.availableHighSpeedVideoConfigurations and
* CONSTRAINED_HIGH_SPEED_VIDEO capability defined in
* android.request.availableCapabilities.
*
* This mode only needs to be supported by HALs that include
* CONSTRAINED_HIGH_SPEED_VIDEO in the android.request.availableCapabilities
* static metadata.
*/
CONSTRAINED_HIGH_SPEED_MODE = 1,
/**
* A set of vendor-defined operating modes, for custom default camera
* application features that can't be implemented in the fully flexible fashion
* required for NORMAL_MODE.
*/
VENDOR_MODE_0 = 0x8000,
VENDOR_MODE_1,
VENDOR_MODE_2,
VENDOR_MODE_3,
VENDOR_MODE_4,
VENDOR_MODE_5,
VENDOR_MODE_6,
VENDOR_MODE_7,
}

View File

@@ -0,0 +1,46 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* StreamRotation:
*
* The required counterclockwise rotation of camera stream.
*/
@VintfStability
@Backing(type="int")
enum StreamRotation {
/**
* No rotation
*/
ROTATION_0 = 0,
/**
* Rotate by 90 degree counterclockwise
*/
ROTATION_90 = 1,
/**
* Rotate by 180 degree counterclockwise
*/
ROTATION_180 = 2,
/**
* Rotate by 270 degree counterclockwise
*/
ROTATION_270 = 3,
}

View File

@@ -0,0 +1,56 @@
/*
* 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.
*/
package android.hardware.camera.device;
/**
* StreamType:
*
* The type of the camera stream, which defines whether the camera HAL device is
* the producer or the consumer for that stream, and how the buffers of the
* stream relate to the other streams.
*/
@VintfStability
@Backing(type="int")
enum StreamType {
/**
* This stream is an output stream; the camera HAL device must fill buffers
* from this stream with newly captured or reprocessed image data.
*/
OUTPUT = 0,
/**
* This stream is an input stream; the camera HAL device must read buffers
* from this stream and send them through the camera processing pipeline,
* as if the buffer was a newly captured image from the imager.
*
* The pixel format for input stream can be any format reported by
* android.scaler.availableInputOutputFormatsMap. The pixel format of the
* output stream that is used to produce the reprocessing data may be any
* format reported by android.scaler.availableStreamConfigurations. The
* supported input/output stream combinations depends the camera device
* capabilities, see android.scaler.availableInputOutputFormatsMap for
* stream map details.
*
* This kind of stream is generally used to reprocess data into higher
* quality images (that otherwise would cause a frame rate performance
* loss), or to do off-line reprocessing.
*
* The typical use cases are OPAQUE (typically ZSL) and YUV reprocessing,
* see S8.2, S8.3 and S10 for more details.
*/
INPUT = 1,
}

View File

@@ -0,0 +1,19 @@
aidl_interface {
name: "android.hardware.camera.metadata",
vendor_available: true,
srcs: ["android/hardware/camera/metadata/*.aidl"],
stability: "vintf",
backend: {
cpp: {
enabled: false,
},
java: {
enabled: false,
},
ndk: {
vndk: {
enabled: true,
},
},
},
}

View File

@@ -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 <name>-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 BlackLevelLock {
ANDROID_BLACK_LEVEL_LOCK_OFF = 0,
ANDROID_BLACK_LEVEL_LOCK_ON = 1,
}

View File

@@ -0,0 +1,72 @@
/*
* 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 <name>-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 CameraMetadataSection {
ANDROID_COLOR_CORRECTION = 0,
ANDROID_CONTROL = 1,
ANDROID_DEMOSAIC = 2,
ANDROID_EDGE = 3,
ANDROID_FLASH = 4,
ANDROID_FLASH_INFO = 5,
ANDROID_HOT_PIXEL = 6,
ANDROID_JPEG = 7,
ANDROID_LENS = 8,
ANDROID_LENS_INFO = 9,
ANDROID_NOISE_REDUCTION = 10,
ANDROID_QUIRKS = 11,
ANDROID_REQUEST = 12,
ANDROID_SCALER = 13,
ANDROID_SENSOR = 14,
ANDROID_SENSOR_INFO = 15,
ANDROID_SHADING = 16,
ANDROID_STATISTICS = 17,
ANDROID_STATISTICS_INFO = 18,
ANDROID_TONEMAP = 19,
ANDROID_LED = 20,
ANDROID_INFO = 21,
ANDROID_BLACK_LEVEL = 22,
ANDROID_SYNC = 23,
ANDROID_REPROCESS = 24,
ANDROID_DEPTH = 25,
ANDROID_LOGICAL_MULTI_CAMERA = 26,
ANDROID_DISTORTION_CORRECTION = 27,
ANDROID_HEIC = 28,
ANDROID_HEIC_INFO = 29,
VENDOR_SECTION = 32768,
}

View File

@@ -0,0 +1,73 @@
/*
* 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 <name>-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 CameraMetadataSectionStart {
ANDROID_COLOR_CORRECTION_START = 0,
ANDROID_CONTROL_START = 65536,
ANDROID_DEMOSAIC_START = 131072,
ANDROID_EDGE_START = 196608,
ANDROID_FLASH_START = 262144,
ANDROID_FLASH_INFO_START = 327680,
ANDROID_HOT_PIXEL_START = 393216,
ANDROID_JPEG_START = 458752,
ANDROID_LENS_START = 524288,
ANDROID_LENS_INFO_START = 589824,
ANDROID_NOISE_REDUCTION_START = 655360,
ANDROID_QUIRKS_START = 720896,
ANDROID_REQUEST_START = 786432,
ANDROID_SCALER_START = 851968,
ANDROID_SENSOR_START = 917504,
ANDROID_SENSOR_INFO_START = 983040,
ANDROID_SHADING_START = 1048576,
ANDROID_STATISTICS_START = 1114112,
ANDROID_STATISTICS_INFO_START = 1179648,
ANDROID_TONEMAP_START = 1245184,
ANDROID_LED_START = 1310720,
ANDROID_INFO_START = 1376256,
ANDROID_BLACK_LEVEL_START = 1441792,
ANDROID_SYNC_START = 1507328,
ANDROID_REPROCESS_START = 1572864,
ANDROID_DEPTH_START = 1638400,
VENDOR_SECTION_START = -2147483648,
ANDROID_LOGICAL_MULTI_CAMERA_START = 1703936,
ANDROID_DISTORTION_CORRECTION_START = 1769472,
ANDROID_HEIC_START = 1835008,
ANDROID_HEIC_INFO_START = 1900544,
VENDOR_SECTION_START = -2147483648,
}

View File

@@ -0,0 +1,327 @@
/*
* 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 <name>-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 CameraMetadataTag {
ANDROID_COLOR_CORRECTION_MODE = 0,
ANDROID_COLOR_CORRECTION_TRANSFORM = 1,
ANDROID_COLOR_CORRECTION_GAINS = 2,
ANDROID_COLOR_CORRECTION_ABERRATION_MODE = 3,
ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES = 4,
ANDROID_CONTROL_AE_ANTIBANDING_MODE = 65536,
ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION = 65537,
ANDROID_CONTROL_AE_LOCK = 65538,
ANDROID_CONTROL_AE_MODE = 65539,
ANDROID_CONTROL_AE_REGIONS = 65540,
ANDROID_CONTROL_AE_TARGET_FPS_RANGE = 65541,
ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER = 65542,
ANDROID_CONTROL_AF_MODE = 65543,
ANDROID_CONTROL_AF_REGIONS = 65544,
ANDROID_CONTROL_AF_TRIGGER = 65545,
ANDROID_CONTROL_AWB_LOCK = 65546,
ANDROID_CONTROL_AWB_MODE = 65547,
ANDROID_CONTROL_AWB_REGIONS = 65548,
ANDROID_CONTROL_CAPTURE_INTENT = 65549,
ANDROID_CONTROL_EFFECT_MODE = 65550,
ANDROID_CONTROL_MODE = 65551,
ANDROID_CONTROL_SCENE_MODE = 65552,
ANDROID_CONTROL_VIDEO_STABILIZATION_MODE = 65553,
ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES = 65554,
ANDROID_CONTROL_AE_AVAILABLE_MODES = 65555,
ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES = 65556,
ANDROID_CONTROL_AE_COMPENSATION_RANGE = 65557,
ANDROID_CONTROL_AE_COMPENSATION_STEP = 65558,
ANDROID_CONTROL_AF_AVAILABLE_MODES = 65559,
ANDROID_CONTROL_AVAILABLE_EFFECTS = 65560,
ANDROID_CONTROL_AVAILABLE_SCENE_MODES = 65561,
ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES = 65562,
ANDROID_CONTROL_AWB_AVAILABLE_MODES = 65563,
ANDROID_CONTROL_MAX_REGIONS = 65564,
ANDROID_CONTROL_SCENE_MODE_OVERRIDES = 65565,
ANDROID_CONTROL_AE_PRECAPTURE_ID = 65566,
ANDROID_CONTROL_AE_STATE = 65567,
ANDROID_CONTROL_AF_STATE = 65568,
ANDROID_CONTROL_AF_TRIGGER_ID = 65569,
ANDROID_CONTROL_AWB_STATE = 65570,
ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS = 65571,
ANDROID_CONTROL_AE_LOCK_AVAILABLE = 65572,
ANDROID_CONTROL_AWB_LOCK_AVAILABLE = 65573,
ANDROID_CONTROL_AVAILABLE_MODES = 65574,
ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE = 65575,
ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST = 65576,
ANDROID_CONTROL_ENABLE_ZSL = 65577,
ANDROID_CONTROL_AF_SCENE_CHANGE = 65578,
ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES = 65579,
ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES = 65580,
ANDROID_CONTROL_EXTENDED_SCENE_MODE = 65581,
ANDROID_CONTROL_ZOOM_RATIO_RANGE = 65582,
ANDROID_CONTROL_ZOOM_RATIO = 65583,
ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION = 65584,
ANDROID_DEMOSAIC_MODE = 131072,
ANDROID_EDGE_MODE = 196608,
ANDROID_EDGE_STRENGTH = 196609,
ANDROID_EDGE_AVAILABLE_EDGE_MODES = 196610,
ANDROID_FLASH_FIRING_POWER = 262144,
ANDROID_FLASH_FIRING_TIME = 262145,
ANDROID_FLASH_MODE = 262146,
ANDROID_FLASH_COLOR_TEMPERATURE = 262147,
ANDROID_FLASH_MAX_ENERGY = 262148,
ANDROID_FLASH_STATE = 262149,
ANDROID_FLASH_INFO_AVAILABLE = 327680,
ANDROID_FLASH_INFO_CHARGE_DURATION = 327681,
ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL = 327682,
ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL = 327683,
ANDROID_HOT_PIXEL_MODE = 393216,
ANDROID_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = 393217,
ANDROID_JPEG_GPS_COORDINATES = 458752,
ANDROID_JPEG_GPS_PROCESSING_METHOD = 458753,
ANDROID_JPEG_GPS_TIMESTAMP = 458754,
ANDROID_JPEG_ORIENTATION = 458755,
ANDROID_JPEG_QUALITY = 458756,
ANDROID_JPEG_THUMBNAIL_QUALITY = 458757,
ANDROID_JPEG_THUMBNAIL_SIZE = 458758,
ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES = 458759,
ANDROID_JPEG_MAX_SIZE = 458760,
ANDROID_JPEG_SIZE = 458761,
ANDROID_LENS_APERTURE = 524288,
ANDROID_LENS_FILTER_DENSITY = 524289,
ANDROID_LENS_FOCAL_LENGTH = 524290,
ANDROID_LENS_FOCUS_DISTANCE = 524291,
ANDROID_LENS_OPTICAL_STABILIZATION_MODE = 524292,
ANDROID_LENS_FACING = 524293,
ANDROID_LENS_POSE_ROTATION = 524294,
ANDROID_LENS_POSE_TRANSLATION = 524295,
ANDROID_LENS_FOCUS_RANGE = 524296,
ANDROID_LENS_STATE = 524297,
ANDROID_LENS_INTRINSIC_CALIBRATION = 524298,
ANDROID_LENS_RADIAL_DISTORTION = 524299,
ANDROID_LENS_POSE_REFERENCE = 524300,
ANDROID_LENS_DISTORTION = 524301,
ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION = 524302,
ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION = 524303,
ANDROID_LENS_INFO_AVAILABLE_APERTURES = 589824,
ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES = 589825,
ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS = 589826,
ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = 589827,
ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE = 589828,
ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE = 589829,
ANDROID_LENS_INFO_SHADING_MAP_SIZE = 589830,
ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION = 589831,
ANDROID_NOISE_REDUCTION_MODE = 655360,
ANDROID_NOISE_REDUCTION_STRENGTH = 655361,
ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = 655362,
ANDROID_QUIRKS_METERING_CROP_REGION = 720896,
ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO = 720897,
ANDROID_QUIRKS_USE_ZSL_FORMAT = 720898,
ANDROID_QUIRKS_USE_PARTIAL_RESULT = 720899,
ANDROID_QUIRKS_PARTIAL_RESULT = 720900,
ANDROID_REQUEST_FRAME_COUNT = 786432,
ANDROID_REQUEST_ID = 786433,
ANDROID_REQUEST_INPUT_STREAMS = 786434,
ANDROID_REQUEST_METADATA_MODE = 786435,
ANDROID_REQUEST_OUTPUT_STREAMS = 786436,
ANDROID_REQUEST_TYPE = 786437,
ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS = 786438,
ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS = 786439,
ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS = 786440,
ANDROID_REQUEST_PIPELINE_DEPTH = 786441,
ANDROID_REQUEST_PIPELINE_MAX_DEPTH = 786442,
ANDROID_REQUEST_PARTIAL_RESULT_COUNT = 786443,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES = 786444,
ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS = 786445,
ANDROID_REQUEST_AVAILABLE_RESULT_KEYS = 786446,
ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = 786447,
ANDROID_REQUEST_AVAILABLE_SESSION_KEYS = 786448,
ANDROID_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS = 786449,
ANDROID_REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION = 786450,
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP = 786451,
ANDROID_REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE = 786452,
ANDROID_SCALER_CROP_REGION = 851968,
ANDROID_SCALER_AVAILABLE_FORMATS = 851969,
ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS = 851970,
ANDROID_SCALER_AVAILABLE_JPEG_SIZES = 851971,
ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = 851972,
ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = 851973,
ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES = 851974,
ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS = 851975,
ANDROID_SCALER_AVAILABLE_RAW_SIZES = 851976,
ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = 851977,
ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS = 851978,
ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS = 851979,
ANDROID_SCALER_AVAILABLE_STALL_DURATIONS = 851980,
ANDROID_SCALER_CROPPING_TYPE = 851981,
ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS = 851982,
ANDROID_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP = 851983,
ANDROID_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES = 851984,
ANDROID_SCALER_DEFAULT_SECURE_IMAGE_SIZE = 851985,
ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS = 851986,
ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 851987,
ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 851988,
ANDROID_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION = 851989,
ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION = 851990,
ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED = 851991,
ANDROID_SENSOR_EXPOSURE_TIME = 917504,
ANDROID_SENSOR_FRAME_DURATION = 917505,
ANDROID_SENSOR_SENSITIVITY = 917506,
ANDROID_SENSOR_REFERENCE_ILLUMINANT1 = 917507,
ANDROID_SENSOR_REFERENCE_ILLUMINANT2 = 917508,
ANDROID_SENSOR_CALIBRATION_TRANSFORM1 = 917509,
ANDROID_SENSOR_CALIBRATION_TRANSFORM2 = 917510,
ANDROID_SENSOR_COLOR_TRANSFORM1 = 917511,
ANDROID_SENSOR_COLOR_TRANSFORM2 = 917512,
ANDROID_SENSOR_FORWARD_MATRIX1 = 917513,
ANDROID_SENSOR_FORWARD_MATRIX2 = 917514,
ANDROID_SENSOR_BASE_GAIN_FACTOR = 917515,
ANDROID_SENSOR_BLACK_LEVEL_PATTERN = 917516,
ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY = 917517,
ANDROID_SENSOR_ORIENTATION = 917518,
ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS = 917519,
ANDROID_SENSOR_TIMESTAMP = 917520,
ANDROID_SENSOR_TEMPERATURE = 917521,
ANDROID_SENSOR_NEUTRAL_COLOR_POINT = 917522,
ANDROID_SENSOR_NOISE_PROFILE = 917523,
ANDROID_SENSOR_PROFILE_HUE_SAT_MAP = 917524,
ANDROID_SENSOR_PROFILE_TONE_CURVE = 917525,
ANDROID_SENSOR_GREEN_SPLIT = 917526,
ANDROID_SENSOR_TEST_PATTERN_DATA = 917527,
ANDROID_SENSOR_TEST_PATTERN_MODE = 917528,
ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES = 917529,
ANDROID_SENSOR_ROLLING_SHUTTER_SKEW = 917530,
ANDROID_SENSOR_OPTICAL_BLACK_REGIONS = 917531,
ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL = 917532,
ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL = 917533,
ANDROID_SENSOR_OPAQUE_RAW_SIZE = 917534,
ANDROID_SENSOR_OPAQUE_RAW_SIZE_MAXIMUM_RESOLUTION = 917535,
ANDROID_SENSOR_PIXEL_MODE = 917536,
ANDROID_SENSOR_RAW_BINNING_FACTOR_USED = 917537,
ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE = 983040,
ANDROID_SENSOR_INFO_SENSITIVITY_RANGE = 983041,
ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = 983042,
ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE = 983043,
ANDROID_SENSOR_INFO_MAX_FRAME_DURATION = 983044,
ANDROID_SENSOR_INFO_PHYSICAL_SIZE = 983045,
ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE = 983046,
ANDROID_SENSOR_INFO_WHITE_LEVEL = 983047,
ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE = 983048,
ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED = 983049,
ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE = 983050,
ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION = 983051,
ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION = 983052,
ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION = 983053,
ANDROID_SENSOR_INFO_BINNING_FACTOR = 983054,
ANDROID_SHADING_MODE = 1048576,
ANDROID_SHADING_STRENGTH = 1048577,
ANDROID_SHADING_AVAILABLE_MODES = 1048578,
ANDROID_STATISTICS_FACE_DETECT_MODE = 1114112,
ANDROID_STATISTICS_HISTOGRAM_MODE = 1114113,
ANDROID_STATISTICS_SHARPNESS_MAP_MODE = 1114114,
ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE = 1114115,
ANDROID_STATISTICS_FACE_IDS = 1114116,
ANDROID_STATISTICS_FACE_LANDMARKS = 1114117,
ANDROID_STATISTICS_FACE_RECTANGLES = 1114118,
ANDROID_STATISTICS_FACE_SCORES = 1114119,
ANDROID_STATISTICS_HISTOGRAM = 1114120,
ANDROID_STATISTICS_SHARPNESS_MAP = 1114121,
ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP = 1114122,
ANDROID_STATISTICS_LENS_SHADING_MAP = 1114123,
ANDROID_STATISTICS_PREDICTED_COLOR_GAINS = 1114124,
ANDROID_STATISTICS_PREDICTED_COLOR_TRANSFORM = 1114125,
ANDROID_STATISTICS_SCENE_FLICKER = 1114126,
ANDROID_STATISTICS_HOT_PIXEL_MAP = 1114127,
ANDROID_STATISTICS_LENS_SHADING_MAP_MODE = 1114128,
ANDROID_STATISTICS_OIS_DATA_MODE = 1114129,
ANDROID_STATISTICS_OIS_TIMESTAMPS = 1114130,
ANDROID_STATISTICS_OIS_X_SHIFTS = 1114131,
ANDROID_STATISTICS_OIS_Y_SHIFTS = 1114132,
ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = 1179648,
ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT = 1179649,
ANDROID_STATISTICS_INFO_MAX_FACE_COUNT = 1179650,
ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT = 1179651,
ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE = 1179652,
ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE = 1179653,
ANDROID_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = 1179654,
ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES = 1179655,
ANDROID_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES = 1179656,
ANDROID_TONEMAP_CURVE_BLUE = 1245184,
ANDROID_TONEMAP_CURVE_GREEN = 1245185,
ANDROID_TONEMAP_CURVE_RED = 1245186,
ANDROID_TONEMAP_MODE = 1245187,
ANDROID_TONEMAP_MAX_CURVE_POINTS = 1245188,
ANDROID_TONEMAP_AVAILABLE_TONE_MAP_MODES = 1245189,
ANDROID_TONEMAP_GAMMA = 1245190,
ANDROID_TONEMAP_PRESET_CURVE = 1245191,
ANDROID_LED_TRANSMIT = 1310720,
ANDROID_LED_AVAILABLE_LEDS = 1310721,
ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL = 1376256,
ANDROID_INFO_VERSION = 1376257,
ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION = 1376258,
ANDROID_INFO_DEVICE_STATE_ORIENTATIONS = 1376259,
ANDROID_BLACK_LEVEL_LOCK = 1441792,
ANDROID_SYNC_FRAME_NUMBER = 1507328,
ANDROID_SYNC_MAX_LATENCY = 1507329,
ANDROID_REPROCESS_EFFECTIVE_EXPOSURE_FACTOR = 1572864,
ANDROID_REPROCESS_MAX_CAPTURE_STALL = 1572865,
ANDROID_DEPTH_MAX_DEPTH_SAMPLES = 1638400,
ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS = 1638401,
ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS = 1638402,
ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS = 1638403,
ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE = 1638404,
ANDROID_DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS = 1638405,
ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS = 1638406,
ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS = 1638407,
ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS = 1638408,
ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 1638409,
ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 1638410,
ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION = 1638411,
ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 1638412,
ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 1638413,
ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION = 1638414,
ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS = 1703936,
ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE = 1703937,
ANDROID_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID = 1703938,
ANDROID_DISTORTION_CORRECTION_MODE = 1769472,
ANDROID_DISTORTION_CORRECTION_AVAILABLE_MODES = 1769473,
ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS = 1835008,
ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS = 1835009,
ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS = 1835010,
ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 1835011,
ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 1835012,
ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION = 1835013,
ANDROID_HEIC_INFO_SUPPORTED = 1900544,
ANDROID_HEIC_INFO_MAX_JPEG_APP_SEGMENTS_COUNT = 1900545,
}

View File

@@ -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 <name>-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 ColorCorrectionAberrationMode {
ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF = 0,
ANDROID_COLOR_CORRECTION_ABERRATION_MODE_FAST = 1,
ANDROID_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2,
}

View File

@@ -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 <name>-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 ColorCorrectionMode {
ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0,
ANDROID_COLOR_CORRECTION_MODE_FAST = 1,
ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY = 2,
}

View File

@@ -0,0 +1,45 @@
/*
* 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 <name>-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 ControlAeAntibandingMode {
ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF = 0,
ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ = 1,
ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ = 2,
ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO = 3,
}

View File

@@ -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 <name>-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 ControlAeLock {
ANDROID_CONTROL_AE_LOCK_OFF = 0,
ANDROID_CONTROL_AE_LOCK_ON = 1,
}

View File

@@ -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 <name>-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 ControlAeLockAvailable {
ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE = 0,
ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE = 1,
}

View File

@@ -0,0 +1,47 @@
/*
* 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 <name>-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 ControlAeMode {
ANDROID_CONTROL_AE_MODE_OFF = 0,
ANDROID_CONTROL_AE_MODE_ON = 1,
ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH = 2,
ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3,
ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4,
ANDROID_CONTROL_AE_MODE_ON_EXTERNAL_FLASH = 5,
}

View File

@@ -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 <name>-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 ControlAePrecaptureTrigger {
ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0,
ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_START = 1,
ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2,
}

View File

@@ -0,0 +1,47 @@
/*
* 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 <name>-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 ControlAeState {
ANDROID_CONTROL_AE_STATE_INACTIVE = 0,
ANDROID_CONTROL_AE_STATE_SEARCHING = 1,
ANDROID_CONTROL_AE_STATE_CONVERGED = 2,
ANDROID_CONTROL_AE_STATE_LOCKED = 3,
ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED = 4,
ANDROID_CONTROL_AE_STATE_PRECAPTURE = 5,
}

View File

@@ -0,0 +1,47 @@
/*
* 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 <name>-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 ControlAfMode {
ANDROID_CONTROL_AF_MODE_OFF = 0,
ANDROID_CONTROL_AF_MODE_AUTO = 1,
ANDROID_CONTROL_AF_MODE_MACRO = 2,
ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3,
ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4,
ANDROID_CONTROL_AF_MODE_EDOF = 5,
}

Some files were not shown because too many files have changed in this diff Show More