1 /*-------------------------------------------------------------------------- 2 Copyright (c) 2009, The Linux Foundation. All rights reserved. 3 4 Redistribution and use in source and binary forms, with or without 5 modification, are permitted provided that the following conditions are met: 6 * Redistributions of source code must retain the above copyright 7 notice, this list of conditions and the following disclaimer. 8 * Redistributions in binary form must reproduce the above copyright 9 notice, this list of conditions and the following disclaimer in the 10 documentation and/or other materials provided with the distribution. 11 * Neither the name of The Linux Foundation nor 12 the names of its contributors may be used to endorse or promote 13 products derived from this software without specific prior written 14 permission. 15 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 20 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 --------------------------------------------------------------------------*/ 28 /*============================================================================ 29 O p e n M A X w r a p p e r s 30 O p e n M A X C o r e 31 32 OpenMAX Core Macros interface. 33 34 ============================================================================*/ 35 36 ////////////////////////////////////////////////////////////////////////////// 37 // Include Files 38 ////////////////////////////////////////////////////////////////////////////// 39 #ifndef OMX_CORE_CMP_H 40 #define OMX_CORE_CMP_H 41 42 43 44 #ifdef __cplusplus 45 extern "C" { 46 #endif 47 48 49 void * qc_omx_create_component_wrapper(OMX_PTR obj_ptr); 50 51 52 OMX_ERRORTYPE 53 qc_omx_component_init(OMX_IN OMX_HANDLETYPE hComp, OMX_IN OMX_STRING componentName); 54 55 56 OMX_ERRORTYPE 57 qc_omx_component_get_version(OMX_IN OMX_HANDLETYPE hComp, 58 OMX_OUT OMX_STRING componentName, 59 OMX_OUT OMX_VERSIONTYPE* componentVersion, 60 OMX_OUT OMX_VERSIONTYPE* specVersion, 61 OMX_OUT OMX_UUIDTYPE* componentUUID); 62 63 OMX_ERRORTYPE 64 qc_omx_component_send_command(OMX_IN OMX_HANDLETYPE hComp, 65 OMX_IN OMX_COMMANDTYPE cmd, 66 OMX_IN OMX_U32 param1, 67 OMX_IN OMX_PTR cmdData); 68 69 OMX_ERRORTYPE 70 qc_omx_component_get_parameter(OMX_IN OMX_HANDLETYPE hComp, 71 OMX_IN OMX_INDEXTYPE paramIndex, 72 OMX_INOUT OMX_PTR paramData); 73 74 OMX_ERRORTYPE 75 qc_omx_component_set_parameter(OMX_IN OMX_HANDLETYPE hComp, 76 OMX_IN OMX_INDEXTYPE paramIndex, 77 OMX_IN OMX_PTR paramData); 78 79 OMX_ERRORTYPE 80 qc_omx_component_get_config(OMX_IN OMX_HANDLETYPE hComp, 81 OMX_IN OMX_INDEXTYPE configIndex, 82 OMX_INOUT OMX_PTR configData); 83 84 OMX_ERRORTYPE 85 qc_omx_component_set_config(OMX_IN OMX_HANDLETYPE hComp, 86 OMX_IN OMX_INDEXTYPE configIndex, 87 OMX_IN OMX_PTR configData); 88 89 OMX_ERRORTYPE 90 qc_omx_component_get_extension_index(OMX_IN OMX_HANDLETYPE hComp, 91 OMX_IN OMX_STRING paramName, 92 OMX_OUT OMX_INDEXTYPE* indexType); 93 94 OMX_ERRORTYPE 95 qc_omx_component_get_state(OMX_IN OMX_HANDLETYPE hComp, 96 OMX_OUT OMX_STATETYPE* state); 97 98 OMX_ERRORTYPE 99 qc_omx_component_tunnel_request(OMX_IN OMX_HANDLETYPE hComp, 100 OMX_IN OMX_U32 port, 101 OMX_IN OMX_HANDLETYPE peerComponent, 102 OMX_IN OMX_U32 peerPort, 103 OMX_INOUT OMX_TUNNELSETUPTYPE* tunnelSetup); 104 105 OMX_ERRORTYPE 106 qc_omx_component_use_buffer(OMX_IN OMX_HANDLETYPE hComp, 107 OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr, 108 OMX_IN OMX_U32 port, 109 OMX_IN OMX_PTR appData, 110 OMX_IN OMX_U32 bytes, 111 OMX_IN OMX_U8* buffer); 112 113 114 // qc_omx_component_allocate_buffer -- API Call 115 OMX_ERRORTYPE 116 qc_omx_component_allocate_buffer(OMX_IN OMX_HANDLETYPE hComp, 117 OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr, 118 OMX_IN OMX_U32 port, 119 OMX_IN OMX_PTR appData, 120 OMX_IN OMX_U32 bytes); 121 122 OMX_ERRORTYPE 123 qc_omx_component_free_buffer(OMX_IN OMX_HANDLETYPE hComp, 124 OMX_IN OMX_U32 port, 125 OMX_IN OMX_BUFFERHEADERTYPE* buffer); 126 127 OMX_ERRORTYPE 128 qc_omx_component_empty_this_buffer(OMX_IN OMX_HANDLETYPE hComp, 129 OMX_IN OMX_BUFFERHEADERTYPE* buffer); 130 131 OMX_ERRORTYPE 132 qc_omx_component_fill_this_buffer(OMX_IN OMX_HANDLETYPE hComp, 133 OMX_IN OMX_BUFFERHEADERTYPE* buffer); 134 135 OMX_ERRORTYPE 136 qc_omx_component_set_callbacks(OMX_IN OMX_HANDLETYPE hComp, 137 OMX_IN OMX_CALLBACKTYPE* callbacks, 138 OMX_IN OMX_PTR appData); 139 140 OMX_ERRORTYPE 141 qc_omx_component_deinit(OMX_IN OMX_HANDLETYPE hComp); 142 143 OMX_ERRORTYPE 144 qc_omx_component_use_EGL_image(OMX_IN OMX_HANDLETYPE hComp, 145 OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr, 146 OMX_IN OMX_U32 port, 147 OMX_IN OMX_PTR appData, 148 OMX_IN void* eglImage); 149 150 OMX_ERRORTYPE 151 qc_omx_component_role_enum(OMX_IN OMX_HANDLETYPE hComp, 152 OMX_OUT OMX_U8* role, 153 OMX_IN OMX_U32 index); 154 155 #ifdef __cplusplus 156 } 157 #endif 158 159 #endif 160 161