diff options
author | wm4 <wm4@nowhere> | 2014-09-27 17:14:23 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-27 17:21:29 +0200 |
commit | 0ec6df2ddfc6eb22de3c4f98c78d291997a5e93d (patch) | |
tree | 7014bcaed49a291a5c6b08f965b4be9b1d18b8a7 /video/filter/vf_lavfi.h | |
parent | cbf7180c90cba46921e9ababb74b5cc5ce45d287 (diff) | |
download | mpv-0ec6df2ddfc6eb22de3c4f98c78d291997a5e93d.tar.bz2 mpv-0ec6df2ddfc6eb22de3c4f98c78d291997a5e93d.tar.xz |
vf_lavfi: make chaining from other filters more flexible
Some filters exists only to create a specific lavfi graph. Allow these
filters to reset the graph exactly on reconfig, and allow them to modify
some image parameters too. Also make vf_lw_update_graph() behave like
vf_lw_set_graph() - they had a subtitle difference with filter==NULL.
Useful for the following commit.
Diffstat (limited to 'video/filter/vf_lavfi.h')
-rw-r--r-- | video/filter/vf_lavfi.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/video/filter/vf_lavfi.h b/video/filter/vf_lavfi.h index ca811412f5..889129a8c2 100644 --- a/video/filter/vf_lavfi.h +++ b/video/filter/vf_lavfi.h @@ -17,8 +17,10 @@ int vf_lw_set_graph(struct vf_instance *vf, struct vf_lw_opts *lavfi_opts, void *vf_lw_old_priv(struct vf_instance *vf); void vf_lw_update_graph(struct vf_instance *vf, char *filter, char *opts, ...) PRINTF_ATTRIBUTE(3,4); -void vf_lw_set_recreate_cb(struct vf_instance *vf, - void (*recreate)(struct vf_instance *vf)); +void vf_lw_set_reconfig_cb(struct vf_instance *vf, + int (*reconfig)(struct vf_instance *vf, + struct mp_image_params *in, + struct mp_image_params *out)); #else static inline int vf_lw_set_graph(struct vf_instance *vf, struct vf_lw_opts *lavfi_opts, @@ -33,9 +35,12 @@ static void *vf_lw_old_priv(struct vf_instance *vf) static void vf_lw_update_graph(struct vf_instance *vf, char *filter, char *opts, ...) { } -static void vf_lw_set_recreate_cb(struct vf_instance *vf, - void (*recreate)(struct vf_instance *vf)) +void vf_lw_set_reconfig_cb(struct vf_instance *vf, + int (*reconfig)(struct vf_instance *vf, + struct mp_image_params *in, + struct mp_image_params *out)) { + return 0; } #include "options/m_option.h" static const struct m_sub_options vf_lw_conf = {0}; |