diff options
author | wm4 <wm4@nowhere> | 2014-10-02 02:50:12 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-02 02:50:12 +0200 |
commit | b5942f80de481cabab07ce1cee7a2b6a537b4c93 (patch) | |
tree | 340acbf55f1da640c45834a6f37e9398b542da5d /audio/filter/af.h | |
parent | c3e2a1febc1610517c7de2a5f57632b83cefa3e8 (diff) | |
download | mpv-b5942f80de481cabab07ce1cee7a2b6a537b4c93.tar.bz2 mpv-b5942f80de481cabab07ce1cee7a2b6a537b4c93.tar.xz |
audio/filter: allow removing filters by label
Although the "af" command already could do this, it seems it's better
to introduce a lower level mechanism for now. This avoids some messy
issues, since that code would recursive call reinit_audio_chain().
To be used by the next commit.
Diffstat (limited to 'audio/filter/af.h')
-rw-r--r-- | audio/filter/af.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/filter/af.h b/audio/filter/af.h index 579ac271ef..b95039b4d0 100644 --- a/audio/filter/af.h +++ b/audio/filter/af.h @@ -76,6 +76,7 @@ struct af_instance { * the number of samples passed though. (Ratio of input * and output, e.g. mul=4 => 1 sample becomes 4 samples) .*/ bool auto_inserted; // inserted by af.c, such as conversion filters + char *label; }; // Current audio stream @@ -132,6 +133,8 @@ void af_destroy(struct af_stream *s); int af_init(struct af_stream *s); void af_uninit(struct af_stream *s); struct af_instance *af_add(struct af_stream *s, char *name, char **args); +int af_remove_by_label(struct af_stream *s, char *label); +struct af_instance *af_find_by_label(struct af_stream *s, char *label); int af_filter(struct af_stream *s, struct mp_audio *data, int flags); struct af_instance *af_control_any_rev(struct af_stream *s, int cmd, void *arg); void af_control_all(struct af_stream *s, int cmd, void *arg); |