Commit 3f7bb426 authored by Stefano Sabatini's avatar Stefano Sabatini

Implement a -pix_fmts option for listing all the supported pixel

formats.

Originally committed as revision 20909 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent dc7f38f5
...@@ -582,6 +582,11 @@ void show_filters(void) ...@@ -582,6 +582,11 @@ void show_filters(void)
#endif #endif
} }
void show_pix_fmts(void)
{
list_fmts(avcodec_pix_fmt_string, PIX_FMT_NB);
}
int read_yesno(void) int read_yesno(void)
{ {
int c = getchar(); int c = getchar();
......
...@@ -183,6 +183,12 @@ void show_bsfs(void); ...@@ -183,6 +183,12 @@ void show_bsfs(void);
*/ */
void show_protocols(void); void show_protocols(void);
/**
* Prints a listing containing all the pixel formats supported by the
* program.
*/
void show_pix_fmts(void);
/** /**
* Returns a positive value if reads from standard input a line * Returns a positive value if reads from standard input a line
* starting with [yY], otherwise returns 0. * starting with [yY], otherwise returns 0.
......
...@@ -9,4 +9,5 @@ ...@@ -9,4 +9,5 @@
{ "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" }, { "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" },
{ "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" }, { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
{ "filters", OPT_EXIT, {(void*)show_filters }, "show available filters" }, { "filters", OPT_EXIT, {(void*)show_filters }, "show available filters" },
{ "pix_fmts" , OPT_EXIT, {(void*)show_pix_fmts }, "show available pixel formats" },
{ "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" }, { "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
...@@ -46,6 +46,9 @@ Show available protocols. ...@@ -46,6 +46,9 @@ Show available protocols.
@item -filters @item -filters
Show available libavfilter filters. Show available libavfilter filters.
@item -pix_fmts
Show available pixel formats.
@item -loglevel @var{loglevel} @item -loglevel @var{loglevel}
Set the logging level used by the library. Set the logging level used by the library.
@var{loglevel} is a number or a string containing one of the following values: @var{loglevel} is a number or a string containing one of the following values:
......
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