Browse Source

avconv_opt: Add an option that lists all supported hwaccels

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n2.8
Timothy Gu Luca Barbato 9 years ago
parent
commit
c23999be13
2 changed files with 18 additions and 0 deletions
  1. +14
    -0
      avconv_opt.c
  2. +4
    -0
      doc/avconv.texi

+ 14
- 0
avconv_opt.c View File

@@ -177,6 +177,18 @@ static double parse_frame_aspect_ratio(const char *arg)
return ar; 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) static int opt_audio_codec(void *optctx, const char *opt, const char *arg)
{ {
OptionsContext *o = optctx; OptionsContext *o = optctx;
@@ -2446,6 +2458,8 @@ const OptionDef options[] = {
{ "hwaccel_device", OPT_VIDEO | OPT_STRING | HAS_ARG | OPT_EXPERT | { "hwaccel_device", OPT_VIDEO | OPT_STRING | HAS_ARG | OPT_EXPERT |
OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccel_devices) }, OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccel_devices) },
"select a device for HW acceleration", "devicename" }, "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 | { "autorotate", HAS_ARG | OPT_BOOL | OPT_SPEC |
OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) }, OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) },
"automatically insert correct rotate filters" }, "automatically insert correct rotate filters" },


+ 4
- 0
doc/avconv.texi View File

@@ -626,6 +626,10 @@ is not specified, the value of the @var{DISPLAY} environment variable is used
For DXVA2, this option should contain the number of the display adapter to use. For DXVA2, this option should contain the number of the display adapter to use.
If this option is not specified, the default adapter is used. If this option is not specified, the default adapter is used.
@end table @end table

@item -hwaccels
List all hardware acceleration methods supported in this build of avconv.

@end table @end table


@section Audio Options @section Audio Options


Loading…
Cancel
Save