From 83e5dd90020f3c95ef1d6f5fc3e7f84c15b221ed Mon Sep 17 00:00:00 2001 From: Shuzhen Wang Date: Wed, 20 Mar 2019 12:06:49 -0700 Subject: [PATCH] Camera: Relax logical camera stream combination requirement Logical camera now doesn't mandate concurrent physical streams combination. Instead, require is_stream_combination_required to query whether such a combination is supported by HAL. Test: Camera CTS, ITS Bug: 119325664 Change-Id: I8ea7abc6fe1e34e687e86dcd1e7529d030bcc71a --- .../include/camera/NdkCameraMetadataTags.h | 45 ++++++++----------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/camera/ndk/include/camera/NdkCameraMetadataTags.h b/camera/ndk/include/camera/NdkCameraMetadataTags.h index acf699925c..99b613e1f3 100644 --- a/camera/ndk/include/camera/NdkCameraMetadataTags.h +++ b/camera/ndk/include/camera/NdkCameraMetadataTags.h @@ -5695,6 +5695,8 @@ typedef enum acamera_metadata_tag { *

In both cases, all images generated for a particular capture request still carry the same * timestamps, so that they can be used to look up the matching frame number and * onCaptureStarted callback.

+ *

This tag is only applicable if the logical camera device supports concurrent physical + * streams from different physical cameras.

*/ ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE = // byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t) ACAMERA_LOGICAL_MULTI_CAMERA_START + 1, @@ -7581,14 +7583,23 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING = 10, /** - *

The camera device is a logical camera backed by two or more physical cameras. In - * API level 28, the physical cameras must also be exposed to the application via - * CameraManager#getCameraIdList. Starting from API - * level 29, some or all physical cameras may not be independently exposed to the - * application, in which case the physical camera IDs will not be available in - * CameraManager#getCameraIdList. But the application - * can still query the physical cameras' characteristics by calling - * CameraManager#getCameraCharacteristics.

+ *

The camera device is a logical camera backed by two or more physical cameras.

+ *

In API level 28, the physical cameras must also be exposed to the application via + * CameraManager#getCameraIdList.

+ *

Starting from API level 29, some or all physical cameras may not be independently + * exposed to the application, in which case the physical camera IDs will not be + * available in CameraManager#getCameraIdList. But the + * application can still query the physical cameras' characteristics by calling + * CameraManager#getCameraCharacteristics. Additionally, + * if a physical camera is hidden from camera ID list, the mandatory stream combinations + * for that physical camera must be supported through the logical camera using physical + * streams.

+ *

Combinations of logical and physical streams, or physical streams from different + * physical cameras are not guaranteed. However, if the camera device supports + * {@link ACameraDevice_isSessionConfigurationSupported }, + * application must be able to query whether a stream combination involving physical + * streams is supported by calling + * {@link ACameraDevice_isSessionConfigurationSupported }.

*

Camera application shouldn't assume that there are at most 1 rear camera and 1 front * camera in the system. For an application that switches between front and back cameras, * the recommendation is to switch between the first rear camera and the first front @@ -7613,24 +7624,6 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * the same. *

  • The logical camera must be LIMITED or higher device.
  • * - *

    Both the logical camera device and its underlying physical devices support the - * mandatory stream combinations required for their device levels.

    - *

    Additionally, for each guaranteed stream combination, the logical camera supports:

    - * - *

    Using physical streams in place of a logical stream of the same size and format will - * not slow down the frame rate of the capture, as long as the minimum frame duration - * of the physical and logical streams are the same.

    *

    A logical camera device's dynamic metadata may contain * ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID to notify the application of the current * active physical camera Id. An active physical camera is the physical camera from which