summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawin Vongmasa2016-10-06 21:01:51 -0500
committerIliyan Malchev2016-11-17 09:32:03 -0600
commit6ec37b9e507df9de9cb9608a44c44b4a3efd34ac (patch)
treef3ade68268f5783937bb02edb5b7a94e3fa69dbf /media/1.0/types.hal
parent4a9f187d9fee9595e28ff3bca800a966c6dfdc16 (diff)
downloadplatform-hardware-interfaces-6ec37b9e507df9de9cb9608a44c44b4a3efd34ac.tar.gz
platform-hardware-interfaces-6ec37b9e507df9de9cb9608a44c44b4a3efd34ac.tar.xz
platform-hardware-interfaces-6ec37b9e507df9de9cb9608a44c44b4a3efd34ac.zip
Start media.omx HIDL project.
Test: None Bug: 31399200 Change-Id: I2fb1a6758ccc001c5631be1c642ad537d1ff5a10
Diffstat (limited to 'media/1.0/types.hal')
-rw-r--r--media/1.0/types.hal77
1 files changed, 77 insertions, 0 deletions
diff --git a/media/1.0/types.hal b/media/1.0/types.hal
new file mode 100644
index 00000000..25931f8c
--- /dev/null
+++ b/media/1.0/types.hal
@@ -0,0 +1,77 @@
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.media@1.0;
18
19import android.hardware.graphics.common@1.0::PixelFormat;
20
21/**
22 * Aliases
23 */
24typedef handle FileDescriptor; // This must have no more than one fd.
25typedef FileDescriptor Fence;
26typedef int32_t Status; // TODO: convert to an enum
27typedef vec<uint8_t> Bytes;
28
29/**
30 * Ref: frameworks/native/include/ui/GraphicBuffer.h
31 * Ref: system/core/include/system/window.h
32 */
33
34/**
35 * This struct contains attributes for a gralloc buffer that can be put into a
36 * union.
37 */
38struct GraphicBufferAttributes {
39 uint32_t width;
40 uint32_t height;
41 uint32_t stride;
42 PixelFormat format;
43 uint32_t usage; // TODO: convert to an enum
44 uint32_t generationNumber;
45};
46
47/**
48 * A GraphicBuffer is simply GraphicBufferAttributes plus a native handle.
49 */
50struct GraphicBuffer {
51 handle nativeHandle;
52 GraphicBufferAttributes attr;
53};
54
55/**
56 * Ref: frameworks/native/include/binder/IMemory.h
57 * Ref: frameworks/native/libs/binder/IMemory.cpp
58 */
59
60/**
61 * This struct contains attributes for a shared memory buffer that can be put
62 * into a union.
63 */
64struct SharedMemoryAttributes {
65 uint32_t size;
66 uint32_t flags; // TODO: convert to an enum
67 uint32_t offset;
68};
69
70/**
71 * A SharedMemory is simply SharedMemoryAttributes plus a native handle.
72 */
73struct SharedMemory {
74 handle nativeHandle;
75 SharedMemoryAttributes attr;
76};
77