Browse Source

Implement a -filters option, listing all the available libavfilter
filters.
Currently filters are not registered, so the option will show none.

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

Stefano Sabatini 15 years ago
parent
commit
62d7566239
6 changed files with 23 additions and 0 deletions
  1. 9 0
      cmdutils.c
  2. 6 0
      cmdutils.h
  3. 1 0
      cmdutils_common_opts.h
  4. 3 0
      doc/ffmpeg-doc.texi
  5. 2 0
      doc/ffplay-doc.texi
  6. 2 0
      doc/ffserver-doc.texi

+ 9 - 0
cmdutils.c

@@ -560,6 +560,15 @@ void show_protocols(void)
     printf("Frame size, frame rate abbreviations:\n ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif\n");
 }
 
+void show_filters(void)
+{
+    AVFilter **filter = NULL;
+
+    printf("Filters:\n");
+    while ((filter = av_filter_next(filter)) && *filter)
+        printf("%-16s %s\n", (*filter)->name, (*filter)->description);
+}
+
 int read_yesno(void)
 {
     int c = getchar();

+ 6 - 0
cmdutils.h

@@ -163,6 +163,12 @@ void show_formats(void);
  */
 void show_codecs(void);
 
+/**
+ * Prints a listing containing all the filters supported by the
+ * program.
+ */
+void show_filters(void);
+
 /**
  * Prints a listing containing all the bit stream filters supported by the
  * program.

+ 1 - 0
cmdutils_common_opts.h

@@ -5,4 +5,5 @@
     { "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" },
+    { "filters",   OPT_EXIT, {(void*)show_filters  }, "show available filters" },
     { "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },

+ 3 - 0
doc/ffmpeg-doc.texi

@@ -270,6 +270,9 @@ Show available bitstream filters.
 @item -protocols
 Show available protocols.
 
+@item -filters
+Show available libavfilter filters.
+
 @item -f @var{fmt}
 Force format.
 

+ 2 - 0
doc/ffplay-doc.texi

@@ -43,6 +43,8 @@ Show available codecs.
 Show available bitstream filters.
 @item -protocols
 Show available protocols.
+@item -filters
+Show available libavfilter filters.
 @item -x @var{width}
 Force displayed width.
 @item -y @var{height}

+ 2 - 0
doc/ffserver-doc.texi

@@ -249,6 +249,8 @@ Show available codecs.
 Show available bitstream filters.
 @item -protocols
 Show available protocols.
+@item -filters
+Show available libavfilter filters.
 @item -h
 Show help.
 @item -loglevel @var{loglevel}