summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSungtak Lee2018-01-25 17:07:40 -0600
committerSungtak Lee2018-01-29 17:49:41 -0600
commit108a2fe68cf68b76207b540457ab4e8bd97f5a76 (patch)
tree2b4b156bcba06974fd422ce9308d5b2b694a2385 /media/bufferpool/1.0/IConnection.hal
parent6327b866963d7bea96edf02332f9b24267b53e5f (diff)
downloadplatform-hardware-interfaces-108a2fe68cf68b76207b540457ab4e8bd97f5a76.tar.gz
platform-hardware-interfaces-108a2fe68cf68b76207b540457ab4e8bd97f5a76.tar.xz
platform-hardware-interfaces-108a2fe68cf68b76207b540457ab4e8bd97f5a76.zip
android.hardware.media.bufferpool@1.0 HAL
BufferPool HAL for allocating, deallocating, and recycling buffers on behalf of media.stagefright. Bug: 72651719 Change-Id: I30bf630e41de2c8718aaaf8cbf5ee3f48f2859bc
Diffstat (limited to 'media/bufferpool/1.0/IConnection.hal')
-rw-r--r--media/bufferpool/1.0/IConnection.hal43
1 files changed, 43 insertions, 0 deletions
diff --git a/media/bufferpool/1.0/IConnection.hal b/media/bufferpool/1.0/IConnection.hal
new file mode 100644
index 00000000..e284db28
--- /dev/null
+++ b/media/bufferpool/1.0/IConnection.hal
@@ -0,0 +1,43 @@
1/*
2 * Copyright (C) 2018 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.media.bufferpool@1.0;
18
19/**
20 * A connection to a buffer pool which handles requests from a buffer pool
21 * client. The connection must be made in order to receive buffers from
22 * other buffer pool clients.
23 */
24interface IConnection {
25
26 /**
27 * Retrieves a buffer using bufferId. The method must be called from
28 * receiving side of buffer during transferring only when the specified
29 * buffer is neither cached nor used. This fails if the specified
30 * transaction is not valid.
31 *
32 * @param transactionId Unique transaction id for buffer transferring.
33 * @param bufferId Id of the buffer to be fetched.
34 * @return status The status of the call.
35 * OK - A buffer was fetched successfully.
36 * NO_MEMORY - Memory allocation failure occurred.
37 * NOT_FOUND - A buffer was not found due to invalidation.
38 * CRITICAL_ERROR - Other errors.
39 * @return buffer The actual buffer which is specified with bufferId.
40 */
41 fetch(uint64_t transactionId, uint32_t bufferId) generates
42 (ResultStatus status, Buffer buffer);
43};