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