#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
#include <sys/types.h>
#include <dirent.h>
#include <strings.h>
#include <errno.h>
#include <assert.h>
#include "common.h"
#include "st_static_component_loader.h"
#include "omx_base_component.h"
Go to the source code of this file.
Defines | |
#define | _GNU_SOURCE |
Functions | |
void | st_static_InitComponentLoader () |
The initialization of the ST specific component loader. | |
OMX_ERRORTYPE | BOSA_ST_InitComponentLoader (BOSA_COMPONENTLOADER *loader) |
the ST static loader contructor | |
OMX_ERRORTYPE | BOSA_ST_DeInitComponentLoader (BOSA_COMPONENTLOADER *loader) |
The destructor of the ST specific component loader. | |
OMX_ERRORTYPE | BOSA_ST_CreateComponent (BOSA_COMPONENTLOADER *loader, OMX_HANDLETYPE *pHandle, OMX_STRING cComponentName, OMX_PTR pAppData, OMX_CALLBACKTYPE *pCallBacks) |
creator of the requested OpenMAX component | |
OMX_ERRORTYPE | BOSA_ST_DestroyComponent (BOSA_COMPONENTLOADER *loader, OMX_HANDLETYPE hComponent) |
destructor of the requested OpenMAX component | |
OMX_ERRORTYPE | BOSA_ST_ComponentNameEnum (BOSA_COMPONENTLOADER *loader, OMX_STRING cComponentName, OMX_U32 nNameLength, OMX_U32 nIndex) |
This function search for the index from 0 to end of the list. | |
OMX_ERRORTYPE | BOSA_ST_GetRolesOfComponent (BOSA_COMPONENTLOADER *loader, OMX_STRING compName, OMX_U32 *pNumRoles, OMX_U8 **roles) |
The specific version of OMX_GetRolesOfComponent. | |
OMX_ERRORTYPE | BOSA_ST_GetComponentsOfRole (BOSA_COMPONENTLOADER *loader, OMX_STRING role, OMX_U32 *pNumComps, OMX_U8 **compNames) |
The specific version of OMX_GetComponentsOfRole. | |
Variables | |
void * | handleLibList [100] |
OMX_U32 | numLib = 0 |
Copyright (C) 2007, 2008 STMicroelectronics Copyright (C) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
$Date$ Revision $Rev$ Author $Author$
Definition in file st_static_component_loader.c.
#define _GNU_SOURCE |
Definition at line 29 of file st_static_component_loader.c.
OMX_ERRORTYPE BOSA_ST_ComponentNameEnum | ( | BOSA_COMPONENTLOADER * | loader, | |
OMX_STRING | cComponentName, | |||
OMX_U32 | nNameLength, | |||
OMX_U32 | nIndex | |||
) |
This function search for the index from 0 to end of the list.
This function searches in the list of ST static components and enumerates both the class names and the role specific components.
Definition at line 330 of file st_static_component_loader.c.
References DEB_LEV_FUNCTION_NAME, DEBUG, BOSA_COMPONENTLOADER::loaderPrivate, stLoaderComponentType::name_specific_length, OMX_ErrorNoMore, and OMX_ErrorNone.
Referenced by st_static_InitComponentLoader().
OMX_ERRORTYPE BOSA_ST_CreateComponent | ( | BOSA_COMPONENTLOADER * | loader, | |
OMX_HANDLETYPE * | pHandle, | |||
OMX_STRING | cComponentName, | |||
OMX_PTR | pAppData, | |||
OMX_CALLBACKTYPE * | pCallBacks | |||
) |
creator of the requested OpenMAX component
creator of the requested openmax component
This function searches for the requested component in the internal list. If the component is found, its constructor is called, and the standard callbacks are assigned. A pointer to a standard OpenMAX component is returned.
Definition at line 231 of file st_static_component_loader.c.
References OMX_COMPONENTTYPE::ComponentDeInit, stLoaderComponentType::constructor, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEBUG, omx_base_component_PrivateType::loader, BOSA_COMPONENTLOADER::loaderPrivate, stLoaderComponentType::name_requested, stLoaderComponentType::name_specific_length, OMX_ErrorComponentNotFound, OMX_ErrorInsufficientResources, OMX_ErrorNone, OMX_MAX_STRINGNAME_SIZE, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by st_static_InitComponentLoader().
OMX_ERRORTYPE BOSA_ST_DeInitComponentLoader | ( | BOSA_COMPONENTLOADER * | loader | ) |
The destructor of the ST specific component loader.
This function deallocates the list of available components.
Definition at line 164 of file st_static_component_loader.c.
References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, err, handleLibList, BOSA_COMPONENTLOADER::loaderPrivate, stLoaderComponentType::name, stLoaderComponentType::name_requested, stLoaderComponentType::name_specific, stLoaderComponentType::name_specific_length, numLib, OMX_ErrorNone, and stLoaderComponentType::role_specific.
Referenced by st_static_InitComponentLoader().
OMX_ERRORTYPE BOSA_ST_DestroyComponent | ( | BOSA_COMPONENTLOADER * | loader, | |
OMX_HANDLETYPE | hComponent | |||
) |
destructor of the requested OpenMAX component
Definition at line 306 of file st_static_component_loader.c.
References err, omx_base_component_PrivateType::loader, OMX_ErrorComponentNotFound, and OMX_ErrorNone.
Referenced by st_static_InitComponentLoader().
OMX_ERRORTYPE BOSA_ST_GetComponentsOfRole | ( | BOSA_COMPONENTLOADER * | loader, | |
OMX_STRING | role, | |||
OMX_U32 * | pNumComps, | |||
OMX_U8 ** | compNames | |||
) |
The specific version of OMX_GetComponentsOfRole.
This function replicates exactly the behavior of the standard OMX_GetComponentsOfRole function for the ST static component loader
Definition at line 445 of file st_static_component_loader.c.
References DEB_LEV_FUNCTION_NAME, DEBUG, BOSA_COMPONENTLOADER::loaderPrivate, stLoaderComponentType::name_specific_length, and OMX_ErrorNone.
Referenced by st_static_InitComponentLoader().
OMX_ERRORTYPE BOSA_ST_GetRolesOfComponent | ( | BOSA_COMPONENTLOADER * | loader, | |
OMX_STRING | compName, | |||
OMX_U32 * | pNumRoles, | |||
OMX_U8 ** | roles | |||
) |
The specific version of OMX_GetRolesOfComponent.
This function replicates exactly the behavior of the standard OMX_GetRolesOfComponent function for the ST static component loader
Definition at line 380 of file st_static_component_loader.c.
References DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, BOSA_COMPONENTLOADER::loaderPrivate, stLoaderComponentType::name_specific_length, OMX_ErrorComponentNotFound, and OMX_ErrorNone.
Referenced by st_static_InitComponentLoader().
OMX_ERRORTYPE BOSA_ST_InitComponentLoader | ( | BOSA_COMPONENTLOADER * | loader | ) |
the ST static loader contructor
The constructor of the ST specific component loader.
This function creates the ST static component loader, and creates the list of available components, based on a registry file created by a separate appication. It is called omxregister, and must be called before the use of this loader
Definition at line 80 of file st_static_component_loader.c.
References DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEBUG, handle, handleLibList, BOSA_COMPONENTLOADER::loaderPrivate, numLib, OMX_ErrorNone, OMX_MAX_STRINGNAME_SIZE, and registryGetFilename().
Referenced by st_static_InitComponentLoader().
void st_static_InitComponentLoader | ( | ) |
The initialization of the ST specific component loader.
This function allocates memory for the component loader and initialize other function pointer
Definition at line 59 of file st_static_component_loader.c.
References BOSA_COMPONENTLOADER::BOSA_ComponentNameEnum, BOSA_COMPONENTLOADER::BOSA_CreateComponent, BOSA_COMPONENTLOADER::BOSA_DeInitComponentLoader, BOSA_COMPONENTLOADER::BOSA_DestroyComponent, BOSA_COMPONENTLOADER::BOSA_GetComponentsOfRole, BOSA_COMPONENTLOADER::BOSA_GetRolesOfComponent, BOSA_COMPONENTLOADER::BOSA_InitComponentLoader, BOSA_ST_ComponentNameEnum(), BOSA_ST_CreateComponent(), BOSA_ST_DeInitComponentLoader(), BOSA_ST_DestroyComponent(), BOSA_ST_GetComponentsOfRole(), BOSA_ST_GetRolesOfComponent(), BOSA_ST_InitComponentLoader(), and st_static_loader.
Referenced by createComponentLoaders().
void* handleLibList[100] |
This pointer holds and handle allocate by this loader and requested by some application. If the IL client does not de-allocate it calling explicitely the FreeHandle function, any pending handle is release at the end, when the global function OMX_Deinit is called. This list takes track of any handle
Definition at line 50 of file st_static_component_loader.c.
Referenced by BOSA_ST_DeInitComponentLoader(), and BOSA_ST_InitComponentLoader().
Current number of handles already allocated by this loader
Definition at line 53 of file st_static_component_loader.c.
Referenced by BOSA_ST_DeInitComponentLoader(), and BOSA_ST_InitComponentLoader().