printf("%s [options] device\n", argv0);
printf("-d, --device dev Media device name (default: %s)\n", MEDIA_DEVNAME_DEFAULT);
printf("-e, --entity name Print the device name associated with the given entity\n");
- printf("-f, --formats Comma-separated list of formats to setup\n");
+ printf("-f, --set-format Comma-separated list of formats to setup\n");
+ printf(" --get-format pad Print the active format on a given pad\n");
printf("-h, --help Show verbose help and exit\n");
printf("-i, --interactive Modify links interactively\n");
printf("-l, --links Comma-separated list of links descriptors to setup\n");
printf("\n");
printf("Links and formats are defined as\n");
printf("\tlink = pad, '->', pad, '[', flags, ']' ;\n");
- printf("\tformat = pad, '[', fcc, ' ', size, [ ' ', crop ], ']' ;\n");
+ printf("\tformat = pad, '[', fcc, ' ', size, [ ' ', crop ], [ ' ', '@', frame interval ], ']' ;\n");
printf("\tpad = entity, ':', pad number ;\n");
printf("\tentity = entity number | ( '\"', entity name, '\"' ) ;\n");
printf("\tsize = width, 'x', height ;\n");
- printf("\tcrop = left, ',', top, '/', size ;\n");
+ printf("\tcrop = '(', left, ',', top, ')', '/', size ;\n");
+ printf("\tframe interval = numerator, '/', denominator ;\n");
printf("where the fields are\n");
printf("\tentity number Entity numeric identifier\n");
printf("\tentity name Entify name (string) \n");
printf("\tfcc Format FourCC\n");
printf("\twidth Image width in pixels\n");
printf("\theight Image height in pixels\n");
+ printf("\tnumerator Frame interval numerator\n");
+ printf("\tdenominator Frame interval denominator\n");
}
-#define OPT_PRINT_DOT 256
+#define OPT_PRINT_DOT 256
+#define OPT_GET_FORMAT 257
static struct option opts[] = {
{"device", 1, 0, 'd'},
{"entity", 1, 0, 'e'},
- {"formats", 1, 0, 'f'},
+ {"set-format", 1, 0, 'f'},
+ {"get-format", 1, 0, OPT_GET_FORMAT},
{"help", 0, 0, 'h'},
{"interactive", 0, 0, 'i'},
{"links", 1, 0, 'l'},
media_opts.print_dot = 1;
break;
+ case OPT_GET_FORMAT:
+ media_opts.pad = optarg;
+ break;
+
default:
printf("Invalid option -%c\n", opt);
printf("Run %s -h for help.\n", argv[0]);