• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17package android.hardware.automotive.evs@1.0;
18
19import types;
20
21
22/**
23 * Represents a single camera and is the primary interface for capturing images.
24 */
25interface IEvsDisplay {
26
27    /**
28     * Returns basic information about the EVS display provided by the system.
29     *
30     * See the description of the DisplayDesc structure for details.
31     */
32     getDisplayInfo() generates (DisplayDesc info);
33
34
35    /**
36     * Clients may set the display state to express their desired state.
37     *
38     * The HAL implementation must gracefully accept a request for any state while in
39     * any other state, although the response may be to defer or ignore the request. The display
40     * is defined to start in the NOT_VISIBLE state upon initialization. The client is
41     * then expected to request the VISIBLE_ON_NEXT_FRAME state, and then begin providing
42     * video. When the display is no longer required, the client is expected to request
43     * the NOT_VISIBLE state after passing the last video frame.
44     * Returns INVALID_ARG if the requested state is not a recognized value.
45     */
46     setDisplayState(DisplayState state) generates (EvsResult result);
47
48
49    /**
50     * This call requests the current state of the display
51     *
52     * The HAL implementation should report the actual current state, which might
53     * transiently differ from the most recently requested state. Note, however, that
54     * the logic responsible for changing display states should generally live above
55     * the device layer, making it undesirable for the HAL implementation to spontaneously
56     * change display states.
57     */
58     getDisplayState() generates (DisplayState state);
59
60
61    /**
62     * This call returns a handle to a frame buffer associated with the display.
63     *
64     * The returned buffer may be locked and written to by software and/or GL. This buffer
65     * must be returned via a call to returnTargetBufferForDisplay() even if the
66     * display is no longer visible.
67     */
68     getTargetBuffer() generates (BufferDesc buffer);
69
70
71    /**
72     * This call tells the display that the buffer is ready for display.
73     *
74     * The buffer is no longer valid for use by the client after this call.
75     * There is no maximum time the caller may hold onto the buffer before making this
76     * call. The buffer may be returned at any time and in any DisplayState, but all
77     * buffers are expected to be returned before the IEvsDisplay interface is destroyed.
78     */
79    returnTargetBufferForDisplay(BufferDesc buffer) generates (EvsResult result);
80};
81