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: omxrmtest 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;
99 while (argn_dec < argc) {
100 if (*(argv[argn_dec]) ==
'-') {
101 switch (*(argv[argn_dec] + 1)) {
114 if (max_value == 0) {
118 componentName = malloc(strlen(argv[argn_dec]) *
sizeof(
char) + 1);
119 strcpy(componentName, argv[argn_dec]);
120 flagInputReceived = 1;
126 if (!flagInputReceived) {
129 if (max_value == 0) {
147 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
149 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
158 audioports = sParam.
nPorts;
163 videoports = sParam.
nPorts;
168 imageports = sParam.
nPorts;
173 otherports = sParam.
nPorts;
178 if (indexaudiostart >= 0) {
179 for (j = 0; j< audioports; j++) {
183 if (indexvideostart >= 0) {
184 for (j = 0; j< videoports; j++) {
188 if (indeximagestart >= 0) {
189 for (j = 0; j< imageports; j++) {
193 if (indexotherstart >= 0) {
194 for (j = 0; j< otherports; j++) {
204 if (global_err != 0) {
205 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
207 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
222 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
224 DEBUG(
DEFAULT_MESSAGES,
"#########################################################################\n");
229 num_of_components = i;
232 for (i = 0; i<num_of_components; i++) {
276 switch ((
int)Data2) {