Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 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 | |
| 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 | * |
| 29 | * IOmx is the main entry point for communicating with OMX components. |
| 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 | * |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 44 | * @param[out] status The status of the call. |
| 45 | * @param[out] 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 | |
| 53 | /** |
| 54 | * Allocate an IOmxNode instance with the specified component name. |
| 55 | * |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 56 | * @param[in] name The name of the component to create. |
| 57 | * @param[in] observer An observer object that will receive messages from |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 58 | * the created instance. |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 59 | * @param[out] status The status of the call. |
| 60 | * @param[out] omxNode The allocated instance of IOmxNode. |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 61 | */ |
| 62 | allocateNode( |
| 63 | string name, |
| 64 | IOmxObserver observer |
| 65 | ) generates ( |
| 66 | Status status, |
| 67 | IOmxNode omxNode |
| 68 | ); |
| 69 | |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 70 | /** |
| 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 Vongmasa | 4a3cd13 | 2017-03-06 15:09:19 -0800 | [diff] [blame^] | 79 | IGraphicBufferProducer producer, |
Pawin Vongmasa | 120c4da | 2016-12-19 14:49:56 +0700 | [diff] [blame] | 80 | IGraphicBufferSource source |
| 81 | ); |
Pawin Vongmasa | 6ec37b9 | 2016-10-06 19:01:51 -0700 | [diff] [blame] | 82 | }; |
| 83 | |