aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-01-19 20:50:44 +0100
committerNicolas George <nicolas.george@normalesup.org>2012-01-19 23:33:17 +0100
commitdcea7ca752e631baf96c0a5a490ae5285eb56004 (patch)
tree32cc60cc43714d89ecffe01eb87a5098b65bb037
parenta9575ffc6526496a1a0d96add6a9cbaed93a44b5 (diff)
downloadffmpeg-dcea7ca752e631baf96c0a5a490ae5285eb56004.tar.gz
cmdutils: include type in filter list.
-rw-r--r--cmdutils.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 06eb3ad558..386db3d48b 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;
}