summaryrefslogtreecommitdiffstats
path: root/filters/f_utils.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-02 21:09:30 +0200
committerwm4 <wm4@nowhere>2019-10-02 21:09:30 +0200
commit61961d03f6aed7eb77eca34840e90342b86e92c9 (patch)
tree351d87eb358834633206c93ff7ef3c5f2b1b9244 /filters/f_utils.c
parent95e13e3d3e3f00ee574477e3abe3c2f497e341cb (diff)
downloadmpv-61961d03f6aed7eb77eca34840e90342b86e92c9.tar.bz2
mpv-61961d03f6aed7eb77eca34840e90342b86e92c9.tar.xz
filters: add another dumb helper
Can be used with mp_chain_filters() to combine multiple filters into a single one. This is a bit silly, but whatever. I'm making it an explicit separate filter, because it lets the user access mp_filter.ppins against all conventions.
Diffstat (limited to 'filters/f_utils.c')
-rw-r--r--filters/f_utils.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/filters/f_utils.c b/filters/f_utils.c
index 826f527a0b..1b5b0e548e 100644
--- a/filters/f_utils.c
+++ b/filters/f_utils.c
@@ -178,6 +178,22 @@ struct mp_filter *mp_bidir_nop_filter_create(struct mp_filter *parent)
return f;
}
+static const struct mp_filter_info bidir_dummy_filter = {
+ .name = "dummy",
+};
+
+struct mp_filter *mp_bidir_dummy_filter_create(struct mp_filter *parent)
+{
+ struct mp_filter *f = mp_filter_create(parent, &bidir_dummy_filter);
+ if (!f)
+ return NULL;
+
+ mp_filter_add_pin(f, MP_PIN_IN, "in");
+ mp_filter_add_pin(f, MP_PIN_OUT, "out");
+
+ return f;
+}
+
struct fixed_aframe_size_priv {
int samples;
bool pad_silence;