OpenMAXBellagio  0.9.3
audio_effects/library_entry_point.c
Go to the documentation of this file.
1 
32 #include <omx_volume_component.h>
34 
49  unsigned 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 2; // Return Number of Components - one for audio volume component
55  }
56 
58  stComponents[0]->componentVersion.s.nVersionMajor = 1;
59  stComponents[0]->componentVersion.s.nVersionMinor = 1;
60  stComponents[0]->componentVersion.s.nRevision = 1;
61  stComponents[0]->componentVersion.s.nStep = 1;
62 
63  stComponents[0]->name = calloc(1, OMX_MAX_STRINGNAME_SIZE);
64  if (stComponents[0]->name == NULL) {
66  }
67  strcpy(stComponents[0]->name, VOLUME_COMP_NAME);
68  stComponents[0]->name_specific_length = 1;
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], VOLUME_COMP_NAME);
88  strcpy(stComponents[0]->role_specific[0], VOLUME_COMP_ROLE);
89 
90  stComponents[0]->nqualitylevels = VOLUME_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 = volumeQualityLevels[i * 2];
95  stComponents[0]->multiResourceLevel[i]->MemoryResourceRequested = volumeQualityLevels[i * 2 + 1];
96  }
97 
99  stComponents[1]->componentVersion.s.nVersionMajor = 1;
100  stComponents[1]->componentVersion.s.nVersionMinor = 1;
101  stComponents[1]->componentVersion.s.nRevision = 1;
102  stComponents[1]->componentVersion.s.nStep = 1;
103 
104  stComponents[1]->name = calloc(1, OMX_MAX_STRINGNAME_SIZE);
105  if (stComponents[1]->name == NULL) {
107  }
108  strcpy(stComponents[1]->name, MIXER_COMP_NAME);
109  stComponents[1]->name_specific_length = 1;
111 
112  stComponents[1]->name_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));
113  stComponents[1]->role_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));
114 
115  for(i=0;i<stComponents[1]->name_specific_length;i++) {
116  stComponents[1]->name_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
117  if (stComponents[1]->name_specific[i] == NULL) {
119  }
120  }
121  for(i=0;i<stComponents[1]->name_specific_length;i++) {
122  stComponents[1]->role_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
123  if (stComponents[1]->role_specific[i] == NULL) {
125  }
126  }
127 
128  strcpy(stComponents[1]->name_specific[0], MIXER_COMP_NAME);
129  strcpy(stComponents[1]->role_specific[0], MIXER_COMP_ROLE);
130 
131  stComponents[1]->nqualitylevels = MIXER_QUALITY_LEVELS;
132  stComponents[1]->multiResourceLevel = malloc(stComponents[1]->nqualitylevels * sizeof(multiResourceDescriptor *));
133  for (i=0; i<stComponents[1]->nqualitylevels; i++) {
134  stComponents[1]->multiResourceLevel[i] = malloc(sizeof(multiResourceDescriptor));
135  stComponents[1]->multiResourceLevel[i]->CPUResourceRequested = mixerQualityLevels[i * 2];
136  stComponents[1]->multiResourceLevel[i]->MemoryResourceRequested = mixerQualityLevels[i * 2 + 1];
137  }
138 
139  DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
140  return 2;
141 }

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