40 printf(
"Show the relationships between rawvideo pixel formats and FourCC tags.\n");
41 printf(
"usage: fourcc2pixfmt [OPTIONS]\n");
44 "-l list the pixel format for each fourcc\n"
45 "-L list the fourccs for each pixel format\n"
46 "-p PIX_FMT given a pixel format, print the list of associated fourccs (one per line)\n"
47 "-h print this help\n");
55 if (pix_fmt_tags[i].pix_fmt == pix_fmt) {
58 printf(
"%s%c", buf, sep);
63 int main(
int argc,
char **argv)
65 int i, list_fourcc_pix_fmt = 0, list_pix_fmt_fourccs = 0;
67 const char *pix_fmt_name = NULL;
75 while ((c =
getopt(argc, argv,
"hp:lL")) != -1) {
81 list_fourcc_pix_fmt = 1;
84 list_pix_fmt_fourccs = 1;
95 if (list_fourcc_pix_fmt) {
103 if (list_pix_fmt_fourccs) {
108 printf(
"%s: ", pix_desc->
name);
117 fprintf(stderr,
"Invalid pixel format selected '%s'\n", pix_fmt_name);