blob: a77380f75c6ed1c4145d42033ad5914a24635f23 [file] [log] [blame]
Shuzhen Wangd3feb3d2018-08-17 13:52:40 -07001/*
2 * Copyright (C) 2018 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.device@3.5;
18
19import android.hardware.camera.common@1.0::Status;
20import @3.2::CameraMetadata;
21import @3.2::ICameraDevice;
22
23/**
24 * Camera device interface
25 *
26 * Supports the android.hardware.Camera API, and the android.hardware.camera2
27 * API at LIMITED or better hardware level.
28 *
29 */
30interface ICameraDevice extends @3.2::ICameraDevice {
31
32 /**
33 * getPhysicalCameraCharacteristics:
34 *
35 * Return the static camera information for a physical camera ID backing
36 * this logical camera device. This information may not change between consecutive calls.
37 *
38 * Note that HAL must support this function for physical camera IDs that are
Shuzhen Wang6bdeaf52018-09-05 09:40:00 -070039 * not exposed via ICameraProvider::getCameraIdList(). Calling
40 * getCameraDeviceInterface_V3_x() on these camera IDs must return ILLEGAL_ARGUMENT.
41 *
42 * The characteristics of all cameras returned by
43 * ICameraProvider::getCameraIdList() must be queried via
44 * getCameraCharacteristics(). Calling getPhysicalCameraCharacteristics() on
45 * those cameras must return ILLEGAL_ARGUMENT.
46 *
47 * @param physicalCameraId The physical camera id parsed from the logical
48 * camera's ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS static metadata
49 * key. The framework assumes that this ID is just the <id> part of fully
50 * qualified camera device name "device@<major>.<minor>/<type>/<id>". And
51 * the physical camera must be of the same version and type as the parent
52 * logical camera device.
Shuzhen Wangd3feb3d2018-08-17 13:52:40 -070053 *
54 * @return status Status code for the operation, one of:
55 * OK:
Shuzhen Wang6bdeaf52018-09-05 09:40:00 -070056 * On a successful query of the physical camera device characteristics
Shuzhen Wangd3feb3d2018-08-17 13:52:40 -070057 * INTERNAL_ERROR:
58 * The camera device cannot be opened due to an internal
59 * error.
60 * CAMERA_DISCONNECTED:
61 * An external camera device has been disconnected, and is no longer
62 * available. This camera device interface is now stale, and a new
63 * instance must be acquired if the device is reconnected. All
64 * subsequent calls on this interface must return
65 * CAMERA_DISCONNECTED.
Shuzhen Wang6bdeaf52018-09-05 09:40:00 -070066 * ILLEGAL_ARGUMENT:
67 * If the physicalCameraId is not a valid physical camera Id outside
68 * of ICameraProvider::getCameraIdList().
Shuzhen Wangd3feb3d2018-08-17 13:52:40 -070069 *
70 * @return cameraCharacteristics
71 * The static metadata for this logical camera device's physical device, or an empty
72 * metadata structure if status is not OK.
73 *
74 */
75 getPhysicalCameraCharacteristics(string physicalCameraId)
76 generates (Status status, CameraMetadata cameraCharacteristics);
77
78};