37static int data_loaded = 0;
39static int qualityListItems = 0;
45 if (pNrOfQualityLevels == NULL) {
56 for (i = 0; i<qualityListItems; i++) {
57 if(!strcmp(qualityList[i]->name, cComponentName)) {
58 DEBUG(
DEB_LEV_SIMPLE_SEQ,
"In %s found requested component %s with quality levels %i\n", __func__, cComponentName, (
int)qualityList[i]->nqualitylevels);
60 if (ppQualityLevel == NULL) {
64 (*ppQualityLevel)[k] = k+1;
69 if(!strcmp(qualityList[i]->name_specific[j], cComponentName)) {
72 if (ppQualityLevel == NULL) {
76 (*ppQualityLevel)[k] = k+1;
88 *pNrOfQualityLevels = 0;
98 if (pMultiResourceEstimates == NULL) {
108 for (i = 0; i<qualityListItems; i++) {
109 if(!strcmp(qualityList[i]->name, cComponentName)) {
110 DEBUG(
DEB_LEV_SIMPLE_SEQ,
"In %s found requested component %s with quality level %i\n", __func__, cComponentName, (
int)nQualityLevel);
111 if ((nQualityLevel>0) && (nQualityLevel<=qualityList[i]->nqualitylevels)) {
119 if(!strcmp(qualityList[i]-> name_specific[j], cComponentName)) {
121 if ((nQualityLevel>0) && (nQualityLevel<=qualityList[i]->nqualitylevels)) {
152 char *registry_filename;
153 int numberOfLines = 0;
165 omxregistryfp = fopen(registry_filename,
"r");
166 if (omxregistryfp == NULL){
167 DEBUG(
DEB_LEV_ERR,
"Cannot open OpenMAX registry file %s\n", registry_filename);
170 free(registry_filename);
172 fseek(omxregistryfp, 0, 0);
177 *(line+index_readline) = fgetc(omxregistryfp);
178 if ((*(line+index_readline) ==
'\n') || (*(line+index_readline) ==
'\0')) {
183 *(line+index_readline) =
'\0';
187 if ((*line ==
' ') && (*(line+1) ==
'=')) {
193 fseek(omxregistryfp, 0, 0);
195 qualityListItems = numberOfLines;
202 *(line+index_readline) = fgetc(omxregistryfp);
203 if ((*(line+index_readline) ==
'\n') || (*(line+index_readline) ==
'\0')) {
208 *(line+index_readline) =
'\0';
213 if ((*line ==
' ') && (*(line+1) ==
'=')) {
214 qualityList[listindex] = NULL;
218 while((*(line + index) !=
' ') && (*(line + index) !=
'\0')) {
222 qualityList[listindex]->
name = malloc(wordlength + 1);
223 strncpy(qualityList[listindex]->name, (line + 5), wordlength);
224 *(qualityList[listindex]->
name + wordlength) =
'\0';
226 if (*(line + index) ==
'\n') {
233 while((*(line + tempindex) !=
' ') && (*(line + tempindex) !=
'\0')) {
234 while(*(line + tempindex) !=
':') {
240 qualityList[listindex]->
name_specific = calloc(qualityList[listindex]->name_specific_length,
sizeof(
char *));
242 while((*(line + index) !=
' ') && (*(line + index) !=
'\n')) {
245 while(*(line + index) !=
':') {
249 tempindex = index - tempindex;
250 qualityList[listindex]->
name_specific[roleindex] = malloc(tempindex + 1);
251 strncpy(qualityList[listindex]->name_specific[roleindex], (line+index-tempindex), tempindex);
252 *(qualityList[listindex]->
name_specific[roleindex]+tempindex) =
'\0';
256 if (*(line + index) ==
'\0') {
264 if (*(line + index) !=
' ') {
265 numlevels = (numlevels * 10) + (*(line + index) -
'0');
280 while(*(line + index) !=
',') {
285 while((*(line + index) !=
' ') && (*(line + index) !=
'\n')) {
301 fclose(omxregistryfp);
#define OMX_MAX_STRINGNAME_SIZE
OMX_ERRORTYPE getSupportedQualityLevels(OMX_STRING cComponentName, OMX_U32 **ppQualityLevel, OMX_U32 *pNrOfQualityLevels)
Returns the supported quality levels for a scalable OMXIL component.
OMX_ERRORTYPE getMultiResourceEstimates(OMX_STRING cComponentName, OMX_U32 nQualityLevel, multiResourceDescriptor *pMultiResourceEstimates)
Returns the multiresource estimates for a given OMXIL component name and quality level.
OMX_ERRORTYPE readRegistryFile()
char * componentsRegistryGetFilename()
Get registry filename This function returns the name of the registry file for the components loaded w...
#define DEB_LEV_FUNCTION_NAME
#define DEB_LEV_SIMPLE_SEQ
#define DEBUG(n, fmt, args...)
int MemoryResourceRequested
the private data structure handled by the ST static loader that described an OpenMAX component
multiResourceDescriptor ** multiResourceLevel
unsigned int name_specific_length