From 5f89b230c77af7823f48443bdd28899f616ded45 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 27 Aug 2020 11:41:42 +0200 Subject: filter: add a helper Not used yet; probably will, just dumping this to get it out of my sight. --- filters/filter.c | 5 +++++ filters/filter_internal.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'filters') diff --git a/filters/filter.c b/filters/filter.c index b7e6880d14..4134aff88b 100644 --- a/filters/filter.c +++ b/filters/filter.c @@ -512,6 +512,11 @@ const char *mp_filter_get_name(struct mp_filter *f) return f->in->name; } +const struct mp_filter_info *mp_filter_get_info(struct mp_filter *f) +{ + return f->in->info; +} + void mp_filter_set_name(struct mp_filter *f, const char *name) { talloc_free(f->in->name); diff --git a/filters/filter_internal.h b/filters/filter_internal.h index fe108e7470..02acef6254 100644 --- a/filters/filter_internal.h +++ b/filters/filter_internal.h @@ -98,6 +98,9 @@ struct mp_filter_info { bool (*command)(struct mp_filter *f, struct mp_filter_command *cmd); }; +// Return the mp_filter_info this filter was crated with. +const struct mp_filter_info *mp_filter_get_info(struct mp_filter *f); + // Create a filter instance. Returns NULL on failure. // Destroy/free with talloc_free(). // This is for filter implementers only. Filters are created with their own -- cgit v1.2.3