Commit 8447f0bd authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

Split show_formats().

Originally committed as revision 20553 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent b711aaa2
......@@ -417,9 +417,6 @@ void show_formats(void)
{
AVInputFormat *ifmt=NULL;
AVOutputFormat *ofmt=NULL;
URLProtocol *up=NULL;
AVCodec *p=NULL, *p2;
AVBitStreamFilter *bsf=NULL;
const char *last_name;
printf(
......@@ -463,8 +460,12 @@ void show_formats(void)
name,
long_name ? long_name:" ");
}
printf("\n");
}
void show_codecs(void)
{
AVCodec *p=NULL, *p2;
const char *last_name;
printf(
"Codecs:\n"
" D..... = Decoding supported\n"
......@@ -529,11 +530,27 @@ void show_formats(void)
printf("\n");
}
printf("\n");
printf(
"Note, the names of encoders and decoders do not always match, so there are\n"
"several cases where the above table shows encoder only or decoder only entries\n"
"even though both encoding and decoding are supported. For example, the h263\n"
"decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
"worse.\n");
}
void show_bsfs(void)
{
AVBitStreamFilter *bsf=NULL;
printf("Bitstream filters:\n");
while((bsf = av_bitstream_filter_next(bsf)))
printf("%s\n", bsf->name);
printf("\n");
}
void show_protocols(void)
{
URLProtocol *up=NULL;
printf("Supported file protocols:\n");
while((up = av_protocol_next(up)))
......@@ -541,13 +558,6 @@ void show_formats(void)
printf("\n");
printf("Frame size, frame rate abbreviations:\n ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif\n");
printf("\n");
printf(
"Note, the names of encoders and decoders do not always match, so there are\n"
"several cases where the above table shows encoder only or decoder only entries\n"
"even though both encoding and decoding are supported. For example, the h263\n"
"decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
"worse.\n");
}
int read_yesno(void)
......
......@@ -157,6 +157,24 @@ void show_license(void);
*/
void show_formats(void);
/**
* Prints a listing containing all the codecs supported by the
* program.
*/
void show_codecs(void);
/**
* Prints a listing containing all the bit stream filters supported by the
* program.
*/
void show_bsfs(void);
/**
* Prints a listing containing all the protocols supported by the
* program.
*/
void show_protocols(void);
/**
* Returns a positive value if reads from standard input a line
* starting with [yY], otherwise returns 0.
......
......@@ -3828,7 +3828,10 @@ static const OptionDef options[] = {
{ "L", OPT_EXIT, {(void*)show_license}, "show license" },
{ "h", 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, protocols, ..." },
{ "formats" , OPT_EXIT, {(void*)show_formats }, "show available formats" },
{ "codecs" , OPT_EXIT, {(void*)show_codecs }, "show available codecs" },
{ "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" },
{ "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
{ "f", HAS_ARG, {(void*)opt_format}, "force format", "fmt" },
{ "i", HAS_ARG, {(void*)opt_input_file}, "input file name", "filename" },
{ "y", OPT_BOOL, {(void*)&file_overwrite}, "overwrite output files" },
......
......@@ -2456,7 +2456,10 @@ static const OptionDef options[] = {
{ "h", OPT_EXIT, {(void*)show_help}, "show help" },
{ "version", OPT_EXIT, {(void*)show_version}, "show version" },
{ "L", OPT_EXIT, {(void*)show_license}, "show license" },
{ "formats", OPT_EXIT, {(void*)show_formats}, "show available formats, codecs, protocols, ..." },
{ "formats" , OPT_EXIT, {(void*)show_formats }, "show available formats" },
{ "codecs" , OPT_EXIT, {(void*)show_codecs }, "show available codecs" },
{ "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" },
{ "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
{ "x", HAS_ARG | OPT_FUNC2, {(void*)opt_width}, "force displayed width", "width" },
{ "y", HAS_ARG | OPT_FUNC2, {(void*)opt_height}, "force displayed height", "height" },
{ "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" },
......
......@@ -4475,7 +4475,10 @@ static const OptionDef options[] = {
{ "h", OPT_EXIT, {(void*)opt_show_help}, "show help" },
{ "version", OPT_EXIT, {(void*)show_version}, "show version" },
{ "L", OPT_EXIT, {(void*)show_license}, "show license" },
{ "formats", OPT_EXIT, {(void*)show_formats}, "show available formats, codecs, protocols, ..." },
{ "formats" , OPT_EXIT, {(void*)show_formats }, "show available formats" },
{ "codecs" , OPT_EXIT, {(void*)show_codecs }, "show available codecs" },
{ "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" },
{ "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
{ "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
{ "n", OPT_BOOL, {(void *)&no_launch }, "enable no-launch mode" },
{ "d", 0, {(void*)opt_debug}, "enable debug mode" },
......
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