Browse code

cmdutils: slightly better -filters output.

Clément Bœsch authored on 2013/04/17 18:31:49
Showing 1 changed files
... ...
@@ -1453,7 +1453,11 @@ int show_filters(void *optctx, const char *opt, const char *arg)
1453 1453
     int i, j;
1454 1454
     const AVFilterPad *pad;
1455 1455
 
1456
-    printf("Filters:\n");
1456
+    printf("Filters:\n"
1457
+           "  A = Audio input/output\n"
1458
+           "  V = Video input/output\n"
1459
+           "  N = Dynamic number and/or type of input/output\n"
1460
+           "  | = Source or sink filter\n");
1457 1461
 #if CONFIG_AVFILTER
1458 1462
     while ((filter = avfilter_next(filter))) {
1459 1463
         descr_cur = descr;
... ...
@@ -1469,7 +1473,8 @@ int show_filters(void *optctx, const char *opt, const char *arg)
1469 1469
                 *(descr_cur++) = get_media_type_char(pad[j].type);
1470 1470
             }
1471 1471
             if (!j)
1472
-                *(descr_cur++) = '|';
1472
+                *(descr_cur++) = ((!i && (filter->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)) ||
1473
+                                  ( i && (filter->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS))) ? 'N' : '|';
1473 1474
         }
1474 1475
         *descr_cur = 0;
1475 1476
         printf("%-16s %-10s %s\n", filter->name, descr, filter->description);