diff options
author | Timothy Gu <timothygu99@gmail.com> | 2015-08-25 16:43:53 -0700 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2015-08-26 18:46:20 -0700 |
commit | da0e76955a08249c593861a5088c20c50a48c6bb (patch) | |
tree | a92c515f743767bd17c080e7f6b2ffa913654cf3 /ffmpeg_opt.c | |
parent | 33908f08377dd6abb219b4a080f65cb2eec938e6 (diff) | |
download | ffmpeg-da0e76955a08249c593861a5088c20c50a48c6bb.tar.gz |
ffmpeg_opt: Add -hwaccels option that lists all supported hwaccels
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 40a6e55512..c5e6624a16 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -166,6 +166,18 @@ static void init_options(OptionsContext *o) o->accurate_seek = 1; } +static int show_hwaccels(void *optctx, const char *opt, const char *arg) +{ + int i; + + printf("Hardware acceleration methods:\n"); + for (i = 0; i < FF_ARRAY_ELEMS(hwaccels) - 1; i++) { + printf("%s\n", hwaccels[i].name); + } + printf("\n"); + return 0; +} + /* return a copy of the input with the stream specifiers removed from the keys */ static AVDictionary *strip_specifiers(AVDictionary *dict) { @@ -3241,6 +3253,8 @@ const OptionDef options[] = { #if CONFIG_VDA || CONFIG_VIDEOTOOLBOX { "videotoolbox_pixfmt", HAS_ARG | OPT_STRING | OPT_EXPERT, { &videotoolbox_pixfmt}, "" }, #endif + { "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" }, |