diff options
author | Timothy Gu <timothygu99@gmail.com> | 2015-08-26 02:45:21 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-08-26 06:18:43 +0300 |
commit | c23999be134bde0a0554261a9043be7dbc01de0c (patch) | |
tree | 7ac718ca6ae62d2f594592b7707188eb4571482c /avconv_opt.c | |
parent | 629d4c5b4deee08bf3a4f3ab45fd4f8b76d7aff3 (diff) |
avconv_opt: Add an option that lists all supported hwaccels
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'avconv_opt.c')
-rw-r--r-- | avconv_opt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/avconv_opt.c b/avconv_opt.c index b527335018..5bdd7d9c0e 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -177,6 +177,18 @@ static double parse_frame_aspect_ratio(const char *arg) return ar; } +static int show_hwaccels(void *optctx, const char *opt, const char *arg) +{ + int i; + + printf("Supported hardware acceleration:\n"); + for (i = 0; i < FF_ARRAY_ELEMS(hwaccels) - 1; i++) { + printf("%s\n", hwaccels[i].name); + } + printf("\n"); + return 0; +} + static int opt_audio_codec(void *optctx, const char *opt, const char *arg) { OptionsContext *o = optctx; @@ -2446,6 +2458,8 @@ const OptionDef options[] = { { "hwaccel_device", OPT_VIDEO | OPT_STRING | HAS_ARG | OPT_EXPERT | OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccel_devices) }, "select a device for HW acceleration", "devicename" }, + { "hwaccels", OPT_EXIT, { .func_arg = show_hwaccels }, + "show available HW acceleration methods" }, { "autorotate", HAS_ARG | OPT_BOOL | OPT_SPEC | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) }, "automatically insert correct rotate filters" }, |