OpenMAXBellagio  0.9.3
videoscheduler/library_entry_point.c
Go to the documentation of this file.
1 
34 
49  int i;
50  DEBUG(DEB_LEV_FUNCTION_NAME, "In %s \n",__func__);
51 
52  if (stComponents == NULL) {
53  DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
54  return 1; // Return Number of Components - one for fbdev sink component
55  }
56 
57  stComponents[0]->componentVersion.s.nVersionMajor = 1;
58  stComponents[0]->componentVersion.s.nVersionMinor = 1;
59  stComponents[0]->componentVersion.s.nRevision = 1;
60  stComponents[0]->componentVersion.s.nStep = 1;
61 
62  stComponents[0]->name = calloc(1, OMX_MAX_STRINGNAME_SIZE);
63  if (stComponents[0]->name == NULL) {
65  }
66  strcpy(stComponents[0]->name, VIDEO_SCHEDULER_COMP_NAME);
67  stComponents[0]->name_specific_length = 1;
69 
70 
71  stComponents[0]->name_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));
72  stComponents[0]->role_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));
73 
74  for(i=0;i<stComponents[0]->name_specific_length;i++) {
75  stComponents[0]->name_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
76  if (stComponents[0]->name_specific[i] == NULL) {
78  }
79  }
80  for(i=0;i<stComponents[0]->name_specific_length;i++) {
81  stComponents[0]->role_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
82  if (stComponents[0]->role_specific[i] == NULL) {
84  }
85  }
86 
87  strcpy(stComponents[0]->name_specific[0], VIDEO_SCHEDULER_COMP_NAME);
88  strcpy(stComponents[0]->role_specific[0], VIDEO_SCHEDULER_COMP_ROLE);
89 
90  stComponents[0]->nqualitylevels = VIDEOSCHED_QUALITY_LEVELS;
91  stComponents[0]->multiResourceLevel = malloc(stComponents[0]->nqualitylevels * sizeof(multiResourceDescriptor *));
92  for (i=0; i<stComponents[0]->nqualitylevels; i++) {
93  stComponents[0]->multiResourceLevel[i] = malloc(sizeof(multiResourceDescriptor));
94  stComponents[0]->multiResourceLevel[i]->CPUResourceRequested = videoSchedQualityLevels[i * 2];
95  stComponents[0]->multiResourceLevel[i]->MemoryResourceRequested = videoSchedQualityLevels[i * 2 + 1];
96  }
97  DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
98  return 1;
99 }
OMX_ERRORTYPE omx_video_scheduler_component_Constructor(OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
int omx_component_library_Setup(stLoaderComponentType **stComponents)
The library entry point. It must have the same name for each library of the components loaded by the ...
#define DEBUG(n, fmt, args...)
struct OMX_VERSIONTYPE::@1 s
#define VIDEOSCHED_QUALITY_LEVELS
#define VIDEO_SCHEDULER_COMP_NAME
multiResourceDescriptor ** multiResourceLevel
OMX_ERRORTYPE(* constructor)(OMX_COMPONENTTYPE *, OMX_STRING cComponentName)
#define VIDEO_SCHEDULER_COMP_ROLE
the private data structure handled by the ST static loader that described an OpenMAX component ...
#define OMX_MAX_STRINGNAME_SIZE
Definition: OMX_Core.h:281
OMX_U8 nVersionMinor
Definition: OMX_Types.h:333
OMX_U8 nVersionMajor
Definition: OMX_Types.h:332
#define DEB_LEV_FUNCTION_NAME
OMX_U8 nRevision
Definition: OMX_Types.h:334

Generated for OpenMAX Bellagio rel. 0.9.3 by  doxygen 1.5.1
SourceForge.net Logo