*/
int opt_loglevel(void *optctx, const char *opt, const char *arg);
-int opt_report(const char *opt);
+int opt_report(void *optctx, const char *opt, const char *arg);
int opt_max_alloc(void *optctx, const char *opt, const char *arg);
{ "colors", OPT_EXIT, { .func_arg = show_colors }, "show available color names" }, \
{ "loglevel", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \
{ "v", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \
- { "report", 0, { (void*)opt_report }, "generate a report" }, \
+ { "report", 0, { .func_arg = opt_report }, "generate a report" }, \
{ "max_alloc", HAS_ARG, { .func_arg = opt_max_alloc }, "set maximum size of a single allocated block", "bytes" }, \
{ "cpuflags", HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "force specific cpu flags", "flags" }, \
{ "hide_banner", OPT_BOOL | OPT_EXPERT, {&hide_banner}, "do not show program banner", "hide_banner" }, \
return 0;
}
-static int opt_show_versions(const char *opt, const char *arg)
+static int opt_show_versions(void *optctx, const char *opt, const char *arg)
{
mark_section_show_entries(SECTION_ID_PROGRAM_VERSION, 1, NULL);
mark_section_show_entries(SECTION_ID_LIBRARY_VERSION, 1, NULL);
}
#define DEFINE_OPT_SHOW_SECTION(section, target_section_id) \
- static int opt_show_##section(const char *opt, const char *arg) \
+ static int opt_show_##section(void *optctx, const char *opt, const char *arg) \
{ \
mark_section_show_entries(SECTION_ID_##target_section_id, 1, NULL); \
return 0; \
{ "sections", OPT_EXIT, {.func_arg = opt_sections}, "print sections structure and section information, and exit" },
{ "show_data", OPT_BOOL, {(void*)&do_show_data}, "show packets data" },
{ "show_data_hash", OPT_STRING | HAS_ARG, {(void*)&show_data_hash}, "show packets data hash" },
- { "show_error", 0, {(void*)&opt_show_error}, "show probing error" },
- { "show_format", 0, {(void*)&opt_show_format}, "show format/container info" },
- { "show_frames", 0, {(void*)&opt_show_frames}, "show frames info" },
+ { "show_error", 0, { .func_arg = &opt_show_error }, "show probing error" },
+ { "show_format", 0, { .func_arg = &opt_show_format }, "show format/container info" },
+ { "show_frames", 0, { .func_arg = &opt_show_frames }, "show frames info" },
{ "show_format_entry", HAS_ARG, {.func_arg = opt_show_format_entry},
"show a particular entry from the format/container info", "entry" },
{ "show_entries", HAS_ARG, {.func_arg = opt_show_entries},
#if HAVE_THREADS
{ "show_log", OPT_INT|HAS_ARG, {(void*)&do_show_log}, "show log" },
#endif
- { "show_packets", 0, {(void*)&opt_show_packets}, "show packets info" },
- { "show_programs", 0, {(void*)&opt_show_programs}, "show programs info" },
- { "show_streams", 0, {(void*)&opt_show_streams}, "show streams info" },
- { "show_chapters", 0, {(void*)&opt_show_chapters}, "show chapters info" },
+ { "show_packets", 0, { .func_arg = &opt_show_packets }, "show packets info" },
+ { "show_programs", 0, { .func_arg = &opt_show_programs }, "show programs info" },
+ { "show_streams", 0, { .func_arg = &opt_show_streams }, "show streams info" },
+ { "show_chapters", 0, { .func_arg = &opt_show_chapters }, "show chapters info" },
{ "count_frames", OPT_BOOL, {(void*)&do_count_frames}, "count the number of frames per stream" },
{ "count_packets", OPT_BOOL, {(void*)&do_count_packets}, "count the number of packets per stream" },
- { "show_program_version", 0, {(void*)&opt_show_program_version}, "show ffprobe version" },
- { "show_library_versions", 0, {(void*)&opt_show_library_versions}, "show library versions" },
- { "show_versions", 0, {(void*)&opt_show_versions}, "show program and library versions" },
- { "show_pixel_formats", 0, {(void*)&opt_show_pixel_formats}, "show pixel format descriptions" },
+ { "show_program_version", 0, { .func_arg = &opt_show_program_version }, "show ffprobe version" },
+ { "show_library_versions", 0, { .func_arg = &opt_show_library_versions }, "show library versions" },
+ { "show_versions", 0, { .func_arg = &opt_show_versions }, "show program and library versions" },
+ { "show_pixel_formats", 0, { .func_arg = &opt_show_pixel_formats }, "show pixel format descriptions" },
{ "show_private_data", OPT_BOOL, {(void*)&show_private_data}, "show private data" },
{ "private", OPT_BOOL, {(void*)&show_private_data}, "same as show_private_data" },
{ "bitexact", OPT_BOOL, {&do_bitexact}, "force bitexact output" },