diff options
author | wm4 <wm4@nowhere> | 2013-12-03 22:19:27 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-04 00:07:38 +0100 |
commit | 25635a62c346f307f5d319a38c444f91b7928d43 (patch) | |
tree | bc50ccdcf00dda7cd7ea8a8f8ffb3f8e13196cb8 /video/filter/vf_lavfi.h | |
parent | 733c2369d3d4a70da934899dce06c61871fd26d4 (diff) | |
download | mpv-25635a62c346f307f5d319a38c444f91b7928d43.tar.bz2 mpv-25635a62c346f307f5d319a38c444f91b7928d43.tar.xz |
vf_lavfi: export a wrapper function
This will allow old filter to run libavfilter instead by calling
vf_lw_set_graph(), which turns the filter into a wrapper, using a given
libavfilter graph.
Later commits use that to automatically "reroute" a bunch of filters to
libavfilter. We want to get rid of the old MPlayer filter code, because
it's bad an unmaintained, but we still don't want to force everyone to
use vf_lavfi, so this solution will do for a while.
Diffstat (limited to 'video/filter/vf_lavfi.h')
-rw-r--r-- | video/filter/vf_lavfi.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/video/filter/vf_lavfi.h b/video/filter/vf_lavfi.h new file mode 100644 index 0000000000..45765d9dea --- /dev/null +++ b/video/filter/vf_lavfi.h @@ -0,0 +1,44 @@ +#ifndef MP_VF_LAVFI_H_ +#define MP_VF_LAVFI_H_ + +#include "config.h" + +#include "mpvcore/mp_common.h" +#include "vf.h" + +struct vf_lw_opts; + +#if HAVE_VF_LAVFI + +extern const struct m_sub_options vf_lw_conf; + +int vf_lw_set_graph(struct vf_instance *vf, struct vf_lw_opts *lavfi_opts, + char *filter, char *opts, ...) PRINTF_ATTRIBUTE(4,5); +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)); +#else +static inline +int vf_lw_set_graph(struct vf_instance *vf, struct vf_lw_opts *lavfi_opts, + char *filter, char *opts, ...) +{ + return -1; +} +static void *vf_lw_old_priv(struct vf_instance *vf) +{ + return 0; +} +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)) +{ +} +#include "mpvcore/m_option.h" +static const struct m_sub_options vf_lw_conf = {0}; +#endif + +#endif |