31 #define MAX_COMPONENTS 5
55 int len = strlen(str);
58 if ((*(str+i)<
'0') || (*(str+i)>
'9')) {
61 val = (val*10) + ((*(str+i))-
'0');
69 printf(
"Usage: omxprioritytest OMX_name [-i max_comp]\n");
75 int main(
int argc,
char** argv) {
80 int num_of_components;
82 char* componentName=0;
86 int indexaudiostart = -1;
88 int indexvideostart = -1;
90 int indeximagestart = -1;
92 int indexotherstart = -1;
100 while (argn_dec < argc) {
101 if (*(argv[argn_dec]) ==
'-') {
102 switch (*(argv[argn_dec] + 1)) {
115 if (max_value == 0) {
119 componentName = malloc(strlen(argv[argn_dec]) *
sizeof(
char) + 1);
120 strcpy(componentName, argv[argn_dec]);
121 flagInputReceived = 1;
127 if (!flagInputReceived) {
130 if (max_value == 0) {
148 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
150 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
159 audioports = sParam.
nPorts;
164 videoports = sParam.
nPorts;
169 imageports = sParam.
nPorts;
174 otherports = sParam.
nPorts;
179 if (indexaudiostart >= 0) {
180 for (j = 0; j< audioports; j++) {
184 if (indexvideostart >= 0) {
185 for (j = 0; j< videoports; j++) {
189 if (indeximagestart >= 0) {
190 for (j = 0; j< imageports; j++) {
194 if (indexotherstart >= 0) {
195 for (j = 0; j< otherports; j++) {
205 if (global_err != 0) {
206 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
208 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
223 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
225 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
230 num_of_components = i;
233 for (i = 0; i<num_of_components; i++) {
277 switch ((
int)Data2) {