Emilian Peev | b5f634f | 2021-12-13 15:13:46 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2021 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.device@3.8; |
| 18 | |
| 19 | import android.hardware.camera.common@1.0::Status; |
| 20 | import @3.5::StreamConfiguration; |
| 21 | import @3.7::ICameraDeviceSession; |
| 22 | import @3.6::HalStreamConfiguration; |
| 23 | |
| 24 | /** |
| 25 | * Camera device active session interface. |
| 26 | * |
| 27 | * Obtained via ICameraDevice::open(), this interface contains the methods to |
| 28 | * configure and request captures from an active camera device. |
| 29 | */ |
| 30 | interface ICameraDeviceSession extends @3.7::ICameraDeviceSession { |
| 31 | /** |
| 32 | * configureStreams_3_8: |
| 33 | * |
| 34 | * Identical to @3.7::ICameraDeviceSession.configureStreams_3_7, except that: |
| 35 | * |
| 36 | * - The requestedConfiguration allows the camera framework to configure |
| 37 | * 10-bit dynamic range profile. |
Shuzhen Wang | 7267abf | 2021-12-14 20:12:08 -0800 | [diff] [blame^] | 38 | * - The requestedConfiguration allows the camera framework to configure |
| 39 | * stream use cases. |
Emilian Peev | b5f634f | 2021-12-13 15:13:46 -0800 | [diff] [blame] | 40 | * |
| 41 | * @return status Status code for the operation, one of: |
| 42 | * OK: |
| 43 | * On successful stream configuration. |
| 44 | * INTERNAL_ERROR: |
| 45 | * If there has been a fatal error and the device is no longer |
| 46 | * operational. Only close() can be called successfully by the |
| 47 | * framework after this error is returned. |
| 48 | * ILLEGAL_ARGUMENT: |
| 49 | * If the requested stream configuration is invalid. Some examples |
| 50 | * of invalid stream configurations include: |
| 51 | * - Including more than 1 INPUT stream |
| 52 | * - Not including any OUTPUT streams |
| 53 | * - Including streams with unsupported formats, or an unsupported |
| 54 | * size for that format. |
| 55 | * - Including too many output streams of a certain format. |
| 56 | * - Unsupported rotation configuration |
| 57 | * - Stream sizes/formats don't satisfy the |
| 58 | * StreamConfigurationMode requirements |
| 59 | * for non-NORMAL mode, or the requested operation_mode is not |
| 60 | * supported by the HAL. |
| 61 | * - Unsupported usage flag |
| 62 | * - Unsupported stream groupIds, or unsupported multi-resolution |
| 63 | * input stream. |
| 64 | * - Invalid combination between a 10-bit dynamic range profile |
| 65 | * and none impl. defined 8-bit format for a particular stream. |
Shuzhen Wang | 7267abf | 2021-12-14 20:12:08 -0800 | [diff] [blame^] | 66 | * - Unsupported stream use case |
Emilian Peev | b5f634f | 2021-12-13 15:13:46 -0800 | [diff] [blame] | 67 | * The camera service cannot filter out all possible illegal stream |
| 68 | * configurations, since some devices may support more simultaneous |
| 69 | * streams or larger stream resolutions than the minimum required |
| 70 | * for a given camera device hardware level. The HAL must return an |
| 71 | * ILLEGAL_ARGUMENT for any unsupported stream set, and then be |
| 72 | * ready to accept a future valid stream configuration in a later |
| 73 | * configureStreams call. |
| 74 | * @return halConfiguration The stream parameters desired by the HAL for |
| 75 | * each stream, including maximum buffers, the usage flags, and the |
| 76 | * override format and dataspace. |
| 77 | */ |
| 78 | configureStreams_3_8(StreamConfiguration requestedConfiguration) |
| 79 | generates (Status status, @3.6::HalStreamConfiguration halConfiguration); |
| 80 | |
| 81 | /** |
| 82 | * repeatingRequestEnd: |
| 83 | * |
| 84 | * Notification about the last frame number in a repeating request along with the |
| 85 | * ids of all streams included in the repeating request. |
| 86 | * |
| 87 | * This can be called at any point after 'processCaptureRequest' in response |
| 88 | * to camera clients disabling an active repeating request. |
| 89 | * |
| 90 | * Performance requirements: |
| 91 | * The call must not be blocked for extensive periods and should be extremely lightweight. There |
| 92 | * must be no frame rate degradation or frame jitter introduced. |
| 93 | * |
| 94 | * This method must always succeed, even if the device has encountered a |
| 95 | * serious error. |
| 96 | */ |
| 97 | repeatingRequestEnd(uint32_t frameNumber, vec<int32_t> streamIds); |
| 98 | }; |