platform_hardware_interfaces/media/bufferpool/2.0/IConnection.hal
Sungtak Lee f8f9489302 android.hardware.media.bufferpool@2.0 HAL
BufferPool HAL 2.0. This is identical to 1.0 HAL now.
The update will be applied afterwards.

Bug: 112203066
Change-Id: I8f5bbf979116f66357f2bc0f8114697472adf762
2018-08-21 13:14:05 -07:00

43 lines
1.7 KiB
Text

/*
* Copyright (C) 2018 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.media.bufferpool@2.0;
/**
* A connection to a buffer pool which handles requests from a buffer pool
* client. The connection must be made in order to receive buffers from
* other buffer pool clients.
*/
interface IConnection {
/**
* Retrieves a buffer using bufferId. The method must be called from
* receiving side of buffer during transferring only when the specified
* buffer is neither cached nor used. This fails if the specified
* transaction is not valid.
*
* @param transactionId Unique transaction id for buffer transferring.
* @param bufferId Id of the buffer to be fetched.
* @return status The status of the call.
* OK - A buffer was fetched successfully.
* NO_MEMORY - Memory allocation failure occurred.
* NOT_FOUND - A buffer was not found due to invalidation.
* CRITICAL_ERROR - Other errors.
* @return buffer The actual buffer which is specified with bufferId.
*/
fetch(uint64_t transactionId, uint32_t bufferId) generates
(ResultStatus status, Buffer buffer);
};