platform_hardware_interfaces/automotive/evs/1.0/IEvsDisplay.hal
Scott Randolph de9880eece Simplify EVS HAL and move to "agressive opens"
This adapts the API implementation to allow a duplicate "open" operation
to automatically close any previous connections to the device.  This
works around a binder level issue that can cause destructors triggered
by remote clients to be delivered out of order to the server.

This was originally change ag/1969959 on master, but has been
recreated on oc-dev (cherry-picking was broken at the time).
The original master change will be abandoned in favor of this getting
merged down from oc-dev.

Test:  Run Vts test (added in following change)
Change-Id: I7b417998e59a4d592fbb91811c4101f39097c5dd
2017-03-30 14:04:12 -07:00

80 lines
3.1 KiB
Text

/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.automotive.evs@1.0;
import types;
/**
* Represents a single camera and is the primary interface for capturing images.
*/
interface IEvsDisplay {
/**
* Returns basic information about the EVS display provided by the system.
*
* See the description of the DisplayDesc structure for details.
*/
getDisplayInfo() generates (DisplayDesc info);
/**
* Clients may set the display state to express their desired state.
*
* The HAL implementation must gracefully accept a request for any state while in
* any other state, although the response may be to defer or ignore the request. The display
* is defined to start in the NOT_VISIBLE state upon initialization. The client is
* then expected to request the VISIBLE_ON_NEXT_FRAME state, and then begin providing
* video. When the display is no longer required, the client is expected to request
* the NOT_VISIBLE state after passing the last video frame.
* Returns INVALID_ARG if the requested state is not a recognized value.
*/
setDisplayState(DisplayState state) generates (EvsResult result);
/**
* This call requests the current state of the display
*
* The HAL implementation should report the actual current state, which might
* transiently differ from the most recently requested state. Note, however, that
* the logic responsible for changing display states should generally live above
* the device layer, making it undesirable for the HAL implementation to spontaneously
* change display states.
*/
getDisplayState() generates (DisplayState state);
/**
* This call returns a handle to a frame buffer associated with the display.
*
* The returned buffer may be locked and written to by software and/or GL. This buffer
* must be returned via a call to returnTargetBufferForDisplay() even if the
* display is no longer visible.
*/
getTargetBuffer() generates (BufferDesc buffer);
/**
* This call tells the display that the buffer is ready for display.
*
* The buffer is no longer valid for use by the client after this call.
* There is no maximum time the caller may hold onto the buffer before making this
* call. The buffer may be returned at any time and in any DisplayState, but all
* buffers are expected to be returned before the IEvsDisplay interface is destroyed.
*/
returnTargetBufferForDisplay(BufferDesc buffer) generates (EvsResult result);
};