blob: 0948db6ea36c2e2b921cb6a9363769936e926020 [file] [log] [blame]
Shuzhen Wang05066102020-01-10 12:43:08 -08001/*
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
17package android.hardware.camera.provider@2.6;
18
19import @2.5::ICameraProvider;
Jayant Chowdhary62481002020-01-09 15:39:27 -080020import android.hardware.camera.common@1.0::Status;
21import android.hardware.camera.device@3.4::StreamConfiguration;
Shuzhen Wang05066102020-01-10 12:43:08 -080022
23/**
24 * Camera provider HAL
Jayant Chowdhary62481002020-01-09 15:39:27 -080025 *
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 Wang05066102020-01-10 12:43:08 -080030 */
31interface ICameraProvider extends @2.5::ICameraProvider {
32 /**
Jayant Chowdhary62481002020-01-09 15:39:27 -080033 * 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 Wang05066102020-01-10 12:43:08 -080059 */
Jayant Chowdhary62481002020-01-09 15:39:27 -080060 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 Wang05066102020-01-10 12:43:08 -0800110};