Pawin Vongmasa | c80bf21 | 2018-09-06 05:22:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 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.c2@1.0; |
| 18 | |
Pawin Vongmasa | 9214716 | 2018-10-31 03:23:13 -0700 | [diff] [blame] | 19 | import android.hardware.graphics.bufferqueue@2.0::IGraphicBufferProducer; |
Pawin Vongmasa | c80bf21 | 2018-09-06 05:22:36 -0700 | [diff] [blame] | 20 | |
| 21 | import IConfigurable; |
| 22 | |
| 23 | /** |
| 24 | * Input surface for a Codec2 component. |
| 25 | * |
| 26 | * An <em>input surface</em> is an instance of `IInputSurface`, which may be |
| 27 | * created by calling IComponentStore::createInputSurface(). Once created, the |
| 28 | * client may |
| 29 | * 1. write data to it via the `IGraphicBufferProducer` interface; and |
| 30 | * 2. use it as input to a Codec2 encoder. |
| 31 | * |
| 32 | * @sa IInputSurfaceConnection, IComponentStore::createInputSurface(), |
| 33 | * IComponent::connectToInputSurface(). |
| 34 | */ |
| 35 | interface IInputSurface { |
| 36 | /** |
| 37 | * Returns the producer interface into the internal buffer queue. |
| 38 | * |
| 39 | * @return producer `IGraphicBufferProducer` instance. This must not be |
| 40 | * null. |
| 41 | */ |
| 42 | getGraphicBufferProducer() generates (IGraphicBufferProducer producer); |
| 43 | |
| 44 | /** |
| 45 | * Returns the @ref IConfigurable instance associated to this input surface. |
| 46 | * |
| 47 | * @return configurable `IConfigurable` instance. This must not be null. |
| 48 | */ |
| 49 | getConfigurable() generates (IConfigurable configurable); |
| 50 | }; |
| 51 | |