blob: f5fc44987a9597bf5e4d4ddc0af99fd8c1f0a634 [file] [log] [blame]
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -07001/*
Lajos Molnarc8949ec2017-03-22 20:13:20 -07002 * Copyright (C) 2017 The Android Open Source Project
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -07003 *
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 *
Lajos Molnarc8949ec2017-03-22 20:13:20 -070029 * IOmx has the ability to create OMX nodes.
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070030 */
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 *
Lajos Molnarc8949ec2017-03-22 20:13:20 -070044 * @return status The status of the call.
45 * @return 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
Lajos Molnarc8949ec2017-03-22 20:13:20 -070053
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070054 /**
Lajos Molnarc8949ec2017-03-22 20:13:20 -070055 * Allocate an IOmxNode instance with the specified node name.
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070056 *
Lajos Molnarc8949ec2017-03-22 20:13:20 -070057 * @param name The name of the node to create.
58 * @param observer An observer object that will receive messages from
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070059 * the created instance.
Lajos Molnarc8949ec2017-03-22 20:13:20 -070060 * @return status The status of the call.
61 * @return omxNode The allocated instance of `IOmxNode`.
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070062 */
63 allocateNode(
64 string name,
65 IOmxObserver observer
66 ) generates (
67 Status status,
68 IOmxNode omxNode
69 );
70
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070071 /**
72 * Create an input surface for recording.
73 *
Lajos Molnarc8949ec2017-03-22 20:13:20 -070074 * @return status The status of the call.
75 * @return producer The associated producer end of the buffer queue.
76 * @return source The associated `IGraphicBufferSource`.
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070077 */
78 createInputSurface(
79 ) generates (
80 Status status,
Pawin Vongmasa4a3cd132017-03-06 15:09:19 -080081 IGraphicBufferProducer producer,
Pawin Vongmasa120c4da2016-12-19 14:49:56 +070082 IGraphicBufferSource source
83 );
Pawin Vongmasa6ec37b92016-10-06 19:01:51 -070084};
85