aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-10-17 19:04:16 +0200
committerStefano Sabatini <stefasab@gmail.com>2013-10-27 09:18:45 +0100
commit4e268285aaff2fdd352eeac4765169a01e6eefe4 (patch)
treec581240e3f0a0b3521dc8ef0adc2d3cee460f949 /cmdutils.c
parentd61617a52349f9e65903bffb801dba1388de01ac (diff)
downloadffmpeg-4e268285aaff2fdd352eeac4765169a01e6eefe4.tar.gz
cmdutils: add -colors option
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 90ad48f620..1fbd73cf84 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -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;