blob: 78d4b323afb0dd16515b657ce8023cddd047e63c [file] [log] [blame]
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -07001/*
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.omx@1.0;
18
Pawin Vongmasa4a3cd132017-03-06 15:09:19 -080019import android.hardware.graphics.bufferqueue@1.0::IGraphicBufferProducer;
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070020import android.hardware.media@1.0::types;
21
22import IOmxNode;
23import IOmxObserver;
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070024import IGraphicBufferSource;
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070025
26/**
27 * Ref: frameworks/av/include/media/IOMX.h: IOMX
28 *
29 * IOmx is the main entry point for communicating with OMX components.
30 */
31interface IOmx {
32
33 /**
34 * Information for an IOmxNode component.
35 */
36 struct ComponentInfo {
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070037 string mName;
38 vec<string> mRoles;
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070039 };
40
41 /**
42 * List available components.
43 *
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070044 * @param[out] status The status of the call.
45 * @param[out] nodeList The list of ComponentInfo.
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070046 */
47 listNodes(
48 ) generates (
49 Status status,
50 vec<ComponentInfo> nodeList
51 );
52
53 /**
54 * Allocate an IOmxNode instance with the specified component name.
55 *
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070056 * @param[in] name The name of the component to create.
57 * @param[in] observer An observer object that will receive messages from
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070058 * the created instance.
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070059 * @param[out] status The status of the call.
60 * @param[out] omxNode The allocated instance of IOmxNode.
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070061 */
62 allocateNode(
63 string name,
64 IOmxObserver observer
65 ) generates (
66 Status status,
67 IOmxNode omxNode
68 );
69
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070070 /**
71 * Create an input surface for recording.
72 *
73 * @param[out] producer The associated producer end of the buffer queue.
74 * @param[out] source The associated `IGraphicBufferSource`.
75 */
76 createInputSurface(
77 ) generates (
78 Status status,
Pawin Vongmasa4a3cd132017-03-06 15:09:19 -080079 IGraphicBufferProducer producer,
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070080 IGraphicBufferSource source
81 );
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070082};
83