blob: 9c46ba06f579beb99398e08680446299be217b29 [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
Jayant Chowdhary653ea6c2020-02-10 16:11:54 -080041 * -----------------------------------------------------
42 * | Type | Size | Type | Size |
43 * -----------------------------------------------------
44 * | YUV | s1440p | |
45 * -----------------------------------------------------
46 * | JPEG | s1440p | |
47 * -----------------------------------------------------
48 * | PRIV | s1440p | |
49 * -----------------------------------------------------
50 * | YUV / PRIV | s720p | YUV / PRIV | s1440p |
51 * -----------------------------------------------------
52 * | YUV / PRIV | s720p | JPEG | s1440p |
53 * -----------------------------------------------------
54 *
55 * where:
56 * s720p - min (max output resolution for the given format, 1280 X 720)
57 * s1440p - min (max output resolution for the given format, 1920 X 1440)
58 *
Jayant Chowdhary3a0030f2020-02-18 11:18:12 -080059 * The camera framework must call this method whenever it gets a
60 * cameraDeviceStatusChange callback adding a new camera device or removing
61 * a camera device known to it. This is so that the camera framework can get new combinations
62 * of camera ids that can stream concurrently, that might have potentially appeared.
63 *
Jayant Chowdhary62481002020-01-09 15:39:27 -080064 * @return status Status code for the operation
65 * @return cameraIds a list of camera id combinations that support
66 * concurrent stream configurations with the minimum guarantees
67 * specified.
Shuzhen Wang05066102020-01-10 12:43:08 -080068 */
Jayant Chowdhary62481002020-01-09 15:39:27 -080069 getConcurrentStreamingCameraIds() generates (Status status, vec<vec<string>> cameraIds);
70
71 /**
72 * isConcurrentStreamCombinationSupported:
73 *
74 * Check for device support of specific camera stream combinations while
75 * streaming concurrently with other devices.
76 *
77 * The per device streamList must contain at least one output-capable stream, and may
78 * not contain more than one input-capable stream.
79 * In contrast to regular stream configuration the framework does not create
80 * or initialize any actual streams. This means that Hal must not use or
81 * consider the stream "id" value.
82 *
83 * ------------------------------------------------------------------------
84 *
85 * Preconditions:
86 *
87 * The framework can call this method at any time before, during and
88 * after active session configuration per device. This means that calls must not
89 * impact the performance of pending camera requests in any way. In
90 * particular there must not be any glitches or delays during normal
91 * camera streaming.
92 *
93 * The framework must not call this method with any combination of camera
94 * ids that is not a subset of the camera ids advertised by getConcurrentStreamingCameraIds of
95 * the same provider.
96 *
97 * Performance requirements:
98 * This call is expected to be significantly faster than stream
99 * configuration. In general HW and SW camera settings must not be
100 * changed and there must not be a user-visible impact on camera performance.
101 *
102 * @param configs a vector of camera ids and their corresponding stream
103 * configurations that need to be queried for support.
104 *
105 * @return status Status code for the operation, one of:
106 * OK:
107 * On successful stream combination query.
108 * METHOD_NOT_SUPPORTED:
109 * The camera provider does not support stream combination query.
110 * INTERNAL_ERROR:
111 * The stream combination query cannot complete due to internal
112 * error.
113 * @return true in case the stream combination is supported, false otherwise.
114 *
115 *
116 */
117 isConcurrentStreamCombinationSupported(vec<CameraIdAndStreamCombination> configs)
118 generates (Status status, bool queryStatus);
Shuzhen Wang05066102020-01-10 12:43:08 -0800119};