Home | History | Annotate | Download | only in 1.0
      1 /*
      2  * Copyright (C) 2017 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 
     19 import android.hardware.graphics.bufferqueue@1.0::IGraphicBufferProducer;
     20 import android.hardware.media@1.0::types;
     21 
     22 import IOmxNode;
     23 import IOmxObserver;
     24 import IGraphicBufferSource;
     25 
     26 /**
     27  * Ref: frameworks/av/include/media/IOMX.h: IOMX
     28  *
     29  * IOmx has the ability to create OMX nodes.
     30  */
     31 interface IOmx {
     32 
     33     /**
     34      * Information for an IOmxNode component.
     35      */
     36     struct ComponentInfo {
     37         string mName;
     38         vec<string> mRoles;
     39     };
     40 
     41     /**
     42      * List available components.
     43      *
     44      * @return status The status of the call.
     45      * @return nodeList The list of ComponentInfo.
     46      */
     47     listNodes(
     48         ) generates (
     49             Status status,
     50             vec<ComponentInfo> nodeList
     51         );
     52 
     53 
     54     /**
     55      * Allocate an IOmxNode instance with the specified node name.
     56      *
     57      * @param name The name of the node to create.
     58      * @param observer An observer object that will receive messages from
     59      * the created instance.
     60      * @return status The status of the call.
     61      * @return omxNode The allocated instance of `IOmxNode`.
     62      */
     63     allocateNode(
     64             string name,
     65             IOmxObserver observer
     66         ) generates (
     67             Status status,
     68             IOmxNode omxNode
     69         );
     70 
     71     /**
     72      * Create an input surface for recording.
     73      *
     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`.
     77      */
     78     createInputSurface(
     79         ) generates (
     80             Status status,
     81             IGraphicBufferProducer producer,
     82             IGraphicBufferSource source
     83         );
     84 };
     85 
     86