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)
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);
print_program_info (0 , AV_LOG_INFO);
print_all_libs_info(SHOW_VERSION, AV_LOG_INFO);
return 0;
}
int opt_license(const char *opt, const char *arg)
int show_license(const char *opt, const char *arg)
{
printf(
#if CONFIG_NONFREE
......@@ -748,10 +750,11 @@ int opt_license(const char *opt, const char *arg)
program_name, program_name, program_name
#endif
);
return 0;
}
int opt_formats(const char *opt, const char *arg)
int show_formats(const char *opt, const char *arg)
{
AVInputFormat *ifmt = NULL;
AVOutputFormat *ofmt = NULL;
......@@ -925,7 +928,7 @@ int show_encoders(const char *opt, const char *arg)
return 0;
}
int opt_bsfs(const char *opt, const char *arg)
int show_bsfs(const char *opt, const char *arg)
{
AVBitStreamFilter *bsf = NULL;
......@@ -936,7 +939,7 @@ int opt_bsfs(const char *opt, const char *arg)
return 0;
}
int opt_protocols(const char *opt, const char *arg)
int show_protocols(const char *opt, const char *arg)
{
void *opaque = NULL;
const char *name;
......@@ -951,7 +954,7 @@ int opt_protocols(const char *opt, const char *arg)
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;
char descr[64], *descr_cur;
......@@ -983,7 +986,7 @@ int opt_filters(const char *opt, const char *arg)
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;
......
......@@ -277,21 +277,21 @@ void show_banner(int argc, char **argv, const OptionDef *options);
* libraries.
* 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
* the license of the libraries compiled into the program.
* 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
* program.
* 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
......@@ -317,28 +317,28 @@ int show_encoders(const char *opt, const char *arg);
* program.
* 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
* program.
* 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
* program.
* 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
* program.
* 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
......
{ "L", OPT_EXIT, {(void*)opt_license}, "show license" },
{ "h", OPT_EXIT, {(void*)opt_help}, "show help" },
{ "?", OPT_EXIT, {(void*)opt_help}, "show help" },
{ "help", OPT_EXIT, {(void*)opt_help}, "show help" },
{ "-help", OPT_EXIT, {(void*)opt_help}, "show help" },
{ "version", OPT_EXIT, {(void*)opt_version}, "show version" },
{ "formats" , OPT_EXIT, {(void*)opt_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*)opt_bsfs }, "show available bit stream filters" },
{ "protocols", OPT_EXIT, {(void*)opt_protocols}, "show available protocols" },
{ "filters", OPT_EXIT, {(void*)opt_filters }, "show available filters" },
{ "pix_fmts" , OPT_EXIT, {(void*)opt_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" },
{ "debug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" },
{ "fdebug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" },
{ "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" },
{ "cpuflags", HAS_ARG | OPT_EXPERT, {(void*)opt_cpuflags}, "force specific cpu flags", "flags" },
{ "loglevel" , HAS_ARG, {.func_arg = opt_loglevel}, "set libav* logging level", "loglevel" },
{ "v", HAS_ARG, {.func_arg = opt_loglevel}, "set libav* logging level", "loglevel" },
{ "debug" , HAS_ARG, {.func_arg = 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" },
{ "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" },
This diff is collapsed.
......@@ -244,7 +244,7 @@ typedef struct AllocEventProps {
AVFrame *frame;
} 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 */
static AVInputFormat *file_iformat;
......@@ -3023,7 +3023,7 @@ static void show_usage(void)
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);
show_usage();
......
......@@ -2072,7 +2072,7 @@ static void opt_input_file(void *optctx, const char *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);
show_usage();
......@@ -2080,7 +2080,6 @@ static int opt_help(const char *opt, const char *arg)
printf("\n");
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
return 0;
}
......
......@@ -4645,7 +4645,7 @@ static void opt_debug(void)
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"
"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