blob: e5633df97376bf9a1e97a34ecd237024054bd715 [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
Scott Randolph5c99d852016-11-15 17:01:23 -080019import IEvsCamera;
20import IEvsDisplay;
21
22
23/**
24 * Provides the mechanism for EVS camera discovery
25 */
26interface IEvsEnumerator {
27
28 /**
29 * Returns a list of all EVS cameras available to the system
Changyeon Jo1d0f0242019-07-18 10:00:12 -070030 *
31 * @return cameras A list of cameras availale for EVS service.
Scott Randolph5c99d852016-11-15 17:01:23 -080032 */
33 getCameraList() generates (vec<CameraDesc> cameras);
34
Scott Randolph5c99d852016-11-15 17:01:23 -080035 /**
36 * Get the IEvsCamera associated with a cameraId from a CameraDesc
37 *
Scott Randolph3209fb32017-05-22 16:35:39 -070038 * Given a camera's unique cameraId from CameraDesc, returns the
39 * IEvsCamera interface associated with the specified camera. When
40 * done using the camera, the caller may release it by calling closeCamera().
Changyeon Jo1d0f0242019-07-18 10:00:12 -070041 *
42 * @param cameraId A unique identifier of the camera.
43 * @return carCamera EvsCamera object associated with a given cameraId.
Scott Randolph5c99d852016-11-15 17:01:23 -080044 */
45 openCamera(string cameraId) generates (IEvsCamera carCamera);
46
47 /**
48 * Return the specified IEvsCamera interface as no longer in use
49 *
50 * When the IEvsCamera object is no longer required, it must be released.
51 * NOTE: Video streaming must be cleanly stopped before making this call.
Changyeon Jo1d0f0242019-07-18 10:00:12 -070052 *
53 * @param carCamera EvsCamera object to be closed.
Scott Randolph5c99d852016-11-15 17:01:23 -080054 */
55 closeCamera(IEvsCamera carCamera);
56
57
58 /**
59 * Get exclusive access to IEvsDisplay for the system
60 *
61 * There can be at most one EVS display object for the system and this function
62 * requests access to it. If the EVS display is not available or is already in use,
Changyeon Jod0dc2bd2019-02-09 19:49:23 +000063 * the old instance shall be closed and give the new caller exclusive
64 * access.
Scott Randolphde9880e2017-03-30 14:04:12 -070065 * When done using the display, the caller may release it by calling closeDisplay().
Changyeon Jo1d0f0242019-07-18 10:00:12 -070066 *
67 * @return display EvsDisplay object to be used.
Scott Randolph5c99d852016-11-15 17:01:23 -080068 */
69 openDisplay() generates (IEvsDisplay display);
70
71 /**
72 * Return the specified IEvsDisplay interface as no longer in use
73 *
74 * When the IEvsDisplay object is no longer required, it must be released.
Scott Randolphde9880e2017-03-30 14:04:12 -070075 * NOTE: All buffers must have been returned to the display before making this call.
Changyeon Jo1d0f0242019-07-18 10:00:12 -070076 *
77 * @param display EvsDisplay object to be closed.
Scott Randolph5c99d852016-11-15 17:01:23 -080078 */
79 closeDisplay(IEvsDisplay display);
Scott Randolphdb5a5982017-01-23 12:35:05 -080080
81 /**
82 * This call requests the current state of the display
83 *
84 * If there is no open display, this returns DisplayState::NOT_OPEN. otherwise, it returns
85 * the actual state of the active display. This call is replicated on the IEvsEnumerator
86 * interface in order to allow secondary clients to monitor the state of the EVS display
87 * without acquiring exclusive ownership of the display.
Changyeon Jo1d0f0242019-07-18 10:00:12 -070088 *
89 * @return state Current DisplayState of this Display.
Scott Randolphdb5a5982017-01-23 12:35:05 -080090 */
91 getDisplayState() generates (DisplayState state);
Scott Randolph5c99d852016-11-15 17:01:23 -080092};
93