blob: 2c79c279d3e3f63c15d0c40cf071494c3f167c7e [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 Chowdhary62481002020-01-09 15:39:27 -080059 * @return status Status code for the operation
60 * @return cameraIds a list of camera id combinations that support
61 * concurrent stream configurations with the minimum guarantees
62 * specified.
Shuzhen Wang05066102020-01-10 12:43:08 -080063 */
Jayant Chowdhary62481002020-01-09 15:39:27 -080064 getConcurrentStreamingCameraIds() generates (Status status, vec<vec<string>> cameraIds);
65
66 /**
67 * isConcurrentStreamCombinationSupported:
68 *
69 * Check for device support of specific camera stream combinations while
70 * streaming concurrently with other devices.
71 *
72 * The per device streamList must contain at least one output-capable stream, and may
73 * not contain more than one input-capable stream.
74 * In contrast to regular stream configuration the framework does not create
75 * or initialize any actual streams. This means that Hal must not use or
76 * consider the stream "id" value.
77 *
78 * ------------------------------------------------------------------------
79 *
80 * Preconditions:
81 *
82 * The framework can call this method at any time before, during and
83 * after active session configuration per device. This means that calls must not
84 * impact the performance of pending camera requests in any way. In
85 * particular there must not be any glitches or delays during normal
86 * camera streaming.
87 *
88 * The framework must not call this method with any combination of camera
89 * ids that is not a subset of the camera ids advertised by getConcurrentStreamingCameraIds of
90 * the same provider.
91 *
92 * Performance requirements:
93 * This call is expected to be significantly faster than stream
94 * configuration. In general HW and SW camera settings must not be
95 * changed and there must not be a user-visible impact on camera performance.
96 *
97 * @param configs a vector of camera ids and their corresponding stream
98 * configurations that need to be queried for support.
99 *
100 * @return status Status code for the operation, one of:
101 * OK:
102 * On successful stream combination query.
103 * METHOD_NOT_SUPPORTED:
104 * The camera provider does not support stream combination query.
105 * INTERNAL_ERROR:
106 * The stream combination query cannot complete due to internal
107 * error.
108 * @return true in case the stream combination is supported, false otherwise.
109 *
110 *
111 */
112 isConcurrentStreamCombinationSupported(vec<CameraIdAndStreamCombination> configs)
113 generates (Status status, bool queryStatus);
Shuzhen Wang05066102020-01-10 12:43:08 -0800114};