blob: 4ce749d7aad02962b9337b7a5909857618b88cb2 [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;
20import @3.3::ICameraDeviceSession;
21import @3.3::HalStreamConfiguration;
Shuzhen Wang82e36b32017-11-28 17:00:43 -080022import @3.2::BufferCache;
Emilian Peeve18057b2017-11-13 16:03:44 +000023
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.3::ICameraDeviceSession {
31
32 /**
33 * configureStreams_3_4:
34 *
35 * Identical to @3.3::ICameraDeviceSession.configureStreams, except that:
36 *
37 * - The requested configuration includes session parameters.
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 * camera3_stream_configuration_t->operation_mode requirements
57 * for non-NORMAL mode, or the requested operation_mode is not
58 * supported by the HAL.
59 * - Unsupported usage flag
60 * The camera service cannot filter out all possible illegal stream
61 * configurations, since some devices may support more simultaneous
62 * streams or larger stream resolutions than the minimum required
63 * for a given camera device hardware level. The HAL must return an
64 * ILLEGAL_ARGUMENT for any unsupported stream set, and then be
65 * ready to accept a future valid stream configuration in a later
66 * configureStreams call.
67 * @return halConfiguration The stream parameters desired by the HAL for
68 * each stream, including maximum buffers, the usage flags, and the
69 * override format.
70 */
71 configureStreams_3_4(@3.4::StreamConfiguration requestedConfiguration)
72 generates (Status status,
Shuzhen Wang82e36b32017-11-28 17:00:43 -080073 @3.4::HalStreamConfiguration halConfiguration);
Emilian Peevb75aa352018-01-17 11:00:54 +000074
75 /**
76 * processCaptureRequest_3_4:
77 *
78 * Identical to @3.2::ICameraDeviceSession.processCaptureRequest, except that:
79 *
80 * - The capture request can include individual settings for physical camera devices
81 * backing a logical multi-camera.
82 *
83 * @return status Status code for the operation, one of:
84 * OK:
85 * On a successful start to processing the capture request
86 * ILLEGAL_ARGUMENT:
87 * If the input is malformed (the settings are empty when not
88 * allowed, the physical camera settings are invalid, there are 0
89 * output buffers, etc) and capture processing
90 * cannot start. Failures during request processing must be
91 * handled by calling ICameraDeviceCallback::notify(). In case of
92 * this error, the framework retains responsibility for the
93 * stream buffers' fences and the buffer handles; the HAL must not
94 * close the fences or return these buffers with
95 * ICameraDeviceCallback::processCaptureResult().
96 * INTERNAL_ERROR:
97 * If the camera device has encountered a serious error. After this
98 * error is returned, only the close() method can be successfully
99 * called by the framework.
100 * @return numRequestProcessed Number of requests successfully processed by
101 * camera HAL. When status is OK, this must be equal to the size of
102 * requests. When the call fails, this number is the number of requests
103 * that HAL processed successfully before HAL runs into an error.
104 *
105 */
106 processCaptureRequest_3_4(vec<CaptureRequest> requests, vec<BufferCache> cachesToRemove)
107 generates (Status status, uint32_t numRequestProcessed);
Emilian Peeve18057b2017-11-13 16:03:44 +0000108};