filter: add a helper

Not used yet; probably will, just dumping this to get it out of my
sight.
This commit is contained in:
wm4 2020-08-27 11:41:42 +02:00
parent a7413aff22
commit 5f89b230c7
2 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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