From 428256d2588fdd20bf9e424f9171e48a804b7730 Mon Sep 17 00:00:00 2001
From: Yin-Chia Yeh
Exception on 176x144 (QCIF) resolution: + * Camera devices usually have a fixed capability for downscaling from + * larger resolution to smaller, and the QCIF resolution sometimes + * is not fully supported due to this limitation on devices with + * high-resolution image sensors. Therefore, trying to configure a QCIF + * video resolution with any preview or picture size larger than + * 1920x1080 (either width or height) might not be supported, and + * {@link #setParameters(Camera.Parameters)} will throw a + * RuntimeException if it is not.
+ * * @return a list of Size object if camera has separate preview and * video output; otherwise, null is returned. * @see #getPreferredPreviewSizeForVideo() @@ -3187,6 +3210,16 @@ public class Camera { *Applications need to consider the display orientation. See {@link * #setPreviewSize(int,int)} for reference.
* + *Exception on 176x144 (QCIF) resolution: + * Camera devices usually have a fixed capability for downscaling from + * larger resolution to smaller, and the QCIF resolution sometimes + * is not fully supported due to this limitation on devices with + * high-resolution image sensors. Therefore, trying to configure a QCIF + * picture size with any preview or video size larger than 1920x1080 + * (either width or height) might not be supported, and + * {@link #setParameters(Camera.Parameters)} might throw a + * RuntimeException if it is not.
+ * * @param width the width for pictures, in pixels * @param height the height for pictures, in pixels * @see #setPreviewSize(int,int) diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index e33060bb9250a..9bf619900e19f 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -2130,6 +2130,12 @@ public final class CameraCharacteristics extends CameraMetadataRefer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional * mandatory stream configurations on a per-capability basis.
+ *Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for + * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not + * fully supported due to this limitation on devices with high-resolution image sensors. + * Therefore, trying to configure a QCIF resolution stream together with any other + * stream larger than 1920x1080 resolution (either width or height) might not be supported, + * and capture session creation will fail if it is not.
*This key is available on all devices.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL @@ -2325,6 +2331,12 @@ public final class CameraCharacteristics extends CameraMetadataException on 176x144 (QCIF) resolution: camera devices usually have a fixed capability on + * downscaling from larger resolution to smaller ones, and the QCIF resolution can sometimes + * not be fully supported due to this limitation on devices with high-resolution image + * sensors. Therefore, trying to configure a QCIF resolution stream together with any other + * stream larger than 1920x1080 resolution (either width or height) might not be supported, + * and capture session creation will fail if it is not.
*This key is available on all devices.
* * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL @@ -3182,7 +3194,7 @@ public final class CameraCharacteristics extends CameraMetadataLEVEL_3 devices additionally support YUV reprocessing and RAW image capture, along
* with additional output stream configurations.
* EXTERNAL devices are similar to LIMITED devices with exceptions like some sensor or
- * lens information not reorted or less stable framerates.See the individual level enums for full descriptions of the supported capabilities. The * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index ce88697fa8db2..04e9246b994e0 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -433,6 +433,14 @@ public abstract class CameraDevice implements AutoCloseable { * target combinations with sizes outside of these guarantees, but this can only be tested for * by attempting to create a session with such targets.
* + *Exception on 176x144 (QCIF) resolution: + * Camera devices usually have a fixed capability for downscaling from larger resolution to + * smaller, and the QCIF resolution sometimes is not fully supported due to this + * limitation on devices with high-resolution image sensors. Therefore, trying to configure a + * QCIF resolution stream together with any other stream larger than 1920x1080 resolution + * (either width or height) might not be supported, and capture session creation will fail if it + * is not.
+ * * @param outputs The new set of Surfaces that should be made available as * targets for captured image data. * @param callback The callback to notify about the status of the new capture session.