Shuzhen Wang | 0506610 | 2020-01-10 12:43:08 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.hardware.camera.provider@2.6; |
| 18 | |
| 19 | import @2.5::ICameraProvider; |
Jayant Chowdhary | 6248100 | 2020-01-09 15:39:27 -0800 | [diff] [blame] | 20 | import android.hardware.camera.common@1.0::Status; |
| 21 | import android.hardware.camera.device@3.4::StreamConfiguration; |
Shuzhen Wang | 0506610 | 2020-01-10 12:43:08 -0800 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Camera provider HAL |
Jayant Chowdhary | 6248100 | 2020-01-09 15:39:27 -0800 | [diff] [blame] | 25 | * |
| 26 | * @2.6::adds support for the getConcurrentStreamingCameraIds() and |
| 27 | * isConcurrentStreamCombinationSupported() |
| 28 | * @2.6::ICameraProviderCallback to receive physical camera availability |
| 29 | * callbacks for logical multi-cameras. |
Shuzhen Wang | 0506610 | 2020-01-10 12:43:08 -0800 | [diff] [blame] | 30 | */ |
| 31 | interface ICameraProvider extends @2.5::ICameraProvider { |
| 32 | /** |
Jayant Chowdhary | 6248100 | 2020-01-09 15:39:27 -0800 | [diff] [blame] | 33 | * getConcurrentStreamingCameraIds |
| 34 | * |
| 35 | * Get a vector of combinations of camera device ids that are able to |
| 36 | * configure streams concurrently. Each camera device advertised in a |
| 37 | * combination MUST at the very least support the following streams while |
| 38 | * streaming concurrently with the other camera ids in the combination. |
| 39 | * |
| 40 | * Target 1 Target 2 |
| 41 | * --------------------------------------------- |
| 42 | * | Type | Size | Type | Size | |
| 43 | * --------------------------------------------- |
| 44 | * | YUV | 1280 X 720 | | |
| 45 | * --------------------------------------------- |
| 46 | * | PRIV | 1280 X 720 | | |
| 47 | * --------------------------------------------- |
| 48 | * | YUV | 1280 X 720 | YUV |1280 X 720| |
| 49 | * --------------------------------------------- |
| 50 | * | PRIV | 1280 X 720 | PRIV |1280 X 720| |
| 51 | * --------------------------------------------- |
| 52 | * | PRIV | 1280 X 720 | YUV |1280 X 720| |
| 53 | * --------------------------------------------- |
| 54 | |
| 55 | * @return status Status code for the operation |
| 56 | * @return cameraIds a list of camera id combinations that support |
| 57 | * concurrent stream configurations with the minimum guarantees |
| 58 | * specified. |
Shuzhen Wang | 0506610 | 2020-01-10 12:43:08 -0800 | [diff] [blame] | 59 | */ |
Jayant Chowdhary | 6248100 | 2020-01-09 15:39:27 -0800 | [diff] [blame] | 60 | getConcurrentStreamingCameraIds() generates (Status status, vec<vec<string>> cameraIds); |
| 61 | |
| 62 | /** |
| 63 | * isConcurrentStreamCombinationSupported: |
| 64 | * |
| 65 | * Check for device support of specific camera stream combinations while |
| 66 | * streaming concurrently with other devices. |
| 67 | * |
| 68 | * The per device streamList must contain at least one output-capable stream, and may |
| 69 | * not contain more than one input-capable stream. |
| 70 | * In contrast to regular stream configuration the framework does not create |
| 71 | * or initialize any actual streams. This means that Hal must not use or |
| 72 | * consider the stream "id" value. |
| 73 | * |
| 74 | * ------------------------------------------------------------------------ |
| 75 | * |
| 76 | * Preconditions: |
| 77 | * |
| 78 | * The framework can call this method at any time before, during and |
| 79 | * after active session configuration per device. This means that calls must not |
| 80 | * impact the performance of pending camera requests in any way. In |
| 81 | * particular there must not be any glitches or delays during normal |
| 82 | * camera streaming. |
| 83 | * |
| 84 | * The framework must not call this method with any combination of camera |
| 85 | * ids that is not a subset of the camera ids advertised by getConcurrentStreamingCameraIds of |
| 86 | * the same provider. |
| 87 | * |
| 88 | * Performance requirements: |
| 89 | * This call is expected to be significantly faster than stream |
| 90 | * configuration. In general HW and SW camera settings must not be |
| 91 | * changed and there must not be a user-visible impact on camera performance. |
| 92 | * |
| 93 | * @param configs a vector of camera ids and their corresponding stream |
| 94 | * configurations that need to be queried for support. |
| 95 | * |
| 96 | * @return status Status code for the operation, one of: |
| 97 | * OK: |
| 98 | * On successful stream combination query. |
| 99 | * METHOD_NOT_SUPPORTED: |
| 100 | * The camera provider does not support stream combination query. |
| 101 | * INTERNAL_ERROR: |
| 102 | * The stream combination query cannot complete due to internal |
| 103 | * error. |
| 104 | * @return true in case the stream combination is supported, false otherwise. |
| 105 | * |
| 106 | * |
| 107 | */ |
| 108 | isConcurrentStreamCombinationSupported(vec<CameraIdAndStreamCombination> configs) |
| 109 | generates (Status status, bool queryStatus); |
Shuzhen Wang | 0506610 | 2020-01-10 12:43:08 -0800 | [diff] [blame] | 110 | }; |