return 0;
}
-static void show_help(void)
+static int show_help(const char *opt, const char *arg)
{
int flags = AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM;
av_log_set_callback(log_callback_help);
show_help_children(avcodec_get_class(), flags);
show_help_children(avformat_get_class(), flags);
show_help_children(sws_get_class(), flags);
+ return 0;
}
void show_usage(void)
int refresh;
} VideoState;
-static void show_help(void);
+static int show_help(const char *opt, const char *arg);
/* options specified by the user */
static AVInputFormat *file_iformat;
printf("\n");
}
-static void show_help(void)
+static int show_help(const char *opt, const char *arg)
{
av_log_set_callback(log_callback_help);
show_usage();
"down/up seek backward/forward 1 minute\n"
"mouse click seek to percentage in file corresponding to fraction of width\n"
);
+
+ return 0;
}
static void opt_input_file(void *optctx, const char *filename)
input_filename = arg;
}
-static void show_help(void)
+static int show_help(const char *opt, const char *arg)
{
av_log_set_callback(log_callback_help);
show_usage();
show_help_options(options, "Main options:\n", 0, 0);
printf("\n");
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
+ return 0;
}
static void opt_pretty(void)
print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_VERBOSE);
}
-void show_version(void) {
+int show_version(const char *opt, const char *arg)
+{
av_log_set_callback(log_callback_help);
printf("%s " LIBAV_VERSION "\n", program_name);
print_all_libs_info(SHOW_VERSION, AV_LOG_INFO);
+
+ return 0;
}
-void show_license(void)
+int show_license(const char *opt, const char *arg)
{
printf(
#if CONFIG_NONFREE
program_name, program_name, program_name
#endif
);
+
+ return 0;
}
-void show_formats(void)
+int show_formats(const char *opt, const char *arg)
{
AVInputFormat *ifmt = NULL;
AVOutputFormat *ofmt = NULL;
name,
long_name ? long_name:" ");
}
+ return 0;
}
static char get_media_type_char(enum AVMediaType type)
printf(")");
}
-void show_codecs(void)
+int show_codecs(const char *opt, const char *arg)
{
const AVCodecDescriptor *desc = NULL;
printf("\n");
}
+ return 0;
}
static void print_codecs(int encoder)
return 0;
}
-void show_bsfs(void)
+int show_bsfs(const char *opt, const char *arg)
{
AVBitStreamFilter *bsf = NULL;
while ((bsf = av_bitstream_filter_next(bsf)))
printf("%s\n", bsf->name);
printf("\n");
+ return 0;
}
-void show_protocols(void)
+int show_protocols(const char *opt, const char *arg)
{
void *opaque = NULL;
const char *name;
printf("Output:\n");
while ((name = avio_enum_protocols(&opaque, 1)))
printf("%s\n", name);
+ return 0;
}
-void show_filters(void)
+int show_filters(const char *opt, const char *arg)
{
AVFilter av_unused(**filter) = NULL;
while ((filter = av_filter_next(filter)) && *filter)
printf("%-16s %s\n", (*filter)->name, (*filter)->description);
#endif
+ return 0;
}
-void show_pix_fmts(void)
+int show_pix_fmts(const char *opt, const char *arg)
{
enum PixelFormat pix_fmt;
pix_desc->nb_components,
av_get_bits_per_pixel(pix_desc));
}
+ return 0;
}
int show_sample_fmts(const char *opt, const char *arg)
* depends on the current versions of the repository and of the libav*
* libraries.
*/
-void show_version(void);
+int show_version(const char *opt, const char *arg);
/**
* Print the license of the program to stdout. The license depends on
* the license of the libraries compiled into the program.
*/
-void show_license(void);
+int show_license(const char *opt, const char *arg);
/**
* Print a listing containing all the formats supported by the
* program.
*/
-void show_formats(void);
+int show_formats(const char *opt, const char *arg);
/**
* Print a listing containing all the codecs supported by the
* program.
*/
-void show_codecs(void);
+int show_codecs(const char *opt, const char *arg);
/**
* Print a listing containing all the decoders supported by the
* Print a listing containing all the filters supported by the
* program.
*/
-void show_filters(void);
+int show_filters(const char *opt, const char *arg);
/**
* Print a listing containing all the bit stream filters supported by the
* program.
*/
-void show_bsfs(void);
+int show_bsfs(const char *opt, const char *arg);
/**
* Print a listing containing all the protocols supported by the
* program.
*/
-void show_protocols(void);
+int show_protocols(const char *opt, const char *arg);
/**
* Print a listing containing all the pixel formats supported by the
* program.
*/
-void show_pix_fmts(void);
+int show_pix_fmts(const char *opt, const char *arg);
/**
* Print a listing containing all the sample formats supported by the
- { "L", OPT_EXIT, {(void*)show_license}, "show license" },
- { "h", OPT_EXIT, {(void*)show_help}, "show help" },
- { "?", OPT_EXIT, {(void*)show_help}, "show help" },
- { "help", OPT_EXIT, {(void*)show_help}, "show help" },
- { "-help", OPT_EXIT, {(void*)show_help}, "show help" },
- { "version", OPT_EXIT, {(void*)show_version}, "show version" },
- { "formats" , OPT_EXIT, {(void*)show_formats }, "show available formats" },
- { "codecs" , OPT_EXIT, {(void*)show_codecs }, "show available codecs" },
- { "decoders" , OPT_EXIT, {(void*)show_decoders }, "show available decoders" },
- { "encoders" , OPT_EXIT, {(void*)show_encoders }, "show available encoders" },
- { "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" },
- { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
- { "filters", OPT_EXIT, {(void*)show_filters }, "show available filters" },
- { "pix_fmts" , OPT_EXIT, {(void*)show_pix_fmts }, "show available pixel formats" },
+ { "L" , OPT_EXIT, {.func_arg = show_license}, "show license" },
+ { "h" , OPT_EXIT, {.func_arg = show_help}, "show help" },
+ { "?" , OPT_EXIT, {.func_arg = show_help}, "show help" },
+ { "help" , OPT_EXIT, {.func_arg = show_help}, "show help" },
+ { "-help" , OPT_EXIT, {.func_arg = show_help}, "show help" },
+ { "version" , OPT_EXIT, {.func_arg = show_version}, "show version" },
+ { "formats" , OPT_EXIT, {.func_arg = show_formats }, "show available formats" },
+ { "codecs" , OPT_EXIT, {.func_arg = show_codecs }, "show available codecs" },
+ { "decoders" , OPT_EXIT, {.func_arg = show_decoders }, "show available decoders" },
+ { "encoders" , OPT_EXIT, {.func_arg = show_encoders }, "show available encoders" },
+ { "bsfs" , OPT_EXIT, {.func_arg = show_bsfs }, "show available bit stream filters" },
+ { "protocols" , OPT_EXIT, {.func_arg = show_protocols}, "show available protocols" },
+ { "filters" , OPT_EXIT, {.func_arg = show_filters }, "show available filters" },
+ { "pix_fmts" , OPT_EXIT, {.func_arg = show_pix_fmts }, "show available pixel formats" },
{ "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
- { "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
- { "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
+ { "loglevel" , HAS_ARG, {.func_arg = opt_loglevel}, "set libav* logging level", "loglevel" },
+ { "v", HAS_ARG, {.func_arg = opt_loglevel}, "set libav* logging level", "loglevel" },