summaryrefslogtreecommitdiffstats
path: root/audio/filter/af.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/filter/af.c')
-rw-r--r--audio/filter/af.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c
index ba08c1ed9b..3f73ad9c58 100644
--- a/audio/filter/af.c
+++ b/audio/filter/af.c
@@ -695,6 +695,18 @@ void af_control_all(struct af_stream *s, int cmd, void *arg)
af->control(af, cmd, arg);
}
+int af_control_by_label(struct af_stream *s, int cmd, void *arg, bstr label)
+{
+ char *label_str = bstrdup0(NULL, label);
+ struct af_instance *cur = af_find_by_label(s, label_str);
+ talloc_free(label_str);
+ if (cur) {
+ return cur->control ? cur->control(cur, cmd, arg) : CONTROL_NA;
+ } else {
+ return CONTROL_UNKNOWN;
+ }
+}
+
// Used by filters to add a filtered frame to the output queue.
// Ownership of frame is transferred from caller to the filter chain.
void af_add_output_frame(struct af_instance *af, struct mp_audio *frame)