From 04e14ec8f69c66681808609046111bc225119e8e Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Wed, 12 Mar 2014 10:41:52 +0100 Subject: af: add metadata field to af_stream and af_instance This allows to propagate metadata information to audio filters. Closes #632 --- audio/filter/af.c | 1 + audio/filter/af.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'audio/filter') diff --git a/audio/filter/af.c b/audio/filter/af.c index fe21cc61ed..5a4838ca25 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -204,6 +204,7 @@ static struct af_instance *af_create(struct af_stream *s, char *name, .mul = 1, .data = talloc_zero(af, struct mp_audio), .log = mp_log_new(af, s->log, name), + .metadata = s->metadata, }; struct m_config *config = m_config_from_obj_desc(af, s->log, &desc); if (m_config_apply_defaults(config, name, s->opts->af_defs) < 0) diff --git a/audio/filter/af.h b/audio/filter/af.h index 6b0f0e9c01..9e424308b8 100644 --- a/audio/filter/af.h +++ b/audio/filter/af.h @@ -59,6 +59,7 @@ struct af_info { struct af_instance { const struct af_info *info; struct mp_log *log; + struct mp_tags *metadata; int (*control)(struct af_instance *af, int cmd, void *arg); void (*uninit)(struct af_instance *af); /* flags is a bit mask of AF_FILTER_FLAG_* values @@ -90,6 +91,7 @@ struct af_stream { struct mp_log *log; struct MPOpts *opts; + struct mp_tags *metadata; }; // Return values -- cgit v1.2.3