summaryrefslogtreecommitdiffstats
path: root/filters/f_autoconvert.h
diff options
context:
space:
mode:
Diffstat (limited to 'filters/f_autoconvert.h')
-rw-r--r--filters/f_autoconvert.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/filters/f_autoconvert.h b/filters/f_autoconvert.h
index 77e07aecf1..4cd0cb3d6d 100644
--- a/filters/f_autoconvert.h
+++ b/filters/f_autoconvert.h
@@ -8,6 +8,13 @@
struct mp_autoconvert {
// f->pins[0] is input, f->pins[1] is output
struct mp_filter *f;
+
+ // If this is set, the callback is invoked (from the process function), and
+ // further data flow is blocked until mp_autoconvert_format_change_continue()
+ // is called. The idea is that you can reselect the output parameters on
+ // format changes and continue filtering when ready.
+ void (*on_audio_format_change)(void *opaque);
+ void *on_audio_format_change_opaque;
};
// (to free this, free the filter itself, mp_autoconvert.f)
@@ -46,5 +53,8 @@ void mp_autoconvert_add_srate(struct mp_autoconvert *c, int rate);
// filter.)
void mp_autoconvert_clear(struct mp_autoconvert *c);
+// See mp_autoconvert.on_audio_format_change.
+void mp_autoconvert_format_change_continue(struct mp_autoconvert *c);
+
// vf_d3d11vpp.c
struct mp_filter *vf_d3d11_create_outconv(struct mp_filter *parent);