1 /*
2 * Copyright (c) 2011 Anton Khirnov
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 /*
22 * enumerate avoptions and format them in texinfo format
23 */
24
25 #include <string.h>
26
31
33 {
34 fprintf(stderr, "Usage: enum_options type\n"
35 "type: format codec\n");
36 exit(1);
37 }
38
40 {
51 default:
printf(
"value");
break;
52 }
54
59 }
62
66
69 printf(
"\nPossible values:\n@table @samp\n");
70
73 printf(
"@item %s\n%s\n",
u->name,
u->help ?
u->help :
"");
75 }
76 }
77
79 {
81
82 printf(
"@table @option\n");
87 }
88
90 {
93 void *iformat_opaque =
NULL;
94 void *oformat_opaque =
NULL;
95
96 printf(
"@section Generic format AVOptions\n");
98
99 printf(
"@section Format-specific AVOptions\n");
102 continue;
105 }
108 continue;
111 }
112 }
113
115 {
118
119 printf(
"@section Generic codec AVOptions\n");
121
122 printf(
"@section Codec-specific AVOptions\n");
125 continue;
126 printf(
"@subsection %s AVOptions\n",
c->priv_class->class_name);
128 }
129 }
130
131 int main(
int argc,
char **argv)
132 {
133 if (argc < 2)
135
136 if (!strcmp(argv[1], "format"))
138 else if (!strcmp(argv[1], "codec"))
140 else
142
143 return 0;
144 }