blob: e1663e6669d642c715bbb827ef51e9a5b956856c [file] [log] [blame]
Emilian Peeve18057b2017-11-13 16:03:44 +00001/*
Shuzhen Wang82e36b32017-11-28 17:00:43 -08002 * Copyright (C) 2017-2018 The Android Open Source Project
Emilian Peeve18057b2017-11-13 16:03:44 +00003 *
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.4;
18
19import android.hardware.camera.common@1.0::Status;
Eino-Ville Talvala658d30d2018-01-18 12:55:07 -080020import @3.2::CameraMetadata;
Emilian Peeve18057b2017-11-13 16:03:44 +000021import @3.3::ICameraDeviceSession;
22import @3.3::HalStreamConfiguration;
Shuzhen Wang82e36b32017-11-28 17:00:43 -080023import @3.2::BufferCache;
Emilian Peeve18057b2017-11-13 16:03:44 +000024
25/**
26 * Camera device active session interface.
27 *
28 * Obtained via ICameraDevice::open(), this interface contains the methods to
29 * configure and request captures from an active camera device.
30 */
31interface ICameraDeviceSession extends @3.3::ICameraDeviceSession {
32
33 /**
34 * configureStreams_3_4:
35 *
36 * Identical to @3.3::ICameraDeviceSession.configureStreams, except that:
37 *
38 * - The requested configuration includes session parameters.
39 *
40 * @return Status Status code for the operation, one of:
41 * OK:
42 * On successful stream configuration.
43 * INTERNAL_ERROR:
44 * If there has been a fatal error and the device is no longer
45 * operational. Only close() can be called successfully by the
46 * framework after this error is returned.
47 * ILLEGAL_ARGUMENT:
48 * If the requested stream configuration is invalid. Some examples
49 * of invalid stream configurations include:
50 * - Including more than 1 INPUT stream
51 * - Not including any OUTPUT streams
52 * - Including streams with unsupported formats, or an unsupported
53 * size for that format.
54 * - Including too many output streams of a certain format.
55 * - Unsupported rotation configuration
56 * - Stream sizes/formats don't satisfy the
Yin-Chia Yeh6a6fe0f2018-09-06 15:38:34 -070057 * StreamConfigurationMode requirements
Emilian Peeve18057b2017-11-13 16:03:44 +000058 * for non-NORMAL mode, or the requested operation_mode is not
59 * supported by the HAL.
60 * - Unsupported usage flag
61 * The camera service cannot filter out all possible illegal stream
62 * configurations, since some devices may support more simultaneous
63 * streams or larger stream resolutions than the minimum required
64 * for a given camera device hardware level. The HAL must return an
65 * ILLEGAL_ARGUMENT for any unsupported stream set, and then be
66 * ready to accept a future valid stream configuration in a later
67 * configureStreams call.
68 * @return halConfiguration The stream parameters desired by the HAL for
69 * each stream, including maximum buffers, the usage flags, and the
70 * override format.
71 */
72 configureStreams_3_4(@3.4::StreamConfiguration requestedConfiguration)
73 generates (Status status,
Shuzhen Wang82e36b32017-11-28 17:00:43 -080074 @3.4::HalStreamConfiguration halConfiguration);
Emilian Peevb75aa352018-01-17 11:00:54 +000075
76 /**
77 * processCaptureRequest_3_4:
78 *
79 * Identical to @3.2::ICameraDeviceSession.processCaptureRequest, except that:
80 *
81 * - The capture request can include individual settings for physical camera devices
82 * backing a logical multi-camera.
83 *
84 * @return status Status code for the operation, one of:
85 * OK:
86 * On a successful start to processing the capture request
87 * ILLEGAL_ARGUMENT:
88 * If the input is malformed (the settings are empty when not
89 * allowed, the physical camera settings are invalid, there are 0
90 * output buffers, etc) and capture processing
91 * cannot start. Failures during request processing must be
92 * handled by calling ICameraDeviceCallback::notify(). In case of
93 * this error, the framework retains responsibility for the
94 * stream buffers' fences and the buffer handles; the HAL must not
95 * close the fences or return these buffers with
96 * ICameraDeviceCallback::processCaptureResult().
97 * INTERNAL_ERROR:
98 * If the camera device has encountered a serious error. After this
99 * error is returned, only the close() method can be successfully
100 * called by the framework.
101 * @return numRequestProcessed Number of requests successfully processed by
102 * camera HAL. When status is OK, this must be equal to the size of
103 * requests. When the call fails, this number is the number of requests
104 * that HAL processed successfully before HAL runs into an error.
105 *
106 */
107 processCaptureRequest_3_4(vec<CaptureRequest> requests, vec<BufferCache> cachesToRemove)
108 generates (Status status, uint32_t numRequestProcessed);
Emilian Peeve18057b2017-11-13 16:03:44 +0000109};