mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
filter: add a helper
Not used yet; probably will, just dumping this to get it out of my sight.
This commit is contained in:
parent
a7413aff22
commit
5f89b230c7
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user