blob: e1193d030c5804541efd958bbf6f2bb21f06f60c [file] [log] [blame]
Scott Randolph5c99d852016-11-15 17:01:23 -08001/*
2 * Copyright (C) 2016 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
Scott Randolph83422792017-03-01 20:32:59 -080017package android.hardware.automotive.evs@1.0;
Scott Randolph5c99d852016-11-15 17:01:23 -080018
19import types;
20import IEvsCamera;
21import IEvsDisplay;
22
23
24/**
25 * Provides the mechanism for EVS camera discovery
26 */
27interface IEvsEnumerator {
28
29 /**
30 * Returns a list of all EVS cameras available to the system
31 */
32 getCameraList() generates (vec<CameraDesc> cameras);
33
Scott Randolph5c99d852016-11-15 17:01:23 -080034 /**
35 * Get the IEvsCamera associated with a cameraId from a CameraDesc
36 *
Scott Randolph3209fb32017-05-22 16:35:39 -070037 * Given a camera's unique cameraId from CameraDesc, returns the
38 * IEvsCamera interface associated with the specified camera. When
39 * done using the camera, the caller may release it by calling closeCamera().
40 * Note: Reliance on the sp<> going out of scope is not recommended
41 * because the resources may not be released right away due to asynchronos
42 * behavior in the hardware binder (ref b/36122635).
Scott Randolph5c99d852016-11-15 17:01:23 -080043 */
44 openCamera(string cameraId) generates (IEvsCamera carCamera);
45
46 /**
47 * Return the specified IEvsCamera interface as no longer in use
48 *
49 * When the IEvsCamera object is no longer required, it must be released.
50 * NOTE: Video streaming must be cleanly stopped before making this call.
51 */
52 closeCamera(IEvsCamera carCamera);
53
54
55 /**
56 * Get exclusive access to IEvsDisplay for the system
57 *
58 * There can be at most one EVS display object for the system and this function
59 * requests access to it. If the EVS display is not available or is already in use,
60 * a null pointer is returned.
Scott Randolphde9880e2017-03-30 14:04:12 -070061 * When done using the display, the caller may release it by calling closeDisplay().
62 * TODO(b/36122635) Reliance on the sp<> going out of scope is not recommended because the
63 * resources may not be released right away due to asynchronos behavior in the hardware binder.
Scott Randolph5c99d852016-11-15 17:01:23 -080064 */
65 openDisplay() generates (IEvsDisplay display);
66
67 /**
68 * Return the specified IEvsDisplay interface as no longer in use
69 *
70 * When the IEvsDisplay object is no longer required, it must be released.
Scott Randolphde9880e2017-03-30 14:04:12 -070071 * NOTE: All buffers must have been returned to the display before making this call.
Scott Randolph5c99d852016-11-15 17:01:23 -080072 */
73 closeDisplay(IEvsDisplay display);
Scott Randolphdb5a5982017-01-23 12:35:05 -080074
75 /**
76 * This call requests the current state of the display
77 *
78 * If there is no open display, this returns DisplayState::NOT_OPEN. otherwise, it returns
79 * the actual state of the active display. This call is replicated on the IEvsEnumerator
80 * interface in order to allow secondary clients to monitor the state of the EVS display
81 * without acquiring exclusive ownership of the display.
82 */
83 getDisplayState() generates (DisplayState state);
Scott Randolph5c99d852016-11-15 17:01:23 -080084};
85