summaryrefslogtreecommitdiffstats
path: root/audio/filter/af.c
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2016-02-28 23:31:51 +0100
committerMartin Herkt <lachs0r@srsfckn.biz>2016-02-28 23:31:51 +0100
commit21cd4ff05bb46b375a9ad38c9f0b7f8e71a5d979 (patch)
treeb9679cc1d2c7c3cab0f88c370015f34f6d0b27ca /audio/filter/af.c
parentd1d6257731866934717353fce484f5f472f845d1 (diff)
parent1f436f65f2ee4df6419ca68bd6426b8283db6d22 (diff)
downloadmpv-21cd4ff05bb46b375a9ad38c9f0b7f8e71a5d979.tar.bz2
mpv-21cd4ff05bb46b375a9ad38c9f0b7f8e71a5d979.tar.xz
Merge branch 'master' into release/current
Diffstat (limited to 'audio/filter/af.c')
-rw-r--r--audio/filter/af.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c
index 7ff3b49ae8..ac1b4926d8 100644
--- a/audio/filter/af.c
+++ b/audio/filter/af.c
@@ -59,9 +59,7 @@ static const struct af_info *const filter_list[] = {
&af_info_rubberband,
#endif
&af_info_scaletempo,
-#if HAVE_LIBAVFILTER
&af_info_lavfi,
-#endif
NULL
};
@@ -166,6 +164,7 @@ static struct af_instance *af_create(struct af_stream *s, char *name,
.info = desc.p,
.data = talloc_zero(af, struct mp_audio),
.log = mp_log_new(af, s->log, name),
+ .opts = s->opts,
.replaygain_data = s->replaygain_data,
.out_pool = mp_audio_pool_create(af),
};
@@ -695,6 +694,17 @@ int af_control_by_label(struct af_stream *s, int cmd, void *arg, bstr label)
}
}
+int af_send_command(struct af_stream *s, char *label, char *cmd, char *arg)
+{
+ char *args[2] = {cmd, arg};
+ if (strcmp(label, "all") == 0) {
+ af_control_all(s, AF_CONTROL_COMMAND, args);
+ return 0;
+ } else {
+ return af_control_by_label(s, AF_CONTROL_COMMAND, args, bstr0(label));
+ }
+}
+
// 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)