OpenMAXBellagio 0.9.3
omx_reference_resource_manager.h
Go to the documentation of this file.
00001 
00028 #ifndef _OMX_REFERENCE_RESOURCE_MANAGER_H_
00029 #define _OMX_REFERENCE_RESOURCE_MANAGER_H_
00030 
00031 #define MAX_COMPONENTS_TYPES_HANDLED 500
00032 
00033 #include "omxcore.h"
00034 
00035 
00036 typedef struct ComponentListType ComponentListType;
00037 struct ComponentListType {
00038     OMX_COMPONENTTYPE *openmaxStandComp;
00039     OMX_U32 nGroupPriority;
00040     OMX_U32 timestamp;
00041     ComponentListType* next;
00042 };
00043 
00044 typedef struct NameIndexType NameIndexType;
00045 struct NameIndexType {
00046     char* component_name;
00047     int index;
00048     int max_components;
00049 };
00050 
00051 
00052 int globalIndex;
00053 NameIndexType *listOfcomponentRegistered;
00054 ComponentListType **globalComponentList;
00055 ComponentListType **globalWaitingComponentList;
00056 
00057 OMX_ERRORTYPE RM_RegisterComponent(char *name, int max_components);
00058 OMX_ERRORTYPE addElemToList(ComponentListType **list, OMX_COMPONENTTYPE *openmaxStandComp, int index, OMX_BOOL bIsWaiting);
00059 OMX_ERRORTYPE removeElemFromList(ComponentListType **list, OMX_COMPONENTTYPE *openmaxStandComp);
00060 int numElemInList(ComponentListType *list);
00061 OMX_ERRORTYPE clearList(ComponentListType **list);
00062 
00065 #define RM_SHOW_NAME 0x01
00066 #define RM_SHOW_ADDRESS 0x02
00067 
00068 OMX_ERRORTYPE RM_Init();
00069 OMX_ERRORTYPE RM_Deinit();
00070 OMX_ERRORTYPE RM_getResource(OMX_COMPONENTTYPE *openmaxStandComp);
00071 OMX_ERRORTYPE RM_releaseResource(OMX_COMPONENTTYPE *openmaxStandComp);
00072 OMX_ERRORTYPE RM_waitForResource(OMX_COMPONENTTYPE *openmaxStandComp);
00073 OMX_ERRORTYPE RM_removeFromWaitForResource(OMX_COMPONENTTYPE *openmaxStandComp);
00074 void RM_printList(ComponentListType *list, int viewFlag);
00075 
00076 #endif