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_Component_Register.h 20 * @brief Rockchip OpenMAX IL Component Register 21 * @author csy (csy@rock-chips.com) 22 * @version 1.0.0 23 * @history 24 * 2013.11.26 : Create 25 */ 26 27 #ifndef ROCKCHIP_OMX_COMPONENT_REG 28 #define ROCKCHIP_OMX_COMPONENT_REG 29 30 #include "Rockchip_OMX_Def.h" 31 #include "OMX_Types.h" 32 #include "OMX_Core.h" 33 #include "OMX_Component.h" 34 35 typedef struct _RockchipRegisterComponentType { 36 OMX_U8 componentName[MAX_OMX_COMPONENT_NAME_SIZE]; 37 OMX_U8 roles[MAX_OMX_COMPONENT_ROLE_NUM][MAX_OMX_COMPONENT_ROLE_SIZE]; 38 OMX_U32 totalRoleNum; 39 } RockchipRegisterComponentType; 40 41 typedef struct _ROCKCHIP_OMX_COMPONENT_REGLIST { 42 RockchipRegisterComponentType component; 43 OMX_U8 libName[MAX_OMX_COMPONENT_LIBNAME_SIZE]; 44 } ROCKCHIP_OMX_COMPONENT_REGLIST; 45 46 struct ROCKCHIP_OMX_COMPONENT; 47 typedef struct _ROCKCHIP_OMX_COMPONENT { 48 OMX_U8 componentName[MAX_OMX_COMPONENT_NAME_SIZE]; 49 OMX_U8 libName[MAX_OMX_COMPONENT_LIBNAME_SIZE]; 50 OMX_HANDLETYPE libHandle; 51 OMX_STRING rkversion; 52 OMX_COMPONENTTYPE *pOMXComponent; 53 struct _ROCKCHIP_OMX_COMPONENT *nextOMXComp; 54 } ROCKCHIP_OMX_COMPONENT; 55 56 typedef struct __ROCKCHIP_COMPONENT_INFO { 57 char *comp_type; 58 char *lib_name; 59 } ROCKCHIP_COMPONENT_INFO; 60 61 typedef struct __ROCKCHIP_OPENED_LIB { 62 char *lib_name; 63 void *libHandle; 64 } ROCKCHIP_OPENED_LIB; 65 #ifdef __cplusplus 66 extern "C" { 67 #endif 68 69 OMX_ERRORTYPE Rockchip_OMX_Component_Register(ROCKCHIP_OMX_COMPONENT_REGLIST **compList, OMX_U32 *compNum); 70 OMX_ERRORTYPE Rockchip_OMX_Component_Unregister(ROCKCHIP_OMX_COMPONENT_REGLIST *componentList); 71 OMX_ERRORTYPE Rockchip_OMX_ComponentLoad(ROCKCHIP_OMX_COMPONENT *rockchip_component); 72 OMX_ERRORTYPE Rockchip_OMX_ComponentUnload(ROCKCHIP_OMX_COMPONENT *rockchip_component); 73 74 #ifdef __cplusplus 75 } 76 #endif 77 78 #endif