diff options
author | Jayant Chowdhary <jchowdhary@google.com> | 2020-01-09 15:39:27 -0800 |
---|---|---|
committer | Jayant Chowdhary <jchowdhary@google.com> | 2020-01-24 08:50:50 -0800 |
commit | 6248100ed66341928d120b000bf53ac35a0277b5 (patch) | |
tree | 32c90a42eb558abc787e4cb8367da36f6d149f90 /camera/provider | |
parent | e6b7a71153ff4ae4c31ac08ee68d28382bbd103f (diff) | |
download | platform_hardware_interfaces-6248100ed66341928d120b000bf53ac35a0277b5.tar.gz platform_hardware_interfaces-6248100ed66341928d120b000bf53ac35a0277b5.tar.bz2 platform_hardware_interfaces-6248100ed66341928d120b000bf53ac35a0277b5.zip |
camera: Add ICameraProvider@2.6.
ICameraProvider@2.6 adds the following new apis:
- getConcurrentStreamingCameraIds()
tells the camera framework which combinations of camera ids may
stream concurrently with guaranteed stream combinations
- isConcurrentSessionConfigurationSupported()
in order to assist the camera framework in knowing which camera ids may stream
concurrently and whether certain concurrent session configurations will
be supported by the camera HAL.
Bug: 77960042
Test: builds
Change-Id: I47caddb7ae5c7b1b2e926f7b877f53a367564d2a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Diffstat (limited to 'camera/provider')
-rw-r--r-- | camera/provider/2.6/Android.bp | 1 | ||||
-rw-r--r-- | camera/provider/2.6/ICameraProvider.hal | 86 | ||||
-rw-r--r-- | camera/provider/2.6/types.hal | 30 |
3 files changed, 114 insertions, 3 deletions
diff --git a/camera/provider/2.6/Android.bp b/camera/provider/2.6/Android.bp index 16bd7927ac..e69819c863 100644 --- a/camera/provider/2.6/Android.bp +++ b/camera/provider/2.6/Android.bp @@ -7,6 +7,7 @@ hidl_interface { enabled: true, }, srcs: [ + "types.hal", "ICameraProvider.hal", "ICameraProviderCallback.hal", ], diff --git a/camera/provider/2.6/ICameraProvider.hal b/camera/provider/2.6/ICameraProvider.hal index 60b59a3ae7..0948db6ea3 100644 --- a/camera/provider/2.6/ICameraProvider.hal +++ b/camera/provider/2.6/ICameraProvider.hal @@ -17,14 +17,94 @@ package android.hardware.camera.provider@2.6; import @2.5::ICameraProvider; +import android.hardware.camera.common@1.0::Status; +import android.hardware.camera.device@3.4::StreamConfiguration; /** * Camera provider HAL + * + * @2.6::adds support for the getConcurrentStreamingCameraIds() and + * isConcurrentStreamCombinationSupported() + * @2.6::ICameraProviderCallback to receive physical camera availability + * callbacks for logical multi-cameras. */ interface ICameraProvider extends @2.5::ICameraProvider { /** - * @2.4::ICameraProvider::setCallback can be passed a - * @2.6::ICameraProviderCallback to receive physical camera availability - * callbacks for logical multi-cameras. + * getConcurrentStreamingCameraIds + * + * Get a vector of combinations of camera device ids that are able to + * configure streams concurrently. Each camera device advertised in a + * combination MUST at the very least support the following streams while + * streaming concurrently with the other camera ids in the combination. + * + * Target 1 Target 2 + * --------------------------------------------- + * | Type | Size | Type | Size | + * --------------------------------------------- + * | YUV | 1280 X 720 | | + * --------------------------------------------- + * | PRIV | 1280 X 720 | | + * --------------------------------------------- + * | YUV | 1280 X 720 | YUV |1280 X 720| + * --------------------------------------------- + * | PRIV | 1280 X 720 | PRIV |1280 X 720| + * --------------------------------------------- + * | PRIV | 1280 X 720 | YUV |1280 X 720| + * --------------------------------------------- + + * @return status Status code for the operation + * @return cameraIds a list of camera id combinations that support + * concurrent stream configurations with the minimum guarantees + * specified. + */ + getConcurrentStreamingCameraIds() generates (Status status, vec<vec<string>> cameraIds); + + /** + * isConcurrentStreamCombinationSupported: + * + * Check for device support of specific camera stream combinations while + * streaming concurrently with other devices. + * + * The per device 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 per device. 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. + * + * The framework must not call this method with any combination of camera + * ids that is not a subset of the camera ids advertised by getConcurrentStreamingCameraIds of + * the same provider. + * + * 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. + * + * @param configs a vector of camera ids and their corresponding stream + * configurations that need to be queried for support. + * + * @return status Status code for the operation, one of: + * OK: + * On successful stream combination query. + * METHOD_NOT_SUPPORTED: + * The camera provider does not support stream combination query. + * INTERNAL_ERROR: + * The stream combination query cannot complete due to internal + * error. + * @return true in case the stream combination is supported, false otherwise. + * + * */ + isConcurrentStreamCombinationSupported(vec<CameraIdAndStreamCombination> configs) + generates (Status status, bool queryStatus); }; diff --git a/camera/provider/2.6/types.hal b/camera/provider/2.6/types.hal new file mode 100644 index 0000000000..24c62aa24d --- /dev/null +++ b/camera/provider/2.6/types.hal @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2020 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.provider@2.6; + +import android.hardware.camera.device@3.4::StreamConfiguration; + +/** + * CameraIdAndStreamCombination: + * Pairs the cameraId and the StreamConfiguration to be + * tested with other concurrent camera id and StreamConfigurations + */ +struct CameraIdAndStreamCombination { + string cameraId; + + @3.4::StreamConfiguration streamConfiguration; +}; |