summaryrefslogtreecommitdiffstats
path: root/media/1.0
diff options
context:
space:
mode:
Diffstat (limited to 'media/1.0')
-rw-r--r--media/1.0/Android.bp48
-rw-r--r--media/1.0/types.hal76
2 files changed, 124 insertions, 0 deletions
diff --git a/media/1.0/Android.bp b/media/1.0/Android.bp
new file mode 100644
index 00000000..d533e5a4
--- /dev/null
+++ b/media/1.0/Android.bp
@@ -0,0 +1,48 @@
1// This file is autogenerated by hidl-gen. Do not edit manually.
2
3genrule {
4 name: "android.hardware.media@1.0_genc++",
5 tools: ["hidl-gen"],
6 cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media@1.0",
7 srcs: [
8 "types.hal",
9 ],
10 out: [
11 "android/hardware/media/1.0/types.cpp",
12 ],
13}
14
15genrule {
16 name: "android.hardware.media@1.0_genc++_headers",
17 tools: ["hidl-gen"],
18 cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media@1.0",
19 srcs: [
20 "types.hal",
21 ],
22 out: [
23 "android/hardware/media/1.0/types.h",
24 ],
25}
26
27cc_library_shared {
28 name: "android.hardware.media@1.0",
29 generated_sources: ["android.hardware.media@1.0_genc++"],
30 generated_headers: ["android.hardware.media@1.0_genc++_headers"],
31 export_generated_headers: ["android.hardware.media@1.0_genc++_headers"],
32 shared_libs: [
33 "libhidlbase",
34 "libhidltransport",
35 "libhwbinder",
36 "liblog",
37 "libutils",
38 "libcutils",
39 "android.hardware.graphics.common@1.0",
40 ],
41 export_shared_lib_headers: [
42 "libhidlbase",
43 "libhidltransport",
44 "libhwbinder",
45 "libutils",
46 "android.hardware.graphics.common@1.0",
47 ],
48}
diff --git a/media/1.0/types.hal b/media/1.0/types.hal
new file mode 100644
index 00000000..89b7fa21
--- /dev/null
+++ b/media/1.0/types.hal
@@ -0,0 +1,76 @@
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 vec<uint8_t> Bytes;
27
28/**
29 * Ref: frameworks/native/include/ui/GraphicBuffer.h
30 * Ref: system/core/include/system/window.h: ANativeWindowBuffer
31 */
32
33/**
34 * This struct contains attributes for a gralloc buffer that can be put into a
35 * union.
36 */
37struct AnwBufferAttributes {
38 uint32_t width;
39 uint32_t height;
40 uint32_t stride;
41 PixelFormat format;
42 uint32_t usage; // TODO: convert to an enum
43 uint64_t layerCount;
44};
45
46/**
47 * An AnwBuffer is simply AnwBufferAttributes plus a native handle.
48 */
49struct AnwBuffer {
50 handle nativeHandle;
51 AnwBufferAttributes attr;
52};
53
54/**
55 * Ref: frameworks/native/include/binder/IMemory.h
56 * Ref: frameworks/native/libs/binder/IMemory.cpp
57 */
58
59/**
60 * This struct contains attributes for a shared memory buffer that can be put
61 * into a union.
62 */
63struct SharedMemoryAttributes {
64 uint32_t size;
65 uint32_t flags; // TODO: convert to an enum
66 uint32_t offset;
67};
68
69/**
70 * A SharedMemory is simply SharedMemoryAttributes plus a native handle.
71 */
72struct SharedMemory {
73 handle nativeHandle;
74 SharedMemoryAttributes attr;
75};
76