Commit 927022a7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'd3810c47'

* commit 'd3810c47':
  avconv: get rid of ugly casts in the options table.
  avconv: try to match codecs by codec descriptor name as a last resort.
  avtools: fix show_foo() signatures.

Conflicts:
	cmdutils.c
	cmdutils.h
	cmdutils_common_opts.h
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a5a0dedf d3810c47
...@@ -674,14 +674,16 @@ void show_banner(int argc, char **argv, const OptionDef *options) ...@@ -674,14 +674,16 @@ void show_banner(int argc, char **argv, const OptionDef *options)
print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_INFO); print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_INFO);
} }
int opt_version(const char *opt, const char *arg) { int show_version(const char *opt, const char *arg)
{
av_log_set_callback(log_callback_help); av_log_set_callback(log_callback_help);
print_program_info (0 , AV_LOG_INFO); print_program_info (0 , AV_LOG_INFO);
print_all_libs_info(SHOW_VERSION, AV_LOG_INFO); print_all_libs_info(SHOW_VERSION, AV_LOG_INFO);
return 0; return 0;
} }
int opt_license(const char *opt, const char *arg) int show_license(const char *opt, const char *arg)
{ {
printf( printf(
#if CONFIG_NONFREE #if CONFIG_NONFREE
...@@ -748,10 +750,11 @@ int opt_license(const char *opt, const char *arg) ...@@ -748,10 +750,11 @@ int opt_license(const char *opt, const char *arg)
program_name, program_name, program_name program_name, program_name, program_name
#endif #endif
); );
return 0; return 0;
} }
int opt_formats(const char *opt, const char *arg) int show_formats(const char *opt, const char *arg)
{ {
AVInputFormat *ifmt = NULL; AVInputFormat *ifmt = NULL;
AVOutputFormat *ofmt = NULL; AVOutputFormat *ofmt = NULL;
...@@ -925,7 +928,7 @@ int show_encoders(const char *opt, const char *arg) ...@@ -925,7 +928,7 @@ int show_encoders(const char *opt, const char *arg)
return 0; return 0;
} }
int opt_bsfs(const char *opt, const char *arg) int show_bsfs(const char *opt, const char *arg)
{ {
AVBitStreamFilter *bsf = NULL; AVBitStreamFilter *bsf = NULL;
...@@ -936,7 +939,7 @@ int opt_bsfs(const char *opt, const char *arg) ...@@ -936,7 +939,7 @@ int opt_bsfs(const char *opt, const char *arg)
return 0; return 0;
} }
int opt_protocols(const char *opt, const char *arg) int show_protocols(const char *opt, const char *arg)
{ {
void *opaque = NULL; void *opaque = NULL;
const char *name; const char *name;
...@@ -951,7 +954,7 @@ int opt_protocols(const char *opt, const char *arg) ...@@ -951,7 +954,7 @@ int opt_protocols(const char *opt, const char *arg)
return 0; return 0;
} }
int opt_filters(const char *opt, const char *arg) int show_filters(const char *opt, const char *arg)
{ {
AVFilter av_unused(**filter) = NULL; AVFilter av_unused(**filter) = NULL;
char descr[64], *descr_cur; char descr[64], *descr_cur;
...@@ -983,7 +986,7 @@ int opt_filters(const char *opt, const char *arg) ...@@ -983,7 +986,7 @@ int opt_filters(const char *opt, const char *arg)
return 0; return 0;
} }
int opt_pix_fmts(const char *opt, const char *arg) int show_pix_fmts(const char *opt, const char *arg)
{ {
enum PixelFormat pix_fmt; enum PixelFormat pix_fmt;
......
...@@ -277,21 +277,21 @@ void show_banner(int argc, char **argv, const OptionDef *options); ...@@ -277,21 +277,21 @@ void show_banner(int argc, char **argv, const OptionDef *options);
* libraries. * libraries.
* This option processing function does not utilize the arguments. * This option processing function does not utilize the arguments.
*/ */
int opt_version(const char *opt, const char *arg); int show_version(const char *opt, const char *arg);
/** /**
* Print the license of the program to stdout. The license depends on * Print the license of the program to stdout. The license depends on
* the license of the libraries compiled into the program. * the license of the libraries compiled into the program.
* This option processing function does not utilize the arguments. * This option processing function does not utilize the arguments.
*/ */
int opt_license(const char *opt, const char *arg); int show_license(const char *opt, const char *arg);
/** /**
* Print a listing containing all the formats supported by the * Print a listing containing all the formats supported by the
* program. * program.
* This option processing function does not utilize the arguments. * This option processing function does not utilize the arguments.
*/ */
int opt_formats(const char *opt, const char *arg); int show_formats(const char *opt, const char *arg);
/** /**
* Print a listing containing all the codecs supported by the * Print a listing containing all the codecs supported by the
...@@ -317,28 +317,28 @@ int show_encoders(const char *opt, const char *arg); ...@@ -317,28 +317,28 @@ int show_encoders(const char *opt, const char *arg);
* program. * program.
* This option processing function does not utilize the arguments. * This option processing function does not utilize the arguments.
*/ */
int opt_filters(const char *opt, const char *arg); int show_filters(const char *opt, const char *arg);
/** /**
* Print a listing containing all the bit stream filters supported by the * Print a listing containing all the bit stream filters supported by the
* program. * program.
* This option processing function does not utilize the arguments. * This option processing function does not utilize the arguments.
*/ */
int opt_bsfs(const char *opt, const char *arg); int show_bsfs(const char *opt, const char *arg);
/** /**
* Print a listing containing all the protocols supported by the * Print a listing containing all the protocols supported by the
* program. * program.
* This option processing function does not utilize the arguments. * This option processing function does not utilize the arguments.
*/ */
int opt_protocols(const char *opt, const char *arg); int show_protocols(const char *opt, const char *arg);
/** /**
* Print a listing containing all the pixel formats supported by the * Print a listing containing all the pixel formats supported by the
* program. * program.
* This option processing function does not utilize the arguments. * This option processing function does not utilize the arguments.
*/ */
int opt_pix_fmts(const char *opt, const char *arg); int show_pix_fmts(const char *opt, const char *arg);
/** /**
* Print a listing containing all the sample formats supported by the * Print a listing containing all the sample formats supported by the
......
{ "L", OPT_EXIT, {(void*)opt_license}, "show license" }, { "L" , OPT_EXIT, {.func_arg = show_license}, "show license" },
{ "h", OPT_EXIT, {(void*)opt_help}, "show help" }, { "h" , OPT_EXIT, {.func_arg = show_help}, "show help" },
{ "?", OPT_EXIT, {(void*)opt_help}, "show help" }, { "?" , OPT_EXIT, {.func_arg = show_help}, "show help" },
{ "help", OPT_EXIT, {(void*)opt_help}, "show help" }, { "help" , OPT_EXIT, {.func_arg = show_help}, "show help" },
{ "-help", OPT_EXIT, {(void*)opt_help}, "show help" }, { "-help" , OPT_EXIT, {.func_arg = show_help}, "show help" },
{ "version", OPT_EXIT, {(void*)opt_version}, "show version" }, { "version" , OPT_EXIT, {.func_arg = show_version}, "show version" },
{ "formats" , OPT_EXIT, {(void*)opt_formats }, "show available formats" }, { "formats" , OPT_EXIT, {.func_arg = show_formats }, "show available formats" },
{ "codecs" , OPT_EXIT, {(void*)show_codecs }, "show available codecs" }, { "codecs" , OPT_EXIT, {.func_arg = show_codecs }, "show available codecs" },
{ "decoders" , OPT_EXIT, {(void*)show_decoders }, "show available decoders" }, { "decoders" , OPT_EXIT, {.func_arg = show_decoders }, "show available decoders" },
{ "encoders" , OPT_EXIT, {(void*)show_encoders }, "show available encoders" }, { "encoders" , OPT_EXIT, {.func_arg = show_encoders }, "show available encoders" },
{ "bsfs" , OPT_EXIT, {(void*)opt_bsfs }, "show available bit stream filters" }, { "bsfs" , OPT_EXIT, {.func_arg = show_bsfs }, "show available bit stream filters" },
{ "protocols", OPT_EXIT, {(void*)opt_protocols}, "show available protocols" }, { "protocols" , OPT_EXIT, {.func_arg = show_protocols}, "show available protocols" },
{ "filters", OPT_EXIT, {(void*)opt_filters }, "show available filters" }, { "filters" , OPT_EXIT, {.func_arg = show_filters }, "show available filters" },
{ "pix_fmts" , OPT_EXIT, {(void*)opt_pix_fmts }, "show available pixel formats" }, { "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" }, { "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" }, { "loglevel" , HAS_ARG, {.func_arg = opt_loglevel}, "set libav* logging level", "loglevel" },
{ "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" }, { "v", HAS_ARG, {.func_arg = opt_loglevel}, "set libav* logging level", "loglevel" },
{ "debug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" }, { "debug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" },
{ "fdebug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" }, { "fdebug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" },
{ "report", 0, {(void*)opt_report}, "generate a report" }, { "report" , 0, {(void*)opt_report}, "generate a report" },
{ "max_alloc", HAS_ARG, {(void*)opt_max_alloc}, "set maximum size of a single allocated block", "bytes" }, { "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
{ "cpuflags", HAS_ARG | OPT_EXPERT, {(void*)opt_cpuflags}, "force specific cpu flags", "flags" }, { "cpuflags" , HAS_ARG | OPT_EXPERT, {.func_arg = opt_cpuflags}, "force specific cpu flags", "flags" },
This diff is collapsed.
...@@ -244,7 +244,7 @@ typedef struct AllocEventProps { ...@@ -244,7 +244,7 @@ typedef struct AllocEventProps {
AVFrame *frame; AVFrame *frame;
} AllocEventProps; } AllocEventProps;
static int opt_help(const char *opt, const char *arg); static int show_help(const char *opt, const char *arg);
/* options specified by the user */ /* options specified by the user */
static AVInputFormat *file_iformat; static AVInputFormat *file_iformat;
...@@ -3023,7 +3023,7 @@ static void show_usage(void) ...@@ -3023,7 +3023,7 @@ static void show_usage(void)
av_log(NULL, AV_LOG_INFO, "\n"); av_log(NULL, AV_LOG_INFO, "\n");
} }
static int opt_help(const char *opt, const char *arg) static int show_help(const char *opt, const char *arg)
{ {
av_log_set_callback(log_callback_help); av_log_set_callback(log_callback_help);
show_usage(); show_usage();
......
...@@ -2072,7 +2072,7 @@ static void opt_input_file(void *optctx, const char *arg) ...@@ -2072,7 +2072,7 @@ static void opt_input_file(void *optctx, const char *arg)
input_filename = arg; input_filename = arg;
} }
static int opt_help(const char *opt, const char *arg) static int show_help(const char *opt, const char *arg)
{ {
av_log_set_callback(log_callback_help); av_log_set_callback(log_callback_help);
show_usage(); show_usage();
...@@ -2080,7 +2080,6 @@ static int opt_help(const char *opt, const char *arg) ...@@ -2080,7 +2080,6 @@ static int opt_help(const char *opt, const char *arg)
printf("\n"); printf("\n");
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM); show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
return 0; return 0;
} }
......
...@@ -4645,7 +4645,7 @@ static void opt_debug(void) ...@@ -4645,7 +4645,7 @@ static void opt_debug(void)
logfilename[0] = '-'; logfilename[0] = '-';
} }
static int opt_help(const char *opt, const char *arg) static int show_help(const char *opt, const char *arg)
{ {
printf("usage: ffserver [options]\n" printf("usage: ffserver [options]\n"
"Hyper fast multi format Audio/Video streaming server\n"); "Hyper fast multi format Audio/Video streaming server\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment