History

Implement a -pix_fmts option for listing all the supported pixel formats.

Originally committed as revision 20909 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 3f7bb421 parent dc7f38f4 files · +15 −0Browse files

Unified · Split

4 files
  1. cmdutils.c +5 −0
  2. cmdutils.h +6 −0
  3. cmdutils_common_opts.h +1 −0
  4. doc/fftools-common-opts.texi +3 −0
cmdutils.c+5−0
@@ -582,6 +582,11 @@ void show_filters(void) · 581 unmodified lines
582582 #endif
583583 }
584584
585+void show_pix_fmts(void)
586+{
587+ list_fmts(avcodec_pix_fmt_string, PIX_FMT_NB);
588+}
589+
585590 int read_yesno(void)
586591 {
587592 int c = getchar();
cmdutils.h+6−0
@@ -183,6 +183,12 @@ void show_bsfs(void); · 182 unmodified lines
183183 */
184184 void show_protocols(void);
185185
186+/**
187+ * Prints a listing containing all the pixel formats supported by the
188+ * program.
189+ */
190+void show_pix_fmts(void);
191+
186192 /**
187193 * Returns a positive value if reads from standard input a line
188194 * starting with [yY], otherwise returns 0.
cmdutils_common_opts.h+1−0
@@ -9,4 +9,5 @@ · 8 unmodified lines
99 { "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" },
1010 { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
1111 { "filters", OPT_EXIT, {(void*)show_filters }, "show available filters" },
12+ { "pix_fmts" , OPT_EXIT, {(void*)show_pix_fmts }, "show available pixel formats" },
1213 { "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
doc/fftools-common-opts.texi+3−0
@@ -46,6 +46,9 @@ Show available protocols. · 45 unmodified lines
4646 @item -filters
4747 Show available libavfilter filters.
4848
49+@item -pix_fmts
50+Show available pixel formats.
51+
4952 @item -loglevel @var{loglevel}
5053 Set the logging level used by the library.
5154 @var{loglevel} is a number or a string containing one of the following values:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t