cmdutils: add -colors option

This commit is contained in:
Stefano Sabatini
2013-10-17 19:04:16 +02:00
parent d61617a523
commit 4e268285aa
4 changed files with 22 additions and 0 deletions

View File

@@ -1518,6 +1518,18 @@ int show_filters(void *optctx, const char *opt, const char *arg)
return 0;
}
void show_colors(void *optctx, const char *opt, const char *arg)
{
const char *name;
const uint8_t *rgb;
int i;
printf("%-32s #RRGGBB\n", "name");
for (i = 0; name = av_get_known_color_name(i, &rgb); i++)
printf("%-32s #%02x%02x%02x\n", name, rgb[0], rgb[1], rgb[2]);
}
int show_pix_fmts(void *optctx, const char *opt, const char *arg)
{
const AVPixFmtDescriptor *pix_desc = NULL;