diff options
author | wm4 <wm4@nowhere> | 2020-08-27 11:41:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-08-27 11:55:20 +0200 |
commit | 5f89b230c77af7823f48443bdd28899f616ded45 (patch) | |
tree | cbb7f3077c8eab5b1c0b3dc225040a8b8f923a52 | |
parent | a7413aff22521ea471575613b936e437230d3f28 (diff) | |
download | mpv-5f89b230c77af7823f48443bdd28899f616ded45.tar.bz2 mpv-5f89b230c77af7823f48443bdd28899f616ded45.tar.xz |
filter: add a helper
Not used yet; probably will, just dumping this to get it out of my
sight.
-rw-r--r-- | filters/filter.c | 5 | ||||
-rw-r--r-- | filters/filter_internal.h | 3 |
2 files changed, 8 insertions, 0 deletions
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 |