[FFmpeg-cvslog] cmdutils: include type in filter list.

Nicolas George git at videolan.org
Thu Jan 19 23:45:28 CET 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Thu Jan 19 20:50:44 2012 +0100| [dcea7ca752e631baf96c0a5a490ae5285eb56004] | committer: Nicolas George

cmdutils: include type in filter list.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dcea7ca752e631baf96c0a5a490ae5285eb56004
---

 cmdutils.c |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 06eb3ad..386db3d 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -872,11 +872,31 @@ int opt_protocols(const char *opt, const char *arg)
 int opt_filters(const char *opt, const char *arg)
 {
     AVFilter av_unused(**filter) = NULL;
+    char descr[64], *descr_cur;
+    int i, j;
+    const AVFilterPad *pad;
 
     printf("Filters:\n");
 #if CONFIG_AVFILTER
-    while ((filter = av_filter_next(filter)) && *filter)
-        printf("%-16s %s\n", (*filter)->name, (*filter)->description);
+    while ((filter = av_filter_next(filter)) && *filter) {
+        descr_cur = descr;
+        for (i = 0; i < 2; i++) {
+            if (i) {
+                *(descr_cur++) = '-';
+                *(descr_cur++) = '>';
+            }
+            pad = i ? (*filter)->outputs : (*filter)->inputs;
+            for (j = 0; pad[j].name; j++) {
+                if (descr_cur >= descr + sizeof(descr) - 4)
+                    break;
+                *(descr_cur++) = get_media_type_char(pad[j].type);
+            }
+            if (!j)
+                *(descr_cur++) = '|';
+        }
+        *descr_cur = 0;
+        printf("%-16s %-10s %s\n", (*filter)->name, descr, (*filter)->description);
+    }
 #endif
     return 0;
 }



More information about the ffmpeg-cvslog mailing list