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 17package android.hardware.media.omx@1.0; 18 19import android.hardware.media@1.0::types; 20 21/** 22 * Ref: frameworks/av/media/libmedia/aidl/android/IOMXBufferSource.aidl 23 * 24 * IOmxBufferSource is an interface for a listener for certain events from an 25 * IOmxNode instance. Use IOmxNode::setInputSurface() to attach an 26 * IOmxBufferSource instance to an IOmxNode instance. 27 * 28 * @see OMX_STATETYPE in the OpenMax IL standard. 29 */ 30interface IOmxBufferSource { 31 32 /** 33 * onOmxExecuting() is invoked when the node state changes to 34 * OMX_StateExecuting state. 35 */ 36 oneway onOmxExecuting(); 37 38 /** 39 * onOmxIdle() is invoked when the node transitions from OMX_StateExecuting 40 * to OMX_StateIdle. 41 */ 42 oneway onOmxIdle(); 43 44 /** 45 * onOmxLoaded() is invoked when the node transitions from OMX_StateIdle or 46 * OMX_StateExecuting to OMX_StateLoaded. 47 */ 48 oneway onOmxLoaded(); 49 50 /** 51 * onInputBufferAdded() is invoked after a new input buffer is added to the 52 * node. This may happen within IOmxNode::allocateSecureBuffer() or 53 * IOmxNode::useBuffer(). 54 * 55 * @param[in] buffer is the id of the added buffer. 56 */ 57 oneway onInputBufferAdded(BufferId buffer); 58 59 /** 60 * onInputBufferEmptied() is invoked after an input buffer is emptied. This 61 * may happen within IOmxNode::emptyBuffer(). 62 * 63 * @param[in] buffer is the id of the emptied buffer. 64 * @param[in] fence is the fence associated with the buffer. 65 */ 66 oneway onInputBufferEmptied(BufferId buffer, Fence fence); 67}; 68 69