2016-11-16 02:01:23 +01:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2017-03-02 05:32:59 +01:00
|
|
|
package android.hardware.automotive.evs@1.0;
|
2016-11-16 02:01:23 +01:00
|
|
|
|
|
|
|
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.
|
|
|
|
*
|
2017-03-30 23:04:12 +02:00
|
|
|
* See the description of the DisplayDesc structure for details.
|
2016-11-16 02:01:23 +01:00
|
|
|
*/
|
|
|
|
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.
|
|
|
|
*/
|
2017-01-23 21:35:05 +01:00
|
|
|
getTargetBuffer() generates (BufferDesc buffer);
|
2016-11-16 02:01:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2017-01-23 21:35:05 +01:00
|
|
|
returnTargetBufferForDisplay(BufferDesc buffer) generates (EvsResult result);
|
2016-11-16 02:01:23 +01:00
|
|
|
};
|