From 48dec2e76ed5f680c6dd3b7a641b26bc1dbbf3cd Mon Sep 17 00:00:00 2001 From: Jayant Chowdhary Date: Fri, 13 Mar 2020 13:44:03 -0700 Subject: [PATCH] Mandatory concurrent stream combinations should be generated by metadata-generate. Bug: 151462833 Test: builds Change-Id: I2255ad38a06f7eba3eb591e9147ab694178e4989 Signed-off-by: Jayant Chowdhary --- .../camera2/CameraCharacteristics.java | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 7e72b73db3584..737fe60c1541c 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -2859,6 +2859,29 @@ public final class CameraCharacteristics extends CameraMetadata SCALER_MANDATORY_STREAM_COMBINATIONS = new Key("android.scaler.mandatoryStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); + /** + *

An array of mandatory concurrent stream combinations. + * This is an app-readable conversion of the concurrent mandatory stream combination + * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.

+ *

The array of + * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is + * generated according to the documented + * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each + * device which has its Id present in the set returned by + * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds }. + * Clients can use the array as a quick reference to find an appropriate camera stream + * combination. + * The mandatory stream combination array will be {@code null} in case the device is not a + * part of at least one set of combinations returned by + * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds }.

+ *

Optional - The value for this key may be {@code null} on some devices.

+ */ + @PublicKey + @NonNull + @SyntheticKey + public static final Key SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS = + new Key("android.scaler.mandatoryConcurrentStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); + /** *

List of rotate-and-crop modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} that are supported by this camera device.

*

This entry lists the valid modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} for this camera device.

@@ -2875,28 +2898,7 @@ public final class CameraCharacteristics extends CameraMetadata SCALER_AVAILABLE_ROTATE_AND_CROP_MODES = new Key("android.scaler.availableRotateAndCropModes", int[].class); - /** - *

An array of mandatory concurrent stream combinations. - * This is an app-readable conversion of the concurrent mandatory stream combination - * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.

- *

The array of - * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is - * generated according to the documented - * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each device - * which has its Id present in the set returned by - * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds}. - * Clients can use the array as a quick reference to find an appropriate camera stream - * combination. - * The mandatory stream combination array will be {@code null} in case the device is not a part - * of at least one set of combinations returned by - * {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds}.

- *

Optional - The value for this key may be {@code null} on some devices.

- */ - @PublicKey - @NonNull - @SyntheticKey - public static final Key SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS = - new Key("android.scaler.mandatoryConcurrentStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class); + /** *

The area of the image sensor which corresponds to active pixels after any geometric * distortion correction has been applied.