| ... | ... |
@@ -872,11 +872,31 @@ int opt_protocols(const char *opt, const char *arg) |
| 872 | 872 |
int opt_filters(const char *opt, const char *arg) |
| 873 | 873 |
{
|
| 874 | 874 |
AVFilter av_unused(**filter) = NULL; |
| 875 |
+ char descr[64], *descr_cur; |
|
| 876 |
+ int i, j; |
|
| 877 |
+ const AVFilterPad *pad; |
|
| 875 | 878 |
|
| 876 | 879 |
printf("Filters:\n");
|
| 877 | 880 |
#if CONFIG_AVFILTER |
| 878 |
- while ((filter = av_filter_next(filter)) && *filter) |
|
| 879 |
- printf("%-16s %s\n", (*filter)->name, (*filter)->description);
|
|
| 881 |
+ while ((filter = av_filter_next(filter)) && *filter) {
|
|
| 882 |
+ descr_cur = descr; |
|
| 883 |
+ for (i = 0; i < 2; i++) {
|
|
| 884 |
+ if (i) {
|
|
| 885 |
+ *(descr_cur++) = '-'; |
|
| 886 |
+ *(descr_cur++) = '>'; |
|
| 887 |
+ } |
|
| 888 |
+ pad = i ? (*filter)->outputs : (*filter)->inputs; |
|
| 889 |
+ for (j = 0; pad[j].name; j++) {
|
|
| 890 |
+ if (descr_cur >= descr + sizeof(descr) - 4) |
|
| 891 |
+ break; |
|
| 892 |
+ *(descr_cur++) = get_media_type_char(pad[j].type); |
|
| 893 |
+ } |
|
| 894 |
+ if (!j) |
|
| 895 |
+ *(descr_cur++) = '|'; |
|
| 896 |
+ } |
|
| 897 |
+ *descr_cur = 0; |
|
| 898 |
+ printf("%-16s %-10s %s\n", (*filter)->name, descr, (*filter)->description);
|
|
| 899 |
+ } |
|
| 880 | 900 |
#endif |
| 881 | 901 |
return 0; |
| 882 | 902 |
} |