1 /* 2 * 3 * Copyright 2013 Rockchip Electronics Co., LTD. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /* 19 * @file Rockchip_OMX_Core.h 20 * @brief Rockchip OpenMAX IL Core 21 * @author csy(csy@rock-chips.com) 22 * 23 * @version 1.0.0 24 * @history 25 * 2013.11.26 : Create 26 */ 27 28 #ifndef ROCKCHIP_OMX_CORE 29 #define ROCKCHIP_OMX_CORE 30 31 #include "Rockchip_OMX_Def.h" 32 #include "OMX_Types.h" 33 #include "OMX_Core.h" 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 40 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void); 41 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void); 42 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum( 43 OMX_OUT OMX_STRING cComponentName, 44 OMX_IN OMX_U32 nNameLength, 45 OMX_IN OMX_U32 nIndex); 46 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle( 47 OMX_OUT OMX_HANDLETYPE *pHandle, 48 OMX_IN OMX_STRING cComponentName, 49 OMX_IN OMX_PTR pAppData, 50 OMX_IN OMX_CALLBACKTYPE *pCallBacks); 51 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle( 52 OMX_IN OMX_HANDLETYPE hComponent); 53 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel( 54 OMX_IN OMX_HANDLETYPE hOutput, 55 OMX_IN OMX_U32 nPortOutput, 56 OMX_IN OMX_HANDLETYPE hInput, 57 OMX_IN OMX_U32 nPortInput); 58 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_GetContentPipe( 59 OMX_OUT OMX_HANDLETYPE *hPipe, 60 OMX_IN OMX_STRING szURI); 61 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole( 62 OMX_IN OMX_STRING role, 63 OMX_INOUT OMX_U32 *pNumComps, 64 OMX_INOUT OMX_U8 **compNames); 65 ROCKCHIP_EXPORT_REF OMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent( 66 OMX_IN OMX_STRING compName, 67 OMX_INOUT OMX_U32 *pNumRoles, 68 OMX_OUT OMX_U8 **roles); 69 70 #define MAX_COMPONENT_ROLE_NUM 1 71 72 typedef struct _omx_core_cb_type { 73 char compName[64]; // Component name 74 char roles[32]; // roles played 75 } omx_core_cb_type; 76 77 78 #ifdef __cplusplus 79 } 80 #endif 81 82 #endif 83 84