@@ -206,6 +206,59 @@ typedef struct OptionDef {
206
206
void show_help_options (const OptionDef * options , const char * msg , int req_flags ,
207
207
int rej_flags , int alt_flags );
208
208
209
+ #if CONFIG_OPENCL
210
+ #define CMDUTILS_COMMON_OPTIONS_OPENCL \
211
+ { "opencl_bench", OPT_EXIT, {.func_arg = opt_opencl_bench}, \
212
+ "run benchmark on all OpenCL devices and show results" }, \
213
+ { "opencl_options", HAS_ARG, {.func_arg = opt_opencl}, \
214
+ "set OpenCL environment options" }, \
215
+
216
+ #else
217
+ #define CMDUTILS_COMMON_OPTIONS_OPENCL
218
+ #endif
219
+
220
+ #if CONFIG_AVDEVICE
221
+ #define CMDUTILS_COMMON_OPTIONS_AVDEVICE \
222
+ { "sources" , OPT_EXIT | HAS_ARG, { .func_arg = show_sources }, \
223
+ "list sources of the input device", "device" }, \
224
+ { "sinks" , OPT_EXIT | HAS_ARG, { .func_arg = show_sinks }, \
225
+ "list sinks of the output device", "device" }, \
226
+
227
+ #else
228
+ #define CMDUTILS_COMMON_OPTIONS_AVDEVICE
229
+ #endif
230
+
231
+ #define CMDUTILS_COMMON_OPTIONS \
232
+ { "L", OPT_EXIT, { .func_arg = show_license }, "show license" }, \
233
+ { "h", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
234
+ { "?", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
235
+ { "help", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
236
+ { "-help", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
237
+ { "version", OPT_EXIT, { .func_arg = show_version }, "show version" }, \
238
+ { "buildconf", OPT_EXIT, { .func_arg = show_buildconf }, "show build configuration" }, \
239
+ { "formats", OPT_EXIT, { .func_arg = show_formats }, "show available formats" }, \
240
+ { "muxers", OPT_EXIT, { .func_arg = show_muxers }, "show available muxers" }, \
241
+ { "demuxers", OPT_EXIT, { .func_arg = show_demuxers }, "show available demuxers" }, \
242
+ { "devices", OPT_EXIT, { .func_arg = show_devices }, "show available devices" }, \
243
+ { "codecs", OPT_EXIT, { .func_arg = show_codecs }, "show available codecs" }, \
244
+ { "decoders", OPT_EXIT, { .func_arg = show_decoders }, "show available decoders" }, \
245
+ { "encoders", OPT_EXIT, { .func_arg = show_encoders }, "show available encoders" }, \
246
+ { "bsfs", OPT_EXIT, { .func_arg = show_bsfs }, "show available bit stream filters" }, \
247
+ { "protocols", OPT_EXIT, { .func_arg = show_protocols }, "show available protocols" }, \
248
+ { "filters", OPT_EXIT, { .func_arg = show_filters }, "show available filters" }, \
249
+ { "pix_fmts", OPT_EXIT, { .func_arg = show_pix_fmts }, "show available pixel formats" }, \
250
+ { "layouts", OPT_EXIT, { .func_arg = show_layouts }, "show standard channel layouts" }, \
251
+ { "sample_fmts", OPT_EXIT, { .func_arg = show_sample_fmts }, "show available audio sample formats" }, \
252
+ { "colors", OPT_EXIT, { .func_arg = show_colors }, "show available color names" }, \
253
+ { "loglevel", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \
254
+ { "v", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \
255
+ { "report", 0, { (void*)opt_report }, "generate a report" }, \
256
+ { "max_alloc", HAS_ARG, { .func_arg = opt_max_alloc }, "set maximum size of a single allocated block", "bytes" }, \
257
+ { "cpuflags", HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "force specific cpu flags", "flags" }, \
258
+ { "hide_banner", OPT_BOOL | OPT_EXPERT, {&hide_banner}, "do not show program banner", "hide_banner" }, \
259
+ CMDUTILS_COMMON_OPTIONS_OPENCL \
260
+ CMDUTILS_COMMON_OPTIONS_AVDEVICE \
261
+
209
262
/**
210
263
* Show help for all options with given flags in class and all its
211
264
* children.
0 commit comments