Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 1 | /* |
| 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 Randolph | 8342279 | 2017-03-01 20:32:59 -0800 | [diff] [blame] | 17 | package android.hardware.automotive.evs@1.0; |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 18 | |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 19 | import IEvsCamera; |
| 20 | import IEvsDisplay; |
| 21 | |
| 22 | |
| 23 | /** |
| 24 | * Provides the mechanism for EVS camera discovery |
| 25 | */ |
| 26 | interface IEvsEnumerator { |
| 27 | |
| 28 | /** |
| 29 | * Returns a list of all EVS cameras available to the system |
Changyeon Jo | 1d0f024 | 2019-07-18 10:00:12 -0700 | [diff] [blame] | 30 | * |
| 31 | * @return cameras A list of cameras availale for EVS service. |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 32 | */ |
| 33 | getCameraList() generates (vec<CameraDesc> cameras); |
| 34 | |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 35 | /** |
| 36 | * Get the IEvsCamera associated with a cameraId from a CameraDesc |
| 37 | * |
Scott Randolph | 3209fb3 | 2017-05-22 16:35:39 -0700 | [diff] [blame] | 38 | * 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 Jo | 1d0f024 | 2019-07-18 10:00:12 -0700 | [diff] [blame] | 41 | * |
| 42 | * @param cameraId A unique identifier of the camera. |
| 43 | * @return carCamera EvsCamera object associated with a given cameraId. |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 44 | */ |
| 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 Jo | 1d0f024 | 2019-07-18 10:00:12 -0700 | [diff] [blame] | 52 | * |
| 53 | * @param carCamera EvsCamera object to be closed. |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 54 | */ |
| 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 Jo | d0dc2bd | 2019-02-09 19:49:23 +0000 | [diff] [blame] | 63 | * the old instance shall be closed and give the new caller exclusive |
| 64 | * access. |
Scott Randolph | de9880e | 2017-03-30 14:04:12 -0700 | [diff] [blame] | 65 | * When done using the display, the caller may release it by calling closeDisplay(). |
Changyeon Jo | 1d0f024 | 2019-07-18 10:00:12 -0700 | [diff] [blame] | 66 | * |
| 67 | * @return display EvsDisplay object to be used. |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 68 | */ |
| 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 Randolph | de9880e | 2017-03-30 14:04:12 -0700 | [diff] [blame] | 75 | * NOTE: All buffers must have been returned to the display before making this call. |
Changyeon Jo | 1d0f024 | 2019-07-18 10:00:12 -0700 | [diff] [blame] | 76 | * |
| 77 | * @param display EvsDisplay object to be closed. |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 78 | */ |
| 79 | closeDisplay(IEvsDisplay display); |
Scott Randolph | db5a598 | 2017-01-23 12:35:05 -0800 | [diff] [blame] | 80 | |
| 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 Jo | 1d0f024 | 2019-07-18 10:00:12 -0700 | [diff] [blame] | 88 | * |
| 89 | * @return state Current DisplayState of this Display. |
Scott Randolph | db5a598 | 2017-01-23 12:35:05 -0800 | [diff] [blame] | 90 | */ |
| 91 | getDisplayState() generates (DisplayState state); |
Scott Randolph | 5c99d85 | 2016-11-15 17:01:23 -0800 | [diff] [blame] | 92 | }; |
| 93 | |