Skip to content

Commit

Permalink
Implement a -pix_fmts option for listing all the supported pixel
Browse files Browse the repository at this point in the history
formats.

Originally committed as revision 20909 to svn://svn.ffmpeg.org/ffmpeg/trunk
  • Loading branch information
Stefano Sabatini committed Dec 21, 2009
1 parent dc7f38f commit 3f7bb42
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmdutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,11 @@ void show_filters(void)
#endif
}

void show_pix_fmts(void)
{
list_fmts(avcodec_pix_fmt_string, PIX_FMT_NB);
}

int read_yesno(void)
{
int c = getchar();
Expand Down
6 changes: 6 additions & 0 deletions cmdutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ void show_bsfs(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
* starting with [yY], otherwise returns 0.
Expand Down
1 change: 1 addition & 0 deletions cmdutils_common_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
{ "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" },
{ "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
3 changes: 3 additions & 0 deletions doc/fftools-common-opts.texi
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ Show available protocols.
@item -filters
Show available libavfilter filters.

@item -pix_fmts
Show available pixel formats.

@item -loglevel @var{loglevel}
Set the logging level used by the library.
@var{loglevel} is a number or a string containing one of the following values:
Expand Down

0 comments on commit 3f7bb42

Please sign in to comment.