Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 1 | /* |
Lajos Molnar | c8949ec | 2017-03-22 20:13:20 -0700 | [diff] [blame] | 2 | * Copyright (C) 2017 The Android Open Source Project |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 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 | |
| 17 | package android.hardware.media.omx@1.0; |
| 18 | |
Pawin Vongmasa | 4a3cd13 | 2017-03-06 15:09:19 -0800 | [diff] [blame] | 19 | import android.hardware.graphics.bufferqueue@1.0::IGraphicBufferProducer; |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 20 | import android.hardware.media@1.0::types; |
| 21 | |
| 22 | import IOmxNode; |
| 23 | import IOmxObserver; |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 24 | import IGraphicBufferSource; |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 25 | |
| 26 | /** |
| 27 | * Ref: frameworks/av/include/media/IOMX.h: IOMX |
| 28 | * |
Lajos Molnar | c8949ec | 2017-03-22 20:13:20 -0700 | [diff] [blame] | 29 | * IOmx has the ability to create OMX nodes. |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 30 | */ |
| 31 | interface IOmx { |
| 32 | |
| 33 | /** |
| 34 | * Information for an IOmxNode component. |
| 35 | */ |
| 36 | struct ComponentInfo { |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 37 | string mName; |
| 38 | vec<string> mRoles; |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | /** |
| 42 | * List available components. |
| 43 | * |
Lajos Molnar | c8949ec | 2017-03-22 20:13:20 -0700 | [diff] [blame] | 44 | * @return status The status of the call. |
| 45 | * @return nodeList The list of ComponentInfo. |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 46 | */ |
| 47 | listNodes( |
| 48 | ) generates ( |
| 49 | Status status, |
| 50 | vec<ComponentInfo> nodeList |
| 51 | ); |
| 52 | |
Lajos Molnar | c8949ec | 2017-03-22 20:13:20 -0700 | [diff] [blame] | 53 | |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 54 | /** |
Lajos Molnar | c8949ec | 2017-03-22 20:13:20 -0700 | [diff] [blame] | 55 | * Allocate an IOmxNode instance with the specified node name. |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 56 | * |
Lajos Molnar | c8949ec | 2017-03-22 20:13:20 -0700 | [diff] [blame] | 57 | * @param name The name of the node to create. |
| 58 | * @param observer An observer object that will receive messages from |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 59 | * the created instance. |
Lajos Molnar | c8949ec | 2017-03-22 20:13:20 -0700 | [diff] [blame] | 60 | * @return status The status of the call. |
| 61 | * @return omxNode The allocated instance of `IOmxNode`. |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 62 | */ |
| 63 | allocateNode( |
| 64 | string name, |
| 65 | IOmxObserver observer |
| 66 | ) generates ( |
| 67 | Status status, |
| 68 | IOmxNode omxNode |
| 69 | ); |
| 70 | |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 71 | /** |
| 72 | * Create an input surface for recording. |
| 73 | * |
Lajos Molnar | c8949ec | 2017-03-22 20:13:20 -0700 | [diff] [blame] | 74 | * @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 Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 77 | */ |
| 78 | createInputSurface( |
| 79 | ) generates ( |
| 80 | Status status, |
Pawin Vongmasa | 4a3cd13 | 2017-03-06 15:09:19 -0800 | [diff] [blame] | 81 | IGraphicBufferProducer producer, |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 82 | IGraphicBufferSource source |
| 83 | ); |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 84 | }; |
| 85 | |