[FFmpeg-cvslog] r20909 - in trunk: cmdutils.c cmdutils.h cmdutils_common_opts.h doc/fftools-common-opts.texi

stefano subversion
Mon Dec 21 22:53:03 CET 2009


Author: stefano
Date: Mon Dec 21 22:53:03 2009
New Revision: 20909

Log:
Implement a -pix_fmts foption or listing all the supported pixel
formats.

Modified:
   trunk/cmdutils.c
   trunk/cmdutils.h
   trunk/cmdutils_common_opts.h
   trunk/doc/fftools-common-opts.texi

Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c	Mon Dec 21 22:50:23 2009	(r20908)
+++ trunk/cmdutils.c	Mon Dec 21 22:53:03 2009	(r20909)
@@ -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();

Modified: trunk/cmdutils.h
==============================================================================
--- trunk/cmdutils.h	Mon Dec 21 22:50:23 2009	(r20908)
+++ trunk/cmdutils.h	Mon Dec 21 22:53:03 2009	(r20909)
@@ -184,6 +184,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.
  */

Modified: trunk/cmdutils_common_opts.h
==============================================================================
--- trunk/cmdutils_common_opts.h	Mon Dec 21 22:50:23 2009	(r20908)
+++ trunk/cmdutils_common_opts.h	Mon Dec 21 22:53:03 2009	(r20909)
@@ -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" },

Modified: trunk/doc/fftools-common-opts.texi
==============================================================================
--- trunk/doc/fftools-common-opts.texi	Mon Dec 21 22:50:23 2009	(r20908)
+++ trunk/doc/fftools-common-opts.texi	Mon Dec 21 22:53:03 2009	(r20909)
@@ -46,6 +46,9 @@ Show available protocols.
 @item -filters
 Show available libavfilter filters.
 
+ at 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:



More information about the ffmpeg-cvslog mailing list