MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / print_option

Function print_option

tools/enum_options.c:39–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static void print_option(const AVClass *class, const AVOption *o)
40{
41 printf("@item -%s @var{", o->name);
42 switch (o->type) {
43 case AV_OPT_TYPE_BINARY: printf("hexadecimal string"); break;
44 case AV_OPT_TYPE_STRING: printf("string"); break;
45 case AV_OPT_TYPE_INT:
46 case AV_OPT_TYPE_INT64: printf("integer"); break;
47 case AV_OPT_TYPE_FLOAT:
48 case AV_OPT_TYPE_DOUBLE: printf("float"); break;
49 case AV_OPT_TYPE_RATIONAL: printf("rational number"); break;
50 case AV_OPT_TYPE_FLAGS: printf("flags"); break;
51 default: printf("value"); break;
52 }
53 printf("} (@emph{");
54
55 if (o->flags & AV_OPT_FLAG_ENCODING_PARAM) {
56 printf("input");
57 if (o->flags & AV_OPT_FLAG_ENCODING_PARAM)
58 printf("/");
59 }
60 if (o->flags & AV_OPT_FLAG_ENCODING_PARAM)
61 printf("output");
62
63 printf("})\n");
64 if (o->help)
65 printf("%s\n", o->help);
66
67 if (o->unit) {
68 const AVOption *u = NULL;
69 printf("\nPossible values:\n@table @samp\n");
70
71 while ((u = av_opt_next(&class, u)))
72 if (u->type == AV_OPT_TYPE_CONST && u->unit && !strcmp(u->unit, o->unit))
73 printf("@item %s\n%s\n", u->name, u->help ? u->help : "");
74 printf("@end table\n");
75 }
76}
77
78static void show_opts(const AVClass *class)
79{

Callers 1

show_optsFunction · 0.70

Calls 1

av_opt_nextFunction · 0.85

Tested by

no test coverage detected